Perform the following to clone an Oracle home:
- Verify that the installation of Oracle Database to clone is successful.
 You can do this by reviewing theinstallActionsdate_time.logfile for the installation session, which is typically located in the/orainventory_location/logsdirectory.
 If you install patches, then check their status using the following:
 $ cd $ORACLE_HOME/OPatch Include$ORACLE_HOME/OPatchin$PATH
 $ opatch lsinventory 
- Stop all processes related to the Oracle home. See "Stopping Existing Oracle Processes" for more information about stopping the processes for an Oracle home.
- Create a ZIP file with the Oracle home (but not the Oracle base) directory.
 For example, if the source Oracle installation is in the/u01/app/oracle/product/11.2.0/dbhome_1, then you zip thedbhome_1directory by using the following command:
 # zip -r dbhome_1.zip /u01/app/oracle/product/11.2.0/dbhome_1 Do not include theadmin,fast_recovery_area, andoradatadirectories that are under the Oracle base directory. These directories are created in the target installation later, when you create a new database there.
- Copy the ZIP file to the root directory of the target computer.
- Extract the ZIP file contents by using the following command:
 # unzip -d / dbhome_1.zip 
- Repeat steps 4 and 5 for each computer where you want to clone the Oracle home, unless the Oracle home is on a shared storage device.
- On the target computer, change the directory to the unzipped Oracle home directory, and remove all the .ora (*.ora) files present in the unzipped $ORACLE_HOME/network/admindirectory.
- From the $ORACLE_HOME/clone/bindirectory, run theclone.plfile for the unzipped Oracle home. 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 
- For example:
- $ORACLE_HOME/perl/bin/perl clone.pl ORACLE_BASE="/u01/app/oracle/" ORACLE_HOME="/u01/app/oracle/product/11.2.0/dbhome_1" OSDBA_GROUP=dba OSOPER_GROUP=oper -defaultHomeName
- The following configuration scripts need to be executed as the "root" user.
 /u02/u02/app/oracle/product/11.2.0.4/dbhome_1/root.sh
 To execute the configuration scripts:
 1. Open a terminal window
 2. Log in as "root"
 3. Run the scripts
 Example as below
- 
Oracle Universal Installer starts, and then records the cloning actions in the cloneActionstimestamp.logfile. This log file is typically located in/orainventory_location/logsdirectory.
- 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 
Comments
Post a Comment