Purpose: Cloning an Oracle Home, can eliminate multiple machines to repeatedly install Oracle software
1. Stop related processes
[Email protected] bin]#./crsctl Stop Cluster-all
2. Packing Dbhome_1 Catalogue
[Email protected] 11.2.0]# cd/u01/app/oracle/product/11.2.0/
[Email protected] 11.2.0]# TAR-ZCVPF Db_1.bak db_1/
[[email protected] 11.2.0]# ls
Db_1 Db_1.bak
Add:
Create a ZIP file with the Oracle home (and not the Oracle base) directory.
# Zip-r Dbhome_1.zip/u01/app/oracle/product/11.2.0/dbhome_1
Do not include the admin, Fast_recovery_area, and Oradata directories is under the Oracle base directory. These directories is created in the target installation later when you create a new database there.
3. (If the clone is a different machine), copy the zip file to the appropriate directory on the destination computer.
4. Unpack the TAR Package
# tar zxvf db_1.bak-c/app/oracle/product/11.2.0/
Attention:
If there are multiple nodes, all nodes repeat 2, 3, and 4 steps.
5, clear the $oracle_home/network/admin under the *.ora
6, run $ORACLE _home/perl/bin/perl clone.pl script
node1-> $ORACLE _home/perl/bin/perl clone.pl oracle_base= "/u01/app/oracle/" Oracle_home= "/app/oracle/product/ 11.2.0/db_1 "Osdba_group=dba Osoper_group=oper-defaulthomename
./runinstaller-clone-waitforcompletion "oracle_base=/u01/app/oracle/" "oracle_home=/app/oracle/product/11.2.0/db _1 "" Oracle_install_osdba=dba "" Oracle_install_osoper=oper "-defaulthomename-defaulthomename-silent-noconfig- NoWait
Starting Oracle Universal Installer ...
Checking swap space:must be greater than MB. Actual 6999 MB Passed
Preparing to launch Oracle Universal Installer from/tmp/orainstall2017-09-06_04-30-28am. Please wait ... Oracle Universal Installer, Version 11.2.0.4.0 Production
Copyright (C) 1999, Oracle. All rights reserved.
You can find the log of this install session at:
/u01/app/orainventory/logs/cloneactions2017-09-06_04-30-28am.log
.................................................................................................... 100% done.
Installation in progress (Wednesday, September 6, 4:31:02 AM CST)
.............................................................................. 78% done.
Install Successful
Setup in Progress (Wednesday, September 6, 4:33:11 AM CST)
Setup Successful
End of install phases. (Wednesday, September 6, 4:33:49 AM CST)
WARNING:
The following configuration scripts need to be executed as the "root" user.
/app/oracle/product/11.2.0/db_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 OraHome1 was successful.
Please check the '/u01/app/orainventory/logs/cloneactions2017-09-06_04-30-28am.log ' for more details.
--Meaning:
Use the following syntax:
$ORACLE _home/perl/bin/perl clone.pl oracle_base= "target_oracle_base" oracle_home= "Target_oracle_home"
Osdba_group=osdba_privileged_group Osoper_group=osoper_privileged_group-defaulthomename
Add:
Oracle Universal Installer starts, and then records the cloning actions in the CloneActionstimestamp.log file. This log file is typically located in/orainventory_location/logs directory.
7, reconstruction monitoring and DBCA building Library
To configure the connection information for the new database, run Net Configuration Assistant:
$ cd $ORACLE _home/bin
$./NETCA
To create a new database for the newly cloned Oracle home, run database Configuration Assistant:
$ cd $ORACLE _home/bin
$./DBCA
Oracle's cloning $oracle _home