Oracle® Database Installation Guide 11g Release 2 (11.2) for Linux Part Number E10840-02 |
|
|
View PDF |
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 this method 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 this Oracle home, the new Oracle home will have the patch updates as well.
When cloning Database Oracle homes using 11.2 Database Control, you must update the exclude file list. This file list specifies files that need not be included when the source Oracle home is archived because these files are not required for the clone operation. The following files should not be included in the archive:
sqlnet.ora
tnsnames.ora
listener.ora
oratab
Note:
In addition to cloning an Oracle home, you can clone individual Oracle Database installations by using Enterprise Manager Database Control. Oracle Database Administrator's Guide provides detailed information about cloning Oracle Database installations and Oracle homes.This appendix includes information about the following topics:
Perform the following to clone an Oracle home:
Verify that the installation of Oracle Database that you want to clone has been successful.
You can do this by reviewing the installActions
date_time
.log
file for the installation session, which is normally located in the /
orainventory_location
/logs
directory.
If you have installed patches, then you can check their status by running the following commands:
$ $ORACLE_HOME/OPatch ORACLE_HOME=ORACLE_HOME_using_patch $ $ORACLE_HOME/OPatch opatch lsinventory
Stop all processes related to the Oracle home. Refer to "Removing Oracle Software" for more information on stopping the processes for an Oracle home.
Create a ZIP file with the Oracle home (but not 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 the dbhome_1
directory by using the following command:
# zip -r dbhome_1.zip /u01/app/oracle/product/11.2.0/dbhome_1
Do not include the admin
, recovery_area
, and oradata
directories that are under the Oracle base directory. These directories will be 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 directory to the unzipped Oracle home directory, and remove all the .ora (*.ora) files present in the unzipped $ORACLE_HOME/network/admin
directory.
From the $ORACLE_HOME/clone/bin
directory, run clone.pl 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
Oracle Universal Installer starts, and then records the cloning actions in the cloneActions
timestamp
.log
file. This log file is normally located in /
orainventory_location
/logs
directory.
To configure 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 as follows:
$ cd $ORACLE_HOME/bin $ ./dbca
See Also:
Oracle Universal Installer and OPatch User's Guide for Windows and UNIX for detailed information about using Oracle Universal Installer to clone an Oracle Database home
Oracle Database Administrator's Guide for information about cloning an Oracle databases, as well as cloning an Oracle Database home
Perform the following to configure Oracle Configuration Manager for a cloned Oracle home:
Run the following command from $ORACLE_HOME/ccr/state
:
$ rm -rf *.ll*
Run the following command from $ORACLE_HOME/ccr/inventory
:
$ cp core.jar pending
Run the following commands from $ORACLE_HOME/ccr/bin
:
$ ./emSnapshotEnv $ ./deployPackages
Run the following command from $ORACLE_HOME/ccr/bin
, and provide the proper credentials:
$ ./configCCR
If Oracle Configuration Manager was manually configured using setupCCR
, then perform the following in the cloned Oracle home:
Delete all the subdirectories of the $ORACLE_HOME/ccr/hosts
directory to remove previously configured hosts.
Run the following command from $ORACLE_HOME/ccr/bin
:
$ ./configCCR -a
If you have installed Oracle Configuration Manager in the original Oracle home but have not configured it, then run the following command in the cloned Oracle home:
$ setupCCR