Cloning An Existing Oracle10g Release 2 (10.2.0.x) RDBMS Installation Using OUI (文档 ID 559304.1)

Cloning An Existing Oracle10g Release 2 (10.2.0.x) RDBMS Installation Using OUI (文档 ID 559304.1) 转到底部转到底部

In this Document


APPLIES TO:

Oracle Universal Installer - Version 10.2.0.1 to 10.2.0.5 [Release 10.2]
Oracle Database - Enterprise Edition - Version 10.2.0.1 to 10.2.0.5 [Release 10.2]
Information in this document applies to any platform.

PURPOSE

The purpose of this bulletin is to describe how to clone an existing Oracle10g Release 2 (10.2.0.x) RDBMS installation using Oracle Universal Installer (OUI). 

NOTE: This note should only be used for cloning single-instance (non-RAC) homes. It should not be used for cloning RAC, CRS or ASM homes.

SCOPE

This bulletin is intended for anyone who is responsible for installing Oracle software onto a server or cloning an existing Oracle software installation.

Please note that Perl 5.6 or higher is required when cloning Oracle10g Release 2

NOTE: When cloning an installation to a new/separate server, it is mandatory to check that the server meets all of the prerequisite requirements because the "perl clone.pl" cloning method (see Step 3 in the section below) does not check them. See Note:169706.1 or the Installation Guide for a list of these.

DETAILS

Step 1 
Install the software you want to clone into the "source" home. 

For Oracle10g Release 2, install the base software (10.2.0.1 for most platforms) then any required products from the Companion CD and (when available) any required patchsets and/or patches. 

Please note that if you are going to use the "perl clone.pl" method of cloning (see step 3) then you need to install the DB Console so that the required Perl files are installed in $ORACLE_HOME/clone/bin

If you are going to use the "./runInstaller -clone" method of cloning then DB Console is not required.

Step 2 
Make a copy of the existing (source) Oracle RDBMS installation. If the clone (target) installation is on the same server then the "cp -Rp" command could be used. 

Before copying the source installation you should shutdown any databases, listeners, agents etc. that are running from the source home (to ensure the integrity of the copy). 

For example:

cp -Rp /u01/app/oracle/product/10.2.0 /u01/app/oracle/product/10.2.0_clone

NOTE 1: It was previously recommended that customers run this command as the 'root' user (to make sure that the ownership of the files is preserved correctly) but it appears that this is not necessary.

NOTE 2: Parameters needed to maintain permissions may be different based on specific Operating System.  Always refer to man pages and verify permissions for your platform.

Alternatively, the source installation could be packed up using the "tar" command:

cd /u01/app/oracle/product/10.2.0 
tar -cvf /tmp/source.tar .

and then moved to the target area (on the same server, or another server) and unpacked:

cd /u01/app/oracle/product/10.2.0_clone 
tar -xvf /tmp/source.tar

NOTE: It was previously recommended that customers run this command as the 'root' user (to make sure that the ownership of the files is preserved correctly) but it appears that this is not necessary.

Step 3

With the ORACLE_HOME environment variable now pointing to the target home, run the following command from the target area to clone the installation with the Oracle Universal Installer (OUI)

cd $ORACLE_HOME/clone/bin 
perl clone.pl ORACLE_HOME="<target_home>" ORACLE_HOME_NAME="<unique_home_name>"

If no /etc/oraInst.loc (AIX, Linux) or /var/opt/oracle/oraInst.loc (Solaris, HP-UX) file exists on the server because Oracle has never been installed on the server before, create one. The file should contain a line like this:

inventory_loc=<path_to_oraInventory>


For example:

inventory_loc=/u01/app/oracle/oraInventory


If an oraInst.loc file exists on the server but is in a different location, edit the $ORACLE_HOME/clone/config/cs.properties file to add “–invPtrLoc <path>/oraInst.loc” to the clone_command_line.

This file can also be edited to add “-ignoreSysPrereqs” if required.

If clone.pl does not exist, you did not install DB Console (as instructed in step 1). You should either go back and install it in the source home then repeat step 2, or use the alternative method of cloning described below.

The alternative method of cloning (which does not require the DBConsole providing the Perl scripts) is to use the following commands:

cd $ORACLE_HOME/oui/bin 
./runInstaller -clone -silent -ignorePreReq ORACLE_HOME="<target_home>" ORACLE_HOME_NAME="<unique_home_name>"

If necessary, add "-invPtrLoc <path>/oraInst.loc" or "-ignoreSysPrereqs" to the command line.

NOTE: if the home you are trying to clone has products from the Companion CD installed, you must use the -ignorePreReq option as a workaround for a known bug. 

If the server has more than one Perl version installed, it may be necessary to specify the PERL5LIB environment variable so that the versions of the Perl modules match with the Perl version used. 

NOTE: if you are cloning an Oracle10gR2 Standard Edition installation, please review Note:416255.1 regarding a known issue 

Note that the full path for the target ORACLE_HOME should be provided (for example, /u01/app/oracle/product/10.2.0_clone) 

Also note that the home name must be unique (that is, it must not already exist in the central inventory file <path>/oraInventory/ContentsXML/inventory.xml). 

If no central inventory exists on the target server, OUI will create one 

NOTE: if you are cloning on a server which already has a central inventory and the target home already exists in <path>/oraInventory/ContentsXML/inventory.xml then you should run the following command to 'detach' this home from the central inventory before performing the clone operation:

./runInstaller -detachHome ORACLE_HOME=<target_home>

To clone an Oracle10g Release 2 client installation, run OUI directly:

./runInstaller -clone -silent -noconfig ORACLE_HOME="<target_home>" ORACLE_HOME_NAME="<unique_home_name>"

NOTE: If the privileged groups (SYSDBA and SYSOPER) in the source home were not the default ("dba") then after cloning you will need to follow steps 6, 7, 8 and 9 from Note:558478.1 so that the config.c/config.s in the target home references the required Unix groups and this information is built into the $ORACLE_HOME/bin/oracle binary in the target home.

Step 4 
On Unix/Linux installations, you will now need to run $ORACLE_HOME/root.sh (as root) from the target home 

Before running root.sh from the target home of a cloned 10.2.0.2 installation on HPUX, please review Note 375213.1 

On Unix/Linux platforms, you may (optionally) run $ORACLE_HOME/install/changePerm.sh

After cloning 10.2 on HPUX, SQL*Plus (or other applications) may report errors like this:

/usr/lib/pa20_64/dld.sl: Mmap failed for the library </u01/app/oracle/product/10.2.0/lib/libsqlplus.sl> : Bad address

Please review Note:344772.1 regarding this known issue

If you have cloned the installation to a separate server and you want to use the Database Control (dbconsole) application, refer to Note 467598.1 and Note 278100.1 for help with starting the console on the new server.

Notes

  • For Windows, use setup.exe (instead of runInstaller) to start OUI
  • Log files are created in the central inventory (<path>/oraInventory/logs) and in the target home ($ORACLE_HOME/clone/logs)

Known Issues:

After cloning a database, the dba_libraries view contains reference to old home. Refer MOS note 2145739.1 for details.

猜你喜欢

转载自blog.csdn.net/wll_1017/article/details/79504005