Oracle Installation From Oracle-Base
Oracle Installation From Oracle-Base
2) Installation On
Oracle Linux 6
This article describes the installation of Oracle Database 11g Release 2 (11.2) (64-bit)
on Oracle Linux 6 (64-bit). The article is based on a server installation with a minimum
of 2G swap, with SELinux set to permissive and the firewall disabled. The following
package groups were included for this installation.
An example of this type of Linux installations can be seen here. Alternative installations
may require more packages to be loaded, in addition to the ones listed below.
Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites
o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
Common Errors
Download Software
Download the Oracle software from OTN or MOS depending on your support status.
Unpack Files
Unzip the files.
# 11.2.0.1
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
#11.2.0.2
unzip p10098816_112020_Linux-x86-64_1of7.zip
unzip p10098816_112020_Linux-x86-64_2of7.zip
#11.2.0.3
unzip p10404530_112030_Linux-x86-64_1of7.zip
unzip p10404530_112030_Linux-x86-64_2of7.zip
#11.2.0.4
unzip p13390677_112040_Linux-x86-64_1of7.zip
unzip p13390677_112040_Linux-x86-64_2of7.zip
You should now have a single directory called "database" containing installation files.
Hosts File
The "/etc/hosts" file must contain a fully qualified name for the server.
Automatic Setup
If you plan to use the "oracle-rdbms-server-11gR2-preinstall" package to perform all
your prerequisite setup, follow the instructions at http://public-yum.oracle.com to setup
the yum repository for OL, then perform the following command.
# yum update
Manual Setup
If you have not used the "oracle-rdbms-server-11gR2-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Oracle recommend the following minimum parameter settings.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
/sbin/sysctl -p
This will install all the necessary 32-bit packages for 11.2.0.1. From 11.2.0.2 onwards
many of these are unnecessary, but having them present does not cause a problem.
Create the new groups and users.
We are not going to use the "asm" groups, since this installation will not use ASM.
Additional Setup
Set the password for the "oracle" user.
passwd oracle
# Change this
* soft nproc 1024
# To this
* - nproc 16384
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.
SELINUX=permissive
mkdir -p /u01/app/oracle/product/11.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
xhost +<machine-name>
Login as the oracle user and add the following lines at the end of the ".bash_profile" file.
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.
Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.
./runInstaller
Proceed with the installation of your choice. The prerequisites checks will fail for the
following version-dependent reasons:
11.2.0.1: The installer shows multiple "missing package" failures because it does
not recognize several of the newer version packages that were installed. These
"missing package" failures can be ignored as the packages are present. The
failure for the "pdksh" package can be ignored because we installed the "ksh"
package in its place.
11.2.0.2: The installer should only show a single "missing package" failure for the
"pdksh" package. It can be ignored because we installed the "ksh" package in its
place.
11.2.0.3: The installer shows no failures and continues normally.
You can see the type of installation I performed by clicking on the links below to see
screen shots of each stage.
If you are doing an installation for an Enterprise Manager repository, remember to do
an advanced installation and pick the ALT32UTF8 character set.
Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
DB11G:/u01/app/oracle/product/11.2.0/db_1:Y
Common Errors
"error code 35" : The machine name in the "/etc/hosts" file is not correct. It needs
an entry for the loopback adapter (localhost) and the machine name. If you are
using DNS for name resolution, you still need the loopback adapter reference in
this file.
"error code 37" : The DNS not working properly. You may also get this error is
the "/etc/hosts" file is not configured correctly.
"sqlplus: error while loading shared libraries: libclntsh.so.11.1" : The prerequisites
have not been met. Work through them again. Specifically, make sure the "gcc"
package has been installed.
Listener fails to start - Typically this is due to incorrect name resolution. Make
sure the "/etc/hosts" and/or DNS is configured correctly.
Linking errors - Almost always due to missing prerequisites. Review the setup
sections.
For more information see:
Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites
o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
Download Software
Download the Oracle software using one of the two link below. If you have access to My
Oracle Support (MOS), then it is better to download the 11.2.0.4 version, since this is
the first release of 11.2 that is supported on Oracle Linux 7.
Unpack Files
Unzip the files.
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
You should now have a single directory called "database" containing installation files.
Hosts File
The "/etc/hosts" file must contain a fully qualified name for the server.
For example.
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.loca
ldomain4
192.168.0.215 ol7.localdomain ol7
ol7.localdomain
Automatic Setup
If you plan to use the "oracle-rdbms-server-11gR2-preinstall" package to perform all
your prerequisite setup, follow the instructions at http://public-yum.oracle.com to setup
the yum repository for OL, then perform the following command.
# yum update
Manual Setup
If you have not used the "oracle-rdbms-server-11gR2-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Add or amend the following lines in the "/etc/sysctl.conf" file.
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_default=262144
net.core.wmem_max=1048586
/sbin/sysctl -p
Add the following line to the "/etc/pam.d/login" file, if it does not already exist.
The following packages are listed as required, including the 32-bit version of some of
the packages. Many of the packages should be installed already.
We are not going to use the extra groups, but include them if you do plan on using
them.
Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.
mkdir -p /u01/app/oracle/product/11.2.0.4/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.
xhost +<machine-name>
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.
./runInstaller
Proceed with the installation of your choice. You can see type of installation I performed
by clicking on the links below to see screen shots of each stage. The "pdksh" package
will be listed as missing, which can be ignored because we installed the "ksh" package
instead.
If you are doing an installation for an Enterprise Manager repository, remember to do
an advanced installation and pick the ALT32UTF8 character set.
During the link phase you will encounter an error invoking the "ins_emagent.mk" file. To
fix this, edit the "$ORACLE_HOME/sysman/lib/ins_emagent.mk", doing a search and
replace for the line shown below.
FROM:
$(MK_EMAGENT_NMECTL)
TO :
$(MK_EMAGENT_NMECTL) -lnnz11
Click the "Retry" button.
Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
DB11G:/u01/app/oracle/product/11.2.0.4/db_1:Y
Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites
o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
Common Errors
Related articles.
Download Software
Download the Oracle software from OTN or MOS depending on your support status.
This article has been updated for the 12.1.0.2 release, but the installation is essentially
unchanged since 12.1.0.1. Any variations specific for 12.1.0.1 will be noted.
Depending on your version of VirtualBox and Oracle Linux, there may be some slight
variation in how the screen shots look.
Unpack Files
Unzip the files.
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
You should now have a single directory called "database" containing installation files.
Hosts File
The "/etc/hosts" file must contain a fully qualified name for the server.
<IP-address> <fully-qualified-machine-name> <machine-name>
For example.
Automatic Setup
If you plan to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all
your prerequisite setup, issue the following command.
Earlier versions of Oracle Linux required manual setup of the Yum repository by
following the instructions at http://public-yum.oracle.com.
It is probably worth doing a full update as well, but this is not strictly speaking
necessary.
# yum update
Manual Setup
If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Add or amend the following lines in the "/etc/sysctl.conf" file.
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p
Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
# Change this
* soft nproc 1024
# To this
* - nproc 16384
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Putting mount points directly under root is typically a bad idea. It's done here for
simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.
xhost +<machine-name>
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=ol6-121.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.
Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.
./runInstaller
Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
cdb1:/u01/app/oracle/product/12.1.0.2/db_1:Y
If Database Express 12c is not working, check the XMLDB HTTP port. If it is 0, set it to
the port you want to use.
GETHTTPSPORT
------------
5500
SQL>
Common Errors
"error code 35" : The machine name in the "/etc/hosts" file is not correct. It needs
an entry for the loopback adapter (localhost) and the machine name. If you are
using DNS for name resolution, you still need the loopback adapter reference in
this file.
"error code 37" : The DNS not working properly. You may also get this error is
the "/etc/hosts" file is not configured correctly.
"sqlplus: error while loading shared libraries: libclntsh.so.12.1" : The prerequisites
have not been met. Work through them again. Specifically, make sure the "gcc"
package has been installed.
Listener fails to start - Typically this is due to incorrect name resolution. Make
sure the "/etc/hosts" and/or DNS is configured correctly.
Linking errors - Almost always due to missing prerequisites. Review the setup
sections.
For more information see:
Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites
o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
12.1.0.1 Notes
12.1.0.2 Notes
Related articles.
Download Software
Download the Oracle software from OTN or MOS depending on your support status.
Unpack Files
Unzip the files.
unzip linuxamd64_12102_database_1of2.zip
unzip linuxamd64_12102_database_2of2.zip
You should now have a single directory called "database" containing installation files.
Hosts File
The "/etc/hosts" file must contain a fully qualified name for the server.
For example.
ol7.localdomain
Automatic Setup
If you plan to use the "oracle-rdbms-server-12cR1-preinstall" package to perform all
your prerequisite setup, issue the following command.
# yum update -y
It's worth running the all the YUM commands listed in the manual setup section.
Depending on the OS package groups you have selected, some additional packages
might also be needed.
Manual Setup
If you have not used the "oracle-rdbms-server-12cR1-preinstall" package to perform all
prerequisites, you will need to manually perform the following setup tasks.
Add the following lines to the "/etc/sysctl.conf" file, or in a file called "/etc/sysctl.d/98-
oracle.conf".
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p
Add the following lines to a file called "/etc/security/limits.d/oracle-rdbms-server-12cR1-
preinstall.conf" file.
The following packages are listed as required, including the 32-bit version of some of
the packages. Many of the packages should be installed already.
Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Putting mount points directly under root is typically a bad idea. It's done here for
simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.
xhost +<machine-name>
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=ol7.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.
Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.
./runInstaller
Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
cdb1:/u01/app/oracle/product/12.1.0.2/db_1:Y
12.1.0.1 Notes
Only follow these notes if you are attempting the install using 12.1.0.1, there are a
number of things that will need to be fixed along the way. These are not necessary for a
12.1.0.2 installation, as it completes cleanly.
The following steps need to be considered during the installation.
When clicking "Next" on the "Download Software Updates" screen you will get
the following message. Click the "Yes" button.
"[INS-13001] Environment does not meet minimum requirements.
During the linking phase, you will see the following error.
for details.
rm -rf $ORACLE_HOME/lib/stubs/*
cp $ORACLE_HOME/rdbms/lib/env_rdbms.mk $ORACLE_HOME/rdbms/lib/env_rd
bms.mk.orig
# Line 176
# FROM:
LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS)
# TO :
LINKTTLIBS=$(LLIBCLNTSH) $(ORACLETTLIBS) $(LINKLDLIBS) -lons
# Line 279-280
# FROM:
LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS)
LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS)
# TO :
LINK=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS) $(COMPSOBJS) -Wl,--
no-as-needed
LINK32=$(FORT_CMD) $(PURECMDS) $(ORALD) $(LDFLAGS32) $(COMPSOBJS) -W
l,--no-as-needed
# Line 3041-3042
# FROM:
TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
$(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS)
# TO :
TG4PWD_LINKLINE= $(LINK) $(OPT) $(TG4PWDMAI) \
$(LLIBTHREAD) $(LLIBCLNTSH) $(LINKLDLIBS) -lnnz12
for details.
rm -rf $ORACLE_HOME/lib/stubs/*
cp $ORACLE_HOME/ctx/lib/env_ctx.mk $ORACLE_HOME/ctx/lib/env_ctx.mk.o
rig
# Line 154
# FROM:
LINK=$(LDCCOM)
# TO :
LINK=$(LDCCOM) --Wl,--no-as-needed
dbshut $ORACLE_HOME
cd $ORACLE_HOME/bin
./relink all
# Following line should return no errors.
grep -i err $ORACLE_HOME/install/relink.log
dbstart $ORACLE_HOME
12.1.0.2 Notes
During the linking phase, you may see the following error.
To fix it, run the following command as the "oracle" user, then click the "Retry" button.
cp $ORACLE_HOME/javavm/jdk/jdk6/lib/libjavavm12.a $ORACLE_HOME/lib/
During the database creation as part of the installation, or after when using the DBCA,
you may get the following error.
To fix it, follow the instructions to rebuild Perl as described towards the end of this post
by Laurent Leturgez. You will have to redo the database creation.
For more information see:
Download Software
Unpack Files
Hosts File
Oracle Installation Prerequisites
o Automatic Setup
o Manual Setup
o Additional Setup
Installation
Post Installation
Related articles.
Download Software
Download the Oracle software from OTN or MOS depending on your support status.
Unpack Files
Unzip the file.
unzip linuxx64_12201_database.zip
You should now have a single directory called "database" containing installation files.
Hosts File
The "/etc/hosts" file must contain a fully qualified name for the server.
For example.
ol7-122.localdomain
Automatic Setup
If you plan to use the "oracle-database-server-12cR2-preinstall" package to perform all
your prerequisite setup, issue the following command.
It is probably worth doing a full update as well, but this is not strictly speaking
necessary.
# yum update -y
It's worth running the all the YUM commands listed in the manual setup section.
Depending on the OS package groups you have selected, some additional packages
might also be needed.
Manual Setup
If you have not used the "oracle-database-server-12cR2-preinstall" package to perform
all prerequisites, you will need to manually perform the following setup tasks.
Add the following lines to the "/etc/sysctl.conf" file, or in a file called "/etc/sysctl.d/98-
oracle.conf".
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
/sbin/sysctl -p
Additional Setup
The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user.
passwd oracle
Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure the
SELINUX flag is set as follows.
SELINUX=permissive
Once the change is complete, restart the server or run the following command.
# setenforce Permissive
If you have the Linux firewall enabled, you will need to disable or configure it, as
shown here or here. To disable it, do the following.
mkdir -p /u01/app/oracle/product/12.2.0.1/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
Putting mount points directly under root is typically a bad idea. It's done here for
simplicity, but for a real installation "/" should be reserved for the OS.
Unless you are working from the console, or using SSH tunnelling, login as root and
issue the following command.
xhost +<machine-name>
The scripts are created using the cat command, with all the "$" characters escaped. If
you want to manually create these files, rather than using the cat command, remember
to remove the "\" characters before the "$" characters.
Create a "scripts" directory.
mkdir /home/oracle/scripts
export ORACLE_HOSTNAME=ol7-122.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=\$ORACLE_BASE/product/12.2.0.1/db_1
export ORACLE_SID=cdb1
export PATH=/usr/sbin:/usr/local/bin:\$PATH
export PATH=\$ORACLE_HOME/bin:\$PATH
export LD_LIBRARY_PATH=\$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=\$ORACLE_HOME/jlib:\$ORACLE_HOME/rdbms/jlib
EOF
Add a reference to the "setEnv.sh" file at the end of the "/home/oracle/.bash_profile" file.
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbstart \$ORACLE_HOME
EOF
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbshut \$ORACLE_HOME
EOF
Once the installation is complete and you've edited the "/etc/oratab", you should be able
to start/stop the database with the following scripts run from the "oracle" user.
~/scripts/start_all.sh
~/scripts/stop_all.sh
You can see how to create a Linux service to automatically start/stop the database here
(OL6, OL7).
Installation
Log into the oracle user. If you are using X emulation then set the DISPLAY
environmental variable.
Start the Oracle Universal Installer (OUI) by issuing the following command in the
database directory.
./runInstaller
Post Installation
Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
cdb1:/u01/app/oracle/product/12.2.0.1/db_1:Y
Related Articles.
The SHOW ... FOR DB_UNIQUE_NAME command shows the configuration for a specific
standby database or all known databases.
The extended syntax allows for configurations where logs are eligible for deletion only
after being applied to, or transferred to, one or more standby database destinations.
This method is suitable for creating a duplicate database or physical standby database.
Next, log into RMAN using the base recovery catalog owner and grant access on the
relevant databases to the virtual private catalog user. The database can be specified
using the database name or the DBID.
$ rman
RMAN> CONNECT CATALOG rman/rman;
RMAN> GRANT CATALOG FOR DATABASE db11g TO vpc1;
Grant succeeded.
RMAN>
The following grant will allow the virtual private catalog to register new target databases.
Grant succeeded.
RMAN>
Next, log into RMAN using the virtual private catalog owner and issue the CREATE
VIRTUAL CATALOG command.
$ rman
RMAN> CONNECT CATALOG vpc1/vpc1;
RMAN> CREATE VIRTUAL CATALOG;
If the catalog is to be used for releases earlier than Oracle 11g, log into SQL*Plus as
the virtual private catalog owner and run the following procedure, where "rman"
represents the name of the base catalog owner.
SQL>
To revoke privileges from a virtual private catalog, log into RMAN as the base catalog
owner and revoke access to the relevant databases as follows.
The method used to drop the virtual private catalog varies depending on the database
versions of the targets that were registered with it. If only 11g targets were registered,
log on to RMAN as the virtual private catalog owner and issue the following command.
$ rman
RMAN> CONNECT CATALOG vpc1/vpc1;
RMAN> DROP CATALOG;
If targets prior to 11g were registered, connect to SQL*Plus as the virtual private catalog
owner and run the following procedure, where "rman" represents the name of the base
catalog owner.
SQL>
You are now safe to drop the virtual private catalog user.
User dropped.
SQL>
IMPORT CATALOG
Oracle 11g has also introduced the IMPORT CATALOG command to allow recovery
catalogs to be merged or moved. Connect to the destination catalog and issue
the IMPORT CATALOGcommand, specifying the owner of the source catalog.
$ rman
RMAN> CONNECT CATALOG rman2/rman2
RMAN> IMPORT CATALOG rman@db11g;
Each target imported is unregistered from the source catalog. The import can be limited
to a subset of the catalog by specifying the DBID or DB_NAME of each target to import.
The version of the source catalog must match that of the RMAN executable for the
import to be successful.
To move an entire catalog to a new server, simply create a user on the new server to
act as the catalog owner, create a catalog and import the contents of the existing
catalog into it.
$ sqlplus / as sysdba
SQL> CREATE USER rman2 IDENTIFIED BY rman2 QUOTA UNLIMITED ON rman_ts;
SQL> GRANT RECOVERY_CATALOG_OWNER TO rman2;
SQL> EXIT;
$ rman catalog=rman2/rman2
RMAN> CREATE CATALOG;
RMAN> IMPORT CATALOG rman@db11g;
Multisection Backups
A file section is defined as a contiguous range of blocks from a single file. The SECTION
SIZE parameter in the BACKUP command tells RMAN to create a backup set where each
backup piece contains the blocks from one file section, allowing the backup of large files
to be parallelized across multiple channels.
The following example of a multisection backup sets the parallelism to 4, allowing a
tablespace with a single 1000M datafile to be backed up in 4x250M sections.
If the section size is larger than the file size, RMAN does not use a multisection
backup for the file.
If the section size is so small that more than 256 sections would be produced,
RMAN increases the section size such that 256 sections will be created.
SECTION SIZE and MAXPIECESIZE cannot be used together.
A backup set never contains a partial datafile, regardless of whether or not it is a
multisection backup.
Undo Optimization
The BACKUP command no longer backs up undo that is not needed for recovery. As the
majority of the undo tablespace is filled with undo generated for transactions that have
subsequently been committed, this can represent a substantial saving.
This functionality is not configurable. It is not affected by the CONFIGURE BACKUP
OPTIMIZATION {ON | OFF} command.
To perform a compressed backup using the ZLIB algorithm you might do something like
this.
# One-off configuration.
CONFIGURE COMPRESSION ALGORITHM 'ZLIB';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO COMPRESSED BACKUPS
ET;
# Backup.
BACKUP DATABASE PLUS ARCHIVELOG;
CONNECT TARGET /
BACKUP DATABASE TAG '&1';
BACKUP ARCHIVELOG ALL TAG '&2';
EXIT;
Notice the "&1" and "&2" placeholders. Assuming this were saved with a filename of
"/scripts/backup.cmd", it might be called with the following syntax.
Notice the use of the USING keyword, which accepts a space-separated list of values
that are substituted for the placeholders.
Lost write detection is most effective in Data Guard environments. Once the primary
and standby databases are protected, the SCNs of blocks applied to the standby
database are compared to the SCN logged in the redo logs. If the SCN on the primary
database is smaller than the SCN on the standby database, a lost write on the primary
database has occurred and is signaled with an external error (ORA-752). At this point
you should failover to the standby database. If the SCN on the primary database is
bigger than on the standby database, a lost write on the standby database has occured
and is signalled with an internal error (ORA-600 [3020]). At this point the standby
database should be recreated.
Lost write protection can also be used in normal databases, although there is no signal
that the lost write has occurred. If you suspect a problem due to inconsistent data, you
must recovery the database to the SCN of the stale block from a backup taken before
the suspected problem occurred. This restore operation will generate the lost write error
(ORA-752). If the error is detected during a recovery, you have no alternative but to
open the database with the RESETLOGS option. All data after this point is lost.
Greater parallelism.
More efficient asynchronous redo read, parse, and apply.
Fewer synchronization points in the parallel apply algorithm.
The media recovery checkpoint at a redo log boundary no longer blocks the
apply of the next log.
There are new parallel recovery wait events for tuning purposes.
For more information see:
https://oracle-
base.com