Cloning - DOC

Document Sample
Cloning - DOC Powered By Docstoc
					Before Starting to Clone:

Important: There are several steps to applying a rapid clone patch. Checking the recently applied patch list, or querying the AD_BUGS table, is not sufficient in verifying that the latest cloning code exists. Important: When applying a Rapid Clone patch using adpatch, ensure all of the following steps are performed:Apply the RapidClone patch using adpatch to Apps Tier nodes. Run AutoConfig on all Apps Tier nodes This will ensure the new templates supplied by the patch are instantiated. Rapid Clone scripts, such as, are also instantiated using the latest templates > $COMMON_TOP/admin/scripts/$CONTEXT_NAME/ appspass= Copy the new templates and code from the patch to the DB Tier Applying the Rapid Clone using adpatch will only deliver the templates and java code to the Apps Tiers, not the DB Tier, so this step is to collect the required files and copy them to the DB Tier:> perl $AD_TOP/bin/ This will collect the required templates and code,used by AutoConfig on the DB tier, and compress them into the $APPL_TOP/admin/out/ file. Copy and extract the to the RDBMS ORACLE_HOME > unzip –o Run AutoConfig on the DB Tier The new templates,scripts and java code are delivered by to the DB Tier. However, these still need to instantiated into the configuration files and scripts. To do this, run AutoConfig on the DB Tier. RapidClone scripts such as are also instantiated using the latest templates. > $ORACLE_HOME/appsutil/bin/ contextfile=$CONTEXT_FILE appspass=apps Once this step has been completed successfully, all the java .class files under RDBMS $ORACLE_HOME/appsutil/java/oracle should be identical to those under $JAVA_TOP/oracle. Important: If it is not immediately evident that the steps above have been followed, after applying a new AutoConfig or Rapid Clone patch, then do the steps again. Failure to do this may result in issues that have been resolved in a later version of the software.

Preparing Source System Rapid Clone Commands: DB Tier : > perl dbTier Apps Tier(s) : > perl appsTier The preparation phase collects information about the source system, creates a cloning stage area, and generates templates and drivers. All of these are to reconfigure the instance on a Target machine. Preclone will do the following: Convert Symbolic links All symbolic links pointing to a static path will be converted into relative paths Create templates Any files under the $ORACLE_HOME that contain system specific information, will be replicated and converted into a template. These templates are placed into the $ORACLE_HOME/appsutil/template directory. Create driver(s) A driver file, relating to these new templates is created called instconf.drv. This contains a list of all the templates and their locations, and the destination configuration files that these templates will create. This driver file is called instconf.drv and is placed into directory $ORACLE_HOME/appsutil/driverFor the appsTier, both the 8.0.6 and iAS ORACLE_HOMES will have the appsutil/template and appsutil/driver directories once the preclone stage is completed For the dbTier, these directories will already exist, but new templates and the new instconf.drv will be added Create Stage area A clone stage is created containing the required java code and scripts to reconfigure the instace on the Target machine Rapid Clone stage area: § dbTier : $ORACLE_HOME/appsutil/clone § appsTier(s) - $COMMON_TOP/clone The stage area(s) consist of the following directories:jre used to run the java code on the Target machine. bin contains the RapidClone scripts that can be run on the Target is the main cloning script is used to configure the Target system, this calls is used to clone a Source XML file manually is used to add a new node to the Patch History tables checks for existence of require O/S utils, cc, make, ar and ld jlib contains all the Rapid Clone java code, jdbc libraries etc context contains templates used for a Target XML file data (Database Tier only) contains the driver file, and templates used to generate the control file SQL script contains the template and list of datafiles on the Source addbhomsrc.xml contains information on the datafile mount points of the Source appl (Applications Tier only) this is used when merging appltops, i.e Multi-node to Single node cloning Important: The information in the stage area is only updated when running Whenever an AutoConfig or Rapid Clone patch is applied, and AutoConfig executed, it will not automatically update the stage area. Only will do this. The script must be run (after running AutoConfig) to ensure new code, templates and scripts are copied into the stage area before performing a clone. If this is not done, then the code used to configure the Target system will not be the code from the latest patches applied. This must be done on all nodes, db and appsTier(s). Executing will create a log file:Rapid Clone: dbTier$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/StageDBTier_xx.log appsTier$APPL_TOP/admin/$CONTEXT_NAME/log/StageAppsTier_xx.log Important: These log files will contain the $Header version of the class file used. Ensure this is the version delivered via the latest Rapid Clone patch. If it is not the latest version, ask customer to follow "Section 1: Before starting to clone" above, and rerun steps. Once this step has been completed successfully, all the java .class files under the following directories should be identical to those under $JAVA_TOP/oracle : o RDBMS $ORACLE_HOME/appsutil/java/oracle o RDBMS $ORACLE_HOME/appsutil/clone/jlib/java/oracle o $COMMON_TOP/clone/jlib/java/oracle If they are not, ensure to follow the pre-req AutoConfig steps, and rerun adpreclone on all DB and Apps Tier nodes.

Highly recommended: It is highly recommended customers rename any existing clone stage area, and allow RapidClone to create a new one. This should avoid any known issues that are be caused from old redundant files from a previous clone. On the DB Tier:Rename RDBMS $ORACLE_HOME/appsutil to $ORACLE_HOME/appsutil_old On the Apps Tier, run "perl $AD_TOP/bin/" Copy the to the RDBMS $ORACLE_HOME and unzip

Copy the Context file from RDBMS $ORACLE_HOME/appsutil_old to the new $ORACLE_HOME/appsutil Run AutoConfig on the DB Tier Do the "Prepare Source system" steps i.e "perl dbTier" On the Apps Tier:Rename $COMMON_TOP/clone to $COMMON_TOP/clone_old Rename 8.0.6 $ORACLE_HOME/appsutil to $ORACLE_HOME/appsutil_old Rename iAS $ORACLE_HOME/appsutil to $ORACLE_HOME/appsutil_old Do the "Prepare Source system" steps i.e "perl dbTier" Copy the files to the Target system When copying files to the Target, ensure the application tier files copied to the target system are owned by the target APPLMGR user, and that the database tier files are owned by the ORACLE user. When copying the datafiles, ensure the DB is shutdown cleanly prior to the copy. If there is any DB activity while the datafiles are copied, the clone will fail to recreate the control files with error:ORA-01194: file needs more recovery to be consistent

Configure Target system Rapid Clone Commands: DB Tier : > perl dbTier Apps Tier: > perl appsTier The configuration phase will reconfigure the copied instance after gathering the required information. The first step performed is the OS utility check ( This ensures make, cc, ld and ar executables are available in the PATH. CloneContext.class This will create the Target Context file from the values entered on the screen All the questions, values entered, results of the port availability check etc will be logged in a log file located in same location as the script:dbTier : $ORACLE_HOME/appsutil/clone/bin appsTier(s) : $COMMON_TOP/clone/bin Log files for this phase:dbTier:$ORACLE_HOME/appsutil/clone/bin/CloneContext_xxxxxx.logappsTier(s): $COMMON_TOP/clone/bin/CloneContext_xxxxxx.log

Both Tiers: $TMP/adclonectx.errIf any of the variables in the Target system Context file appear to be incorrect, then check this log file to see how the incorrect value arose. ApplyDBTier.class/ApplyAppsTier.class Once the XML is created, or passed as a parameter on the command line, then the configuration phase begins. This part will instantiate all the templates created during the preparation phase under: $ORACLE_HOME/appsutil/template. Templates to instantiate are located in driver file $ORACLE_HOME/appsutil/driver/instconf.drvLog files for this phase:dbTier: $ORACLE_HOME/appsutil/log//ApplyDBTier_xxxxxx.log appsTier(s): $APPL_TOP/admin//log/ApplyAppsTier_xxxxxx.log Relink the ORACLE_HOME(s) The executables in the ORACLE_HOME(s) will be relinked during the configuration phase. The commands used, and results of the relinking will displayed in log file : $ORACLE_HOME/install/make.log Create the Control files (DB Tier only) Once the templates are instantiated, and the ORACLE_HOME is relinked, then the control files can be recreated. The templates used here are located in $ORACLE_HOME/appsutil/clone/data/stage/ The files in this zip file are used to create a SQL file called adcrdbclone.sql This above SQL script is called from a shell script Both of the above scripts can be found under $ORACLE_HOME/appsutil/install/$CONTEXT_NAME If there are any problems creating the control files, then check the log files : $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/adcrdb_.txt $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTier_xxxxxx.log If this error is encountered:ORA-01194: file needs more recovery to be consistent refer to "Copy the files to the Target system" section above on why this problem occurs. AutoConfig The next phase will run AutoConfig using use the usual templates and drivers associated with AutoConfig on db or appsTier. The following log files will contain the information on the results of running AutoConfig $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/ApplyDBTier_xxxxxx.log $APPL_TOP/admin/$CONTEXT_NAME/log/ApplyAppsTier_xxxxxx.log Update the oraInventory (OracleHomeCloner.class) Once the Target instance is configured, it will update the Global Inventory will the locations of the new ORACLE_HOMES

The global inventory is found by checking the Inventory Pointer file. This can be found as follows : AIX and LINUX under : /etc/oraInst.locOther UNIX machines : /vat/opt/oracle/oraInst.locWINDOWS (Registry): HKEY_LOCAL_MACHINE\Software\Oracle\INST_LOC This Inventory pointer points to the location of the Global Inventory. The global inventory will be updated with the locations of the new iAS and RDBMS ORACLE_HOMES Any problems with this step will be detailed in the log files:/logs/OracleHomeCloner_.log /logs/apps------.log

Shared By: