Cloning steps:
How R12 Cloning scripts work.
On Source
adpreclone.pl –>
=> adpreclone.pl script prepares the source system to be cloned by collecting information about source system by creating a cloning stage area,
generate template and drivers from existing files that contain source specific hard coded value.
On Database node
adpreclone.pl dbTier –>
The directories that will be created in $ORACLE_HOME/appsutil/clone are : jlib, db, data
jlib –> Contains the libraries.
db –> Database tech stack information.
data –> Contains the information related to data files.
It also does the below tasks:
Creates driver files at $ORACLE_HOME/appsutil/driver/instconf.drv.
Converts inventory from binary to xml. The XML file is location at $ORACLE_HOME/appsutil/clone/context_name/sid_context.xml
Creates database control file script and datafile location information file at $ORACLE_HOME/appsutil/templateadcrdbclone.sql, dbfinfo.lst.
Generates database creation driver file at $ORACLE_HOME/appsutil/clone/data/driverdata.drv
Copy JDBC Libraries to $ORACLE_HOME/appsutil/clone/jlib.
On Application node
adpreclone.pl appsTier –>
This will create stage directory at $COMMON_TOP/clone. This runs in 2 steps.
Techstack ==>
Creates template files for $IAS_ORACLE_HOME/appsutil/template and 806 ORACLE_HOME/appsutil/template.
Creates driver files for $IAS_ORACLE_HOME/appsutil/driver/instconf.drv and 806 $ORACLE_HOME/appsutil/driver/instconf.drv.
APPL_TOP ==>
It will create application top driver file at $COMMON_TOP/clone/appl/driver/appl.drv.
Copy JDBC libraries and $COMMON_TOP/clone/jlib/classes111.zip
Advertisement
Privacy Settings
===========================================================
On Target
On Database node:
cd $ORACLE_HOME/appsutils/clone/bin
perl adcfgclone.pl dbTier –>
It creates a context file.
Register ORACLE_HOME
Configure ORACLE_HOME
Relink ORACLE_HOME
Recreate controlfile
Configure database
Start the database listener.
This will use the templates and driver files those were created while running adpreclone.pl on source system and has been copied to target system.
Following scripts are run by adcfgclone.pl dbTier for configuring techstack
->adchkutl.sh — This will check the system for ld, ar, cc, and make versions.
->adclonectx.pl — This will clone the context file. This will ceate a new context file as per the details of this instance.
->runInstallConfigDriver — located in $ORACLE_HOME/appsutil/driver/instconf.drv
-> Relinking $ORACLE_HOME/appsutil/install/adlnkoh.sh — This will relink ORACLE_HOME
For data on database side, following scripts are run
Driver file $ORACLE_HOME/appsutil/clone/context/data/driver/data.drv
Create database adcrdb.zip
Autoconfig is run
Control file creation adcrdbclone.sql
adcfgclone.pl dbTechStack –>
Create context file
Register ORACLE_HOME
Relink ORACLE_HOME
Configure ORACLE_HOME.
Start Database listener.
adcfgclone.pl dbconfig –>
It is used to configure the database with context file. Database should be in open mode.
On Application Node
perl adcfgclone.pl appsTier
Creates context file for target adclonectx.pl
Run driver files $ORACLE_HOME/appsutil/driver/instconf.drv and $IAS_ORACLE_HOME/appsutil/driver/instconf.drv
Relinking of Oracle Home $ORACLE_HOME/bin/adlnk806.sh and $IAS_ORACLE_HOME/bin/adlnkiAS.sh
Run $COMMON_TOP/clone/appl/driver/appl.drv and then runs autoconfig.
Clone using RMAN (2nd method).
- Running Pre-Clone on the Source Apps Tier
cd $ADMIN_SCRIPTS_HOME
perl adpreclone.pl appsTier
- Running Pre-Clone on the Source DB Tier
cd
perl adpreclone.pl dbtier
- Copying Application Tier from Source to Target
- Copying RDBMS Oracle Home from the Source To Target
connect to target db server with root user and copy databsae oracle home from source to target.
TARGET> scp -r root@source:/u01/oracle/product /u02/oracle/
Backing up to database online (with rman) :
Connect to source database using rman, and backup your database plus archive log in to the directory you want..
rman target /
backup device type disk format ‘/yedek/Bck_For_Clone/%d_full_%s_%p.bck’ database plus archivelog;
- Copying source database backup from Source to Target
- Configuring the ownership of the directories on the Target Servers
TARGET>
chown -R applmgr:dba /u01/fs2
chown -R oracle:dba /u01/oracle/
chown -R oracle:dba /u01/backup_sil/
Ensure oratab is writable by oracle (just in case)
ls -al /etc/oratab, and oraInst.loc is readable
- Configuring Oracle RDBMS on the Target Server
TARGET>
If your source database filesystem / paths are the same with your source filesystem, just ;
su – oracle
cd /u01/oracle/product/11.2.0.3/db
echo “. `pwd`/dberp_erpproddb.env ” >> /home/oracle/.bash_profile
exit
su – oracle
cd $ORACLE_HOME/bin
./relink all
Check the relink.log for the errors. Ensure there are no errors encountered during relink.
/u01/oracle/product/11.2.0.3/db/install/relink.log
If your source database filesystem / paths are the different than your source filesystem,
set your db environment and run relink all after that.
su – oracle
export ORACLE_SID=PREPROD
export PATH=$ORACLE_HOME/bin:$PATH
cd $ORACLE_HOME
export ORACLE_HOME=/u01/oracle/product/11.2.0.3/db
./relink all
Check the relink.log for the errors. Ensure there are no errors encountered during relink.
/u01/oracle/product/11.2.0.3/db/install/relink.log
- Duplicating/ Opening the cloned database on the Target Database Server
Connect to target , modify your pfile according to your needs, create an spfile and startup nomount your database with the new name on the target server.
Also set your db_file_name_convert, log_file_name_convert parameters before duplicating the db.
db_file_name_convert=(+DATA,/+DATAERMAN)
log_file_name_convert=(+DATA,+DATAERMAN)
SQL>startup nomount;
Connect to the auxilary and duplicate the database with the name by specifying the backup location which resides on your target server.
TARGET>
rman auxiliary /
RMAN>duplicate target database to “PREPROD” BACKUP LOCATION ‘/u01/backup_sil/Bck_For_Clone’;
- Running Post Clone in the Target Database Server.
cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
perl adcfgclone.pl dbTier
Copyright (c) 2011 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.7.1202010.2
Enter the APPS password :
Running:
- Running Post Clone in the Target Application Tier.
Before executing adcfgclone on AppsTier. Copy the application inventory directory from source to target, and make the necessary modifications in the /etc/oratab file to point to the oraInventory location residing on target server. Also configure the permission -> prevent null pointer exceptions during precheck phase of the post clone.
Note that: You must only have appl_top,common_top and 10.1.2 oracle_home in the target server. If you have copied FMW home ,too; then you will get FMW HOME found error in the beginning of post clone..
cd <COMMON_TOP>/clone/bin
- Running Pre-Clone on the Target Apps Tier
perl adcfgclone.pl appsTier
TARGET> login with applmgr
. /u01/EBSapps.env run
cd $ADMIN_SCRIPTS_HOME
sh adadminsrvctl.sh start
Note: weblogic admin server should be up before the execution of preclone script, preclone needs it.
perl adpreclone.pl appsTier
- Copying EBSpps directory from Run edition to patch edition (in this case fs2 to fs1) in the Target Application server.
First we create the patch directory , in this case it is fs1
mkdir -p /u01/fs1
Then we copy the run edition’s EBSApps directory keeping the softlinks ;
cp -RH /u01/fs2/EBSapps/ /u01/fs1/
- Running postclone on the Patch Edition of the Target Application server & fixing the errors.
unset your env.
cd /u01/fs1/EBSapps/comn/clone/bin (patch edition ‘s clone/bin)
perl adcfgclone.pl appsTier
- Starting our clone environment.
. /u01/EBSApps.env run
cd $ADMIN_SCRIPTS_HOME
sh adstrtal.sh apps/apps
That’s it… Our clone environment is up&running. Optionally, we can do other post clone stuff at this point.. I mean, we can change site name and color of the Forms screens, or we can mask our sensitive data etc..