Showing posts with label Oracle-Installation. Show all posts
Showing posts with label Oracle-Installation. Show all posts

Monday, January 23, 2023

Oracle 19c Client Installation

 

Step 1: Download oracle 19c cient Software, ftp to the server and unzip.

unzip /path/to/file.zip -d temp_for_zip_extract

Step 2: Create Oracle User and Group

Log in as a root and execute:


# groupadd oinstall

# groupadd dba

# mkdir -p /home/aqadmin

# useradd -d /home/aqadmin -g oinstall -G dba aqadmin

# chown aqadmin:dba /home/aqadmin

# passwd aqadmin

New Password:

Re-enter new Password:

passwd: password successfully changed for aqadmin


Step 3: Download RPM's

curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

Step 4: install RPM's

yum -y localinstall oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

Step 5: Create /etc/oraInst.loc file with below entry. 

inventory_loc=/home/aqadmin/oraInventory

inst_group=oinstall

Step 6: Change permission on below file

chown -R aqadmin:dba /etc/oraInst.loc

Step 7:  Install oracle software in Silent mode

export CV_ASSUME_DISTID=OEL8.1

./runInstaller -silent -nowait -ignorePrereqFailure -waitForCompletion -force "ORACLE_HOME=/aqadmin/19c_client" "ORACLE_BASE=/aqadmin" "oracle.install.IsBuiltInAccount=true" "oracle.install.client.installType=Administrator"

Step 8: Validate Installation

export ORACLE_HOME=/aqadmin/19c_client

export PATH=$ORACLE_HOME/bin:$PATH

which sqlplus


sqlplus


Step 9: Create tnsnames.ora file


LISTENER = (ADDRESS = (PROTOCOL = TCP)(HOST = AQA1VMSITORA01)(PORT = 1521))
RWDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = AQA1VMSITORA01)(PORT = 1521))
) (CONNECT_DATA = (SERVICE_NAME = RWDB) ) )

tnsping rwdb

Thursday, January 19, 2023

Install Oracle 19c database software in silent mode in OEL-8

Step 1: Download oracle 19c Software, ftp to the server and unzip.

unzip /path/to/file.zip -d temp_for_zip_extract

Step 2: Create Oracle User and Group

Log in as a root and execute:


# groupadd oinstall

# groupadd dba

# mkdir -p /export/home/oracle

# useradd -d /export/home/oracle -g oinstall -G dba oracle

# chown oracle:dba /export/home/oracle

# passwd oracle

New Password:

Re-enter new Password:

passwd: password successfully changed for oracle


Step 3: Download RPM's

curl -o oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm https://yum.oracle.com/repo/OracleLinux/OL8/appstream/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

Step 4: install RPM's

yum -y localinstall oracle-database-preinstall-19c-1.0-2.el8.x86_64.rpm

Step 5: Backup response file (db_install.rsp) 

location install/response/db_install.rsp 

Step 6: Update below parameter in db_install.rsp file
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/home/oracle/oraInventory
ORACLE_HOME=/oracle/19c_home
ORACLE_BASE=/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=oinstall
oracle.install.db.OSOPER_GROUP=oinstall
oracle.install.db.OSBACKUPDBA_GROUP=oinstall
oracle.install.db.OSDGDBA_GROUP=oinstall
oracle.install.db.OSKMDBA_GROUP=oinstall
oracle.install.db.OSRACDBA_GROUP=oinstall
oracle.install.db.rootconfig.executeRootScript=false 
Step 7: Execute Pre-requisites.

./runInstaller -executePrereqs -silent -responseFile /oracle/19c_home/install/response/db_install.rsp

Step 8:  Install oracle software in Silent mode

export CV_ASSUME_DISTID=OEL8.1

./runInstaller -silent -responseFile /oracle/19c_home/install/response/db_install.rsp

Step 9:  Execute root.sh as per above steps output. 


Steps 10: Verify

export ORACLE_HOME=/oracle/19c_home

export PATH=$ORACLE_HOME/bin:$PATH

which sqlplus

sqlplus

Thursday, January 12, 2023

Create Infrastructure for Oracle Standalone Database using VMWARE

(OS: Linux 7.9)

Task 1 (Prepare Virtual Hardware)

1. Create the windows folders to house the first virtual machines and the shared storage.


F:\>mkdir Oracle_Standalone_DB_VM



2. Open VMWARE Console and Click on New Virtual Machine and click next.

3. Select Virtual Machine Configurations: Custom 



4. Choose Vm Machine Compatibility 












Click on the Finish button. 

 

Now your virtual machine is ready to install Linux 7.9 OS


Section: B (Install Linux 7.9 OS on first Virtual Machine)


1. Double Click on CD-ROM Devices. Select Use ISO image when you planning to install OS through ISO image otherwise Use physical drive.





2. Click on Start the Virtual Machine. 





Click on 









/ 10GB

/boot 500MB

/var 6GB

/swap 10GB

/home 20GB

/oracle 55 GB






reboot machine 


Perform below steps 


Step 1: Check the internet connectivity and network adapters are enabled.

 

ping google.com

 

Step 2 : Check the YUM is working by using the below command.

 

yum repolist

 

Step 3: Install Pre-installed packages 

First thing is to install a pre-install package for the database.

cd /etc/yum.repos.d

wget https://yum.oracle.com/public-yum-ol7.repo

 

 

Using a text editor for Oracle Linux 6 or 7, change the field 'enabled=0' to 'enabled=1' for the repositories corresponding to the machine's operating system while also enabling the 'addons' channel. Here's an example of a repo file's entries:

 

[ol7_latest]

name=Oracle Linux $releasever Latest ($basearch)

baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/latest/$basearch/

gpgkey=https://yum.oracle.com/RPM-GPG-KEY-oracle-ol6

gpgcheck=1

enabled=1

 

[ol7_addons]

name=Oracle Linux $releasever Add ons ($basearch)

baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/addons/$basearch/

gpgkey=https://yum.oracle.com/RPM-GPG-KEY-oracle-ol6

gpgcheck=1

enabled=1

 

[ol6_UEK_latest]

name=Latest Unbreakable Enterprise Kernel for Oracle Linux $releasever ($basearch)

baseurl=https://yum.oracle.com/repo/OracleLinux/OL6/UEK/latest/$basearch/

gpgkey=https://yum.oracle.com/RPM-GPG-KEY-oracle-ol6

gpgcheck=1

enabled=1

 

For Oracle Linux 6 or 7, update all packages and then install the preinstallation rpm by running the following yum commands:

yum update

Install Required RPM’s for Database 

yum install elfutils-libelf*

For 11g:

yum install oracle-rdbms-server-11gR2-preinstall

 

For 12c:

yum install oracle-rdbms-server-12cR1-preinstall


Tuesday, May 17, 2011

Create Database manually for File System Storage Mechanism

Step 1: Create a initSID.ora (Example: initRWDB.ora) file in $ORACLE_HOME/dbs/ directory.

Example: $ORACLE_HOME/dbs/initRWDB.ora

Put following entry in initTEST.ora file

*.audit_sys_operations=TRUE
*.audit_trail='db'
*.compatible='19.3.0.0.0'
*.control_files='/oracle/DATA/control01.ctl','/oracle/DATA/control02.ctl'
*.db_block_size=8192
*.db_name='RWDB'
*.diagnostic_dest='/home/oracle'
*.memory_max_target=754974720
*.memory_target=754974720
*.open_cursors=300
*.os_roles=FALSE
*.processes=300
*.recyclebin='OFF'
*.remote_login_passwordfile='EXCLUSIVE'
*.undo_tablespace='UNDOTBS1'


Step 2: Set ORACLE_HOME , PATH and ORACLE_SID enviroment

export ORACLE_HOME=/oracle/19c_home
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_SID=RWDB

Step 3: Create a password file

cd $ORACLE_HOME/dbs
$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/orapwdtest password=manager entries=5


Step 4: Run the following sqlplus command to connect to the database and startup the instance.

$sqlplus '/ as sysdba'

SQL> startup nomount

Step 5: Create the Database. Use following scripts

CREATE DATABASE RWDB
USER SYS IDENTIFIED BY manager
USER SYSTEM IDENTIFIED BY manager
LOGFILE GROUP 1 ('/oracle/DATA/redo01.log') SIZE 50M,
GROUP 2 ('/oracle/DATA/redo02.log') SIZE 50M,
GROUP 3 ('/oracle/DATA/redo03.log') SIZE 50M
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 50
MAXDATAFILES 100
MAXINSTANCES 1
DATAFILE '/oracle/DATA/system01.dbf' SIZE 100M autoextend on
SYSAUX DATAFILE '/oracle/DATA/sysaux01.dbf' SIZE 100M autoextend on
DEFAULT TABLESPACE users datafile '/oracle/DATA/users01.dbf' size 100m autoextend on
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE '/oracle/DATA/temp01.dbf' SIZE 50m
UNDO TABLESPACE undotbs1
DATAFILE '/oracle/DATA/undotbs01.dbf'
SIZE 200M;

Step 6: Run the scripts necessary to build views, synonyms, etc.:

@$ORACLE_HOME/rdbms/admin/catalog.sql -- creates the views of data dictionary tables and the dynamic performance views.


@$ORACLE_HOME/rdbms/admin/catproc.sql -- establishes the usage of PL/SQL functionality and creates many of the PL/SQL Oracle supplied packages.


conn system/manager

./sqlplus/admin/pupbld.sql

@$ORACLE_HOME/sqlplus/admin/pupbld.sql


Step 7: Create Listener file.


cd $ORACLE_HOME/network/admin

vi listener.ora

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1)) 
      (ADDRESS = (PROTOCOL = TCP)(HOST = AQA1VMSITORA01)(PORT = 1521))
    )
  )
lsnrctl start

Step 8: Create tnsnames.ora file


LISTENER = (ADDRESS = (PROTOCOL = TCP)(HOST = AQA1VMSITORA01)(PORT = 1521))
RWDB = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = AQA1VMSITORA01)(PORT = 1521))
) (CONNECT_DATA = (SERVICE_NAME = RWDB) ) )
tnsping rwdb

Monday, May 25, 2009

Create 10g OMF Database Manually

Step 1

Create a initSID.ora(Example: initTEST.ora) file in $ORACLE_HOME/dbs/ directory.

Example: $ORACLE_HOME/dbs/initTEST.ora

Put following entry in initTEST.ora file

##############################################################

background_dump_dest=<put BDUMP log destination>

core_dump_dest=<put CDUMP log destination>

user_dump_dest=<put UDUMP log destination>

control_files = (/<Destination>/control1.ctl,/ <Destination>/control2.ctl,/ <Destination>/control3.ctl)

undo_management = AUTO

undo_tablespace = UNDOTBS1

db_name = test

db_block_size = 8192

sga_max_size = 1073741824

sga_target = 1073741824

db_create_file_dest = /<Put DB File Destination> #OMF

db_create_online_log_dest_1 = /<Put first redo and control file destination> #OMF

db_create_online_log_dest_2 = /<Put second redo and control file destination> #OMF

db_recovery_file_dest = /<put flash recovery area destination> #OMF

################################################################

Step 2 Create a password file

$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/pwd<sid>.ora password=<password> entries=5

Step 3 Set your ORACLE_SID

export ORACLE_SID=test

export ORACLE_HOME=/<oracle home path>

Step 4 Run the following sqlplus command to connect to the database and startup the instance.

sqlplus '/ as sysdba'

SQL> startup nomount

Step 5 Create the database

create database test

character set WE8ISO8859P1

national character set utf8

undo tablespace undotbs1

default temporary tablespace temp;

Step 6  Run catalog and catproc

@?/rdbms/admin/catalog.sql

@?/rdbms/admin/catproc.sql

Monday, April 20, 2009

Create Stand-alone 10g Database Manually

Step 1 Create a initSID.ora (Example: initTEST.ora) file in $ORACLE_HOME/dbs/ directory.

Example: $ORACLE_HOME/dbs/initTEST.ora

Put following entry in initTEST.ora file

##############################################################

background_dump_dest=<put BDUMP log destination>
core_dump_dest=<put CDUMP log destination>
user_dump_dest=<put UDUMP log destination>
control_files = (/<Destination>/control1.ctl,/ <Destination>/control2.ctl,/ <Destination>/control3.ctl)
undo_management = AUTO
undo_tablespace = UNDOTBS1
db_name = test
db_block_size = 8192
sga_max_size = 1073741824
sga_target = 1073741824

####################################################

Step 2 Create a password file

$ORACLE_HOME/bin/orapwd file=$ORACLE_HOME/dbs/pwd<sid>.ora password=<password> entries=5

Step 3 Set your ORACLE_SID

$ export ORACLE_SID=test

$ export ORACLE_HOME=/<Destination>

Step 4 Run the following sqlplus command to connect to the database and startup the instance. 

$sqlplus '/ as sysdba'

SQL> startup nomount

Step 5 Create the Database. use following scripts.

create database test
logfile group 1 ('<Destination>/redo1.log') size 100M,
group 2 ('<Destination>/redo2.log') size 100M,
group 3 ('<Destination>/redo3.log') size 100M
character set WE8ISO8859P1
national character set utf8
datafile '<Destination>/system.dbf' size 500M autoextend on next 10M maxsize unlimited extent management local
sysaux datafile '<Destination>/sysaux.dbf' size 100M autoextend on next 10M maxsize unlimited
undo tablespace undotbs1 datafile '<Destination>/undotbs1.dbf' size 100M
default temporary tablespace temp tempfile '<Destination>/temp01.dbf' size 100M;

Step 6 Run the scripts necessary to build views, synonyms, etc.: 
  • CATALOG.SQL-- creates the views of data dictionary tables and the dynamic performance views.
  • CATPROC.SQL-- establishes the usage of PL/SQL functionality and creates many of the PL/SQL Oracle supplied packages.

Friday, December 12, 2008

Installing Oracle Database 10g Release 1 & 2 (32-bit/64-bit) on Red Hat Enterprise Linux 4

Installing Oracle Database 10g Release 1 & 2 (32-bit/64-bit) on Red Hat Enterprise Linux 4

The following procedure is a step-by-step guide with tips and information for installing Oracle Database 10g on Red Hat Linux.

Note: When you install Linux For Oracle you should create separate file system for ORACLE Software and Oracle Database

2.5 GB of disk space should be required by Oracle Software
1.3 GB of disk space should be required by General Purpose Database.

Here we create /Oracle mount point for Oracle Software and /database for Oracle Database

Prerequisite Steps:

Check Memory
Memory should be 512 MB of RAM.

How to check the size of physical memory? $ grep MemTotal /proc/meminfo

Check swap space
Swap space should be 1 GB or Twice the size of RAM

How to check the size of Swap space?
$ grep SwapTotal /proc/meminfo

If you don’t have 1 GB of twice of the size of RAM. You must add temporary swap space to your system by creating a temporary swap file. Bellow I am describing How to Add Swap Space?

How to Add Swap Space?
Step 1
Log in as a ROOT
$ dd if=/dev/zero of=tmpswap bs=1k count=900000
$ chmod 600 tmpswap
$ mkswap tmpswap
$ swapon tmpswap

Check TMP Space
Oracle Universal Installer (OUI) requires up to 400 MB of free space in the /tmp directory. How to check the space in /tmp?
$ df /tmp

If you don’t have enough space in the /tmp filesystem, you must temporarily create a tmp directory in another filesystem. Bellow I am describing all steps for adding temp space?
Step 1
Log in as a ROOT user
Step 2 mkdir //tmp
Step 3 chown root.root //tmp
Step 4 chmod 1777 //tmp
Step 5 export TEMP=/
Step 6 export TMPDIR=/

After Completion of Installation, you must remove the temporary /temp directory. Bellow I am describing How to Remove temprory /temp directory?

Step 1 Log in as a Root
Step 2 $ rmdir //tmp
Step 3 $unset TEMP
Step 4 unset TMPDIR
4. Check Software RPM Package
Before install of Oracle Database 10g software you need to check the system for required RPMs.

make-3.79
binutils-2.14
gcc-3.2
libaio-0.3.96

Checking Recommended glibc version
Glibc-2.3.2-95.27


5. Check Kernel parameter

How to see all kernel parameters?

Step 1 Log in as a Root user
Step 2 $ sysctl –a

Bellow I am describing kernel parameters, which have to be set to values greater than or equal to the recommended values which can be changed in the proc filesystem:

shmmax = 2147483648
shmmni = 4096
shmall = 2097152
shmmin = 1
shmseg = 10
semmsl = 250
semmns = 32000
semopm = 100
semmni = 128
file-max = 65536
ip_local_port_range = 1024 65000

NOTE: Do not change the value of any kernel parameter on a system where it is already higher than listed as minimum requirement.

Note: Just you add minimum required value in /etc/sysctl.conf file which is used during the boot process: kernel.shmmax=2147483648kernel.sem=250 32000 100 128fs.file-max=65536net.ipv4.ip_local_port_range=1024 65000net.core.rmem_default=1048576net.core.rmem_max=1048576net.core.wmem_default=262144net.core.wmem_max=262144

become effective immediately, execute the following command:
Step 1 Log in as a Root
Step 2 $ sysctl -p

Installation Steps:

1. Creating Oracle User Accounts and Group

Step 1 Log in as a Root
Step 2 $groupadd dba # group of users to be granted SYSDBA system privilege
Step 3 $groupadd oinstall # group owner of Oracle files
Step 4 useradd -c "Oracle software owner" –d /home/oracle -g oinstall -G dba oracle
Step 5 chown oracle:dba /home/oracle /oracle
Step 6 chown oracle:dba /home/oracle /database
Step 5 passwd oracle

2. Creating Oracle Directories
You only need to create the directory for $ORACLE_BASE:
su - root
mkdir /oracle
chown –R oracle:oinstall /oracle

3
Starting Oracle Universal InstallerInsert the Oracle CD that contains the image of the Software. If you install Oracle10g from a CD, mount the CD by running the following commands in another terminal:

su - root
mount /mnt/cdrom
run installer ./ runInstaller

Note: Message :- Can not connect to X11 windows server
Step Log in as a Root user
Step 2 $xhost +
Step 3 su – oracle
Step 4 Export Display=localhost:0.0
Step 5 ./runinstaller
Post Installation Steps:
Put following entries in bash file.
export ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Oracle 10g Installation & Configuration On Solaris Platform

Oracle 10g Installation & Configuration On Solaris Platform

Step 1
Install the Operating System
Note: No specified operating system patches are required with Solaris 10 OS.

Step 2
Make sure that following software packages has been installed.
SUNWarc
SUNWbtool
SUNWhea
SUNWlibm
SUNWlibms
SUNWsprot
SUNWtoo
SUNWilof
SUNWxwfnt
SUNWilcs
SUNWsprox
SUNWil5cs

Note: We can verify that packages are installed or not by using following command: $pkginfo -i.

Step 3
Check following executable file must be presents in /usr/ccs/bin
make
ar
il
nm

Step 4
Checks swap space. Swap space should be 512MB or Twice the size of RAM. Use following command to know about Physical Memory and Swap space:

$ /usr/sbin/prtconf grep size
$ /usr/sbin/swap –l

Step 5
Need at least 400 MB of free space in /tmp directory.

Step 6
Set following kernel parameter in /etc/system file and reboot the server.

Set shmsys:shminfo_shmmax=4294967295
Set shmsys:shminfo_shmmni=100
Set semsys:seminfo_semmsl=256
Set semsys:seminfo_semmni=100

Step 7
Create a group.

$ groupadd –g 300 dba *
$ groupadd –g 301 oinstall **

* “DBA” group will be use by the Oracle Software Owner and Database Administrators.

** “OINSTALL” group will be use when you installing multiple copies of the oracle software on one server and you will want some logins to be able to log onto some databases with DBA privileges but not others.

Step 8
Create a Unix user that will be the Oracle Software Owner.

$ useradd –c ‘Oracle Software Owner’ –d /oracle –g oinstall –G dba –m –u 300 –s /usr/bin/ksh oracle

$passwd oracle

Step 9
Create directory for oracle software and Database.

$ mkdir /oracle/app /oracle/oradata
$chown oracle:dba /oracle
$chmod 775 /oracle

Step 10
Create the /var/opt/oracle directory

$mkdir /var/opt/oracle
$chown oracle:dba /var/opt/oracle
$chmod 755 /var/opt/oracle

Step 11
edit .profile file and type following endearments
export ORACLE_BASE=/oracle
export ORACLE_HOME=$ORACLE_BASE/app
export PATH=$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Step 12
Set X window enveiroment.

Log in as a root with CDE (Common Desktop Environment Session)
$ DISPLAY=:0.0
$export DISPLAY
$xhost +
$ su – oracle
$DISPLAY=:0.0
$export DISPLAY
$/usr/openwin/bin/xclock

Step 13

Log in as a ORACLE user and execute run installer.

$./runInstaller

We will wait through the installer prompts one at the time.