Cloning Oracle Database Home From One Server To Another Server
Below are the steps for cloning ORACLE_HOME from one server to another server.
1. Check the oracle_home inventory [SOURCE Database Server]
$ORACLE_HOME/OPatch/opatch lsinventory
2. Check the ORACLE_HOME size[SOURCE Database Server]
cd $ORACLE_HOME
du -sh
7.2G
3. Create the ORACLE_HOME directory [TARGET Database Server]
mkdir -p /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
4. Take ORACLE_HOME binary backup [SOURCE Database Server]
cd $ORACLE_HOME
tar -cvf /export/home/oracle/oraclehomebkp/orahome12_bkp.tar .
5. Scp the tar file from source database server to target database server
cd /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
scp oracle@source-database-server-hostname:/export/home/oracle/oraclehomebkp/orahome12_bkp.tar .
6 . Untar the tar file
cd /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
tar -xvf orahome12_bkp.tar
7 . Run the clone script[TARGET Database Server]
cd $ORACLE_HOME/oui/bin
./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1"
ORACLE_HOME_NAME="dbhome_1"
ORACLE_BASE="/oracle/app/oracle"
OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall
# ./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1" ORACLE_HOME_NAME="dbhome_1" ORACLE_BASE="/oracle/app/oracle" OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 256819 MB Passed
Preparing to launch Oracle Universal Installer
Installation in progress
.................. 79% Done.
Install successful
Linking in progress
. 80% Done.
Link successful
Setup in progress
.......... 100% Done.
Setup successful
Saving inventory
Saving inventory complete
Configuration complete
End of install phases.
WARNING:
The following configuration scripts need to be executed as the "root" user.
/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of dbhome_1 was successful.
Please check '/oracle/app/oraInventory/logs/cloneActions*******.log' for more details.
WARNING:
The following configuration scripts need to be executed as the "root" user.
/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of dbhome_1 was successful.
Please check '/oracle/app/oraInventory/logs/cloneActions****.log' for more details.
7. Run the root.sh script from root [TARGET Database server]
root# /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/root.sh
Check /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/install/root_********.log for the output of root script
8.Create ADR REPO:
$ORACLE_HOME/bin/diagsetup basedir=/oracle/app/oracle oraclehome=/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
Below are the steps for cloning ORACLE_HOME from one server to another server.
1. Check the oracle_home inventory [SOURCE Database Server]
$ORACLE_HOME/OPatch/opatch lsinventory
2. Check the ORACLE_HOME size[SOURCE Database Server]
cd $ORACLE_HOME
du -sh
7.2G
3. Create the ORACLE_HOME directory [TARGET Database Server]
mkdir -p /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
4. Take ORACLE_HOME binary backup [SOURCE Database Server]
cd $ORACLE_HOME
tar -cvf /export/home/oracle/oraclehomebkp/orahome12_bkp.tar .
5. Scp the tar file from source database server to target database server
cd /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
scp oracle@source-database-server-hostname:/export/home/oracle/oraclehomebkp/orahome12_bkp.tar .
6 . Untar the tar file
cd /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
tar -xvf orahome12_bkp.tar
7 . Run the clone script[TARGET Database Server]
cd $ORACLE_HOME/oui/bin
./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1"
ORACLE_HOME_NAME="dbhome_1"
ORACLE_BASE="/oracle/app/oracle"
OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall
# ./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1" ORACLE_HOME_NAME="dbhome_1" ORACLE_BASE="/oracle/app/oracle" OSDBA_GROUP=oinstall OSOPER_GROUP=oinstall
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 256819 MB Passed
Preparing to launch Oracle Universal Installer
Installation in progress
.................. 79% Done.
Install successful
Linking in progress
. 80% Done.
Link successful
Setup in progress
.......... 100% Done.
Setup successful
Saving inventory
Saving inventory complete
Configuration complete
End of install phases.
WARNING:
The following configuration scripts need to be executed as the "root" user.
/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of dbhome_1 was successful.
Please check '/oracle/app/oraInventory/logs/cloneActions*******.log' for more details.
WARNING:
The following configuration scripts need to be executed as the "root" user.
/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
The cloning of dbhome_1 was successful.
Please check '/oracle/app/oraInventory/logs/cloneActions****.log' for more details.
7. Run the root.sh script from root [TARGET Database server]
root# /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/root.sh
Check /oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1/install/root_********.log for the output of root script
8.Create ADR REPO:
$ORACLE_HOME/bin/diagsetup basedir=/oracle/app/oracle oraclehome=/oracle/app/oracle/product/12.1.0.2_clonedb/dbhome_1
Tags:
Oracle Core DBA