Cloning an Oracle home involves creating a copy of the Oracle home and then configuring it for a new environment.
If you are performing multiple Oracle Database installations, then you may want to use cloning to create each Oracle home, because copying files from an existing Oracle Database installation takes less time than creating a new version of them. This method is also useful if the Oracle home that you are cloning has had patches applied to it. When you clone the Oracle home, the new Oracle home has the patch updates which is already applied on oracle home.
Steps to clone an Oracle home
step 1 : Stop Services
Stop all processes related to the Oracle home.
Step 2 :Create a ZIP or TAR file with the Oracle home (/u01/app/oracle/product/19.0.0/dbhome_1)
Use ROOT user for ZIP and UNZIP
# zip -r dbhome_1.zip /u01/app/oracle/product/19.0.0/dbhome_1
TAR option:
# tar -cvf dbhome_1.tar /u01/app/oracle/product/19.0.0/dbhome_1
Step 3: scp zip/tar to target server
scp dbhome_1.zip root@192.*.*.*:/
Step 4: on Target server extract the ZIP or TAR file
# unzip -d / dbhome_1.zip
# tar -xvf dbhome_1.tar
Step 5:Change the ownership of the Oracle Database home
# chown -R oracle:oinstall /u01/app/oracle/product/19.0.0/dbhome_1
Step 6: run the clone.pl
From the $ORACLE_HOME/clone/bin directory, run the clone.pl file for the unzipped Oracle home.
Example:
[oracle@database server 1~]$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/clone/bin/clone.pl ORACLE_BASE="/u01/app/oracle" ORACLE_HOME="/u01/app/oracle/product/19.0.0/dbhome_1" -defaultHomeName
output:
[INFO] [INS-32183] Use of clone.pl is deprecated in this release. Clone operation is equivalent to performing a Software Only installation from the image.
You must use /u01/app/oracle/product/19.0.0/dbhome_1/runInstaller script available to perform the Software Only install. For more details on image based installation, refer to help documentation.
Starting Oracle Universal Installer...
You can find the log of this install session at:
/u01/app/oraInventory/logs/cloneActions2020-12-06_12-33-20PM.log
.................................................. 5% Done.
.................................................. 10% Done.
.
.................................................. 75% Done.
.................................................. 80% Done.
.................................................. 85% Done.
..........
Copy files in progress.
Copy files successful.
Link binaries in progress.
..........
Link binaries successful.
Setup files in progress.
..........
Setup files successful.
Setup Inventory in progress.
Setup Inventory successful.
..........
Finish Setup successful.
The cloning of OraHome1 was successful.
Please check '/u01/app/oraInventory/logs/cloneActions2020-12-06_12-33-20PM.log' for more details.
Setup Oracle Base in progress.
Setup Oracle Base successful.
.................................................. 95% Done.
As a root user, execute the following script(s):
1. /u01/app/oracle/product/19.0.0/dbhome_1/root.sh
.................................................. 100% Done.
Step 7: Execute script by ROOT user
/u01/app/oracle/product/19.0.0/dbhome_1/root.sh
Check log files if any error.
Step 8: update .bash profile or export ORACLE_HOME and verify SQLPLUS prompt working.
Comments
Post a Comment