This document offers step by step procedure to Clone Oracle EBS R12.2 instance database and application
1)Prepare Source instance, execute below on source system
Database Tier:
Oracle Home Backup – to be done on source
cd $ORACLE_HOME/appsutil/admin/clone/scripts
perl adpreclone.pl dbTier
Backup of Database – to be done on source
RMAN backup
Application Tier
cd $ADMIN_HOME_SCRIPTS – to be done on source
perl adpreclone.pl appsTier – to be done on source
2) Copy Backups to target instance (From Source to target)
3) Prepare Target system – to be done on Target
clean Oracle Inventory
4) Database Oracle Home Binaries Cloning – to be done on Target
a) clean source filesystem if not already done
b) move inventory
c) Run adcfgclone.pl dbTechStack to clone ORACLE_HOME - perl adcfgclone.pl dbTechStack
perl adcfgclone.pl dbTechStack
Copyright (c) 2002, 2015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.60
Enter the APPS password :
Running: Context clone...
Log file located at /erp_base/app/oracle/product/12.1.0.2/appsutil/clone/bin/CloneContext_0327115308.log
Provide the values required for creation of the new Database Context file.
Target System Hostname (virtual or normal) [erpdev01] :
Target System Domain Name :erpdev01.nizam.com
Target Instance is RAC (y/n) [n] :
Target System Database SID : ERPTEST
Target System Base Directory : /erp_base/app/oracle/product
Role separation is supported y/n [n] ? :
Target System utl_file_dir Directory List : /usr/tmp
Number of DATA_TOP's on the Target System [5] : 1
Target System DATA_TOP Directory 1 : /erp_data/oradata
Target System RDBMS ORACLE_HOME Directory [/erp_base/app/oracle/product/12.1.0] : /erp_base/app/oracle/product/12.1.0.2
Do you want to preserve the Display [:0.0] (y/n) : y
Do you want the target system to have the same port values as the source system (y/n) [y] ? : 8
Invalid input value. 'y' or 'n' required.
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 8
5) Create a new environment file clone.env and initPROD.ora file as below
-bash-4.4$ cat clone.env
export ORACLE_HOME=/erp_base/app/oracle/product/12.1.0.2
export 5ORACLE_LOCALPREFERENCE=$ORACLE_HOME/tools/admin
export PATH="$ORACLE_HOME/bin:/usr/bin:/usr/ccs/bin:/usr/sbin:$PATH"
export ORACLE_SID=PROD
-bash-4.4$ cat initPROD.ora
db_name = PROD
compatible = 12.1.0
control_files = /erp_data/oradata/cntrl01.dbf,/erp_data/oradata/cntrl02.dbf,/erp_data/oradata/cntrl03.dbf
*.db_create_file_dest='/erp_data/oradata'
*.DB_CREATE_ONLINE_LOG_DEST_1='/erp_data/oradata'
*.DB_CREATE_ONLINE_LOG_DEST_2='/erp_data/oradata'
*.memory_target=10G
*.remote_login_passwordfile='exclusive'
DB_FILES=2000
6) Source clone.env environmnet file and Startup the database PROD in nomount state
Sql>startup nomount pfile=$ORACLE_HOME/dbs/initPROD.ora
Duplicate the database using below link , in this case you can skip step 7,8,9 and 10
https://nizamappsdba.blogspot.com/2019/09/duplicate-database-from-rman-backup.html
Or you can continue with normal restore process as below
7) Restore the latest controlfile from backup as below
rman target /
rman>restore controlfile from '/erp_bkp/ctl/auto_c-51273575123712'
8) Restore the database - – to be done on Target
RUN{
SET NEWNAME FOR DATABASE TO '/erp_data/oradata/%b';
restore database;
switch datafile all;
recover database;
}
9) Validate redologfile, tempfile – to be done on Target
10) Change the Database name from PROD to new database name using NID and open the database in reset logs – to be done on Target
nid target=sys/**** DBNAME=ERPTEST LOGFILE=chnage_dbname.log
sqlplus>startup mount pfile=$ORACLE_HOME/dbs/initERPTEST.ora
sqlplus>alter database open resetlogs;
11) Application Tier cloning – to be done on Target
a) If run filesystem is on fs2 on the source then on the target also we should configure fs2 as run filesystem and automatically fs1 will become patch filesystem
we copy only EBSApps folder from source fs2 filesystem which is RUN filesystem, to target fs2 filesystem
bash-4.4$ perl adcfgclone.pl appsTier dualfs
Copyright (c) 2002, 2015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.60
Enter the APPS password :
Enter the Weblogic AdminServer password :
Do you want to add a node (yes/no) [no] :
Running: Context clone...
Log file located at /erp_appl/apps/ERPTEST/fs1/EBSapps/comn/clone/bin/CloneContext_0328144204.log
Provide the values required for creation of the new APPL_TOP Context file.
Target System Hostname (virtual or normal) [erpdev01] :
Target System Domain Name : erpdev01.nizam.com
Target System Database SID : ERPTEST
Target System Database Server Node [erpdev01] :
Target System Database Domain Name [erpdev01.nizam.com] :
Target System Base Directory : /erp_appl/apps/ERPTEST
Target System Base Directory set to /erp_appl/apps/ERPTEST
Target System Current File System Base set to /erp_appl/apps/ERPTEST/fs1
Target System Other File System Base set to /erp_appl/apps/ERPTEST/fs2
Target System Fusion Middleware Home set to /erp_appl/apps/ERPTEST/fs1/FMW_Home
Target System Other File System Fusion Middleware Home set to /erp_appl/apps/ERPTEST/fs2/FMW_Home
Target System Web Oracle Home set to /erp_appl/apps/ERPTEST/fs1/FMW_Home/webtier
Target System Other File System Web Oracle Home set to /erp_appl/apps/ERPTEST/fs2/FMW_Home/webtier
Target System Appl TOP set to /erp_appl/apps/ERPTEST/fs1/EBSapps/appl
Target System Other File System Appl TOP set to /erp_appl/apps/ERPTEST/fs2/EBSapps/appl
Target System COMMON TOP set to /erp_appl/apps/ERPTEST/fs1/EBSapps/comn
Target System Other File System COMMON TOP set to /erp_appl/apps/ERPTEST/fs2/EBSapps/comn
Target System Instance Home Directory [/erp_appl/apps/ERPTEST] :
Target System Current File System Instance Top set to /erp_appl/apps/ERPTEST/fs1/inst/apps/ERPTEST_erpdev01
Do you want to preserve the Display [erpdev01:0.0] (y/n) : n
Target System Display [erpdev01:0.0] :
Target System Root Service [enabled] :
Target System Web Entry Point Services [enabled] :
Target System Web Application Services [enabled] :
Target System Batch Processing Services [enabled] :
Target System Other Services [disabled] : enabled
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 8
Checking the port pool 8
done: Port Pool 8 is free
bash-4.4$ perl adcfgclone.pl appsTier dualfs
Copyright (c) 2002, 2015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.60
Enter the APPS password :
Enter the Weblogic AdminServer password :
Do you want to add a node (yes/no) [no] :
Running: Context clone...
Log file located at /erp_appl/apps/ERPTEST/fs1/EBSapps/comn/clone/bin/CloneContext_0328144204.log
Provide the values required for creation of the new APPL_TOP Context file.
Target System Hostname (virtual or normal) [au1634] :
Target System Domain Name : erpdev01.nizam.com
Target System Database SID : ERPTEST
Target System Database Server Node [erpdev01] :
Target System Database Domain Name [erpdev01.nizam.com] :
Target System Base Directory : /erp_appl/apps/ERPTEST
Target System Base Directory set to /erp_appl/apps/ERPTEST
Target System Current File System Base set to /erp_appl/apps/ERPTEST/fs1
Target System Other File System Base set to /erp_appl/apps/ERPTEST/fs2
Target System Fusion Middleware Home set to /erp_appl/apps/ERPTEST/fs1/FMW_Home
Target System Other File System Fusion Middleware Home set to /erp_appl/apps/ERPTEST/fs2/FMW_Home
Target System Web Oracle Home set to /erp_appl/apps/ERPTEST/fs1/FMW_Home/webtier
Target System Other File System Web Oracle Home set to /erp_appl/apps/ERPTEST/fs2/FMW_Home/webtier
Target System Appl TOP set to /erp_appl/apps/ERPTEST/fs1/EBSapps/appl
Target System Other File System Appl TOP set to /erp_appl/apps/ERPTEST/fs2/EBSapps/appl
Target System COMMON TOP set to /erp_appl/apps/ERPTEST/fs1/EBSapps/comn
Target System Other File System COMMON TOP set to /erp_appl/apps/ERPTEST/fs2/EBSapps/comn
Target System Instance Home Directory [/erp_appl/apps/ERPTEST] :
Target System Current File System Instance Top set to /erp_appl/apps/ERPTEST/fs1/inst/apps/ERPTEST_erpdev01
Do you want to preserve the Display [erpdev01:0.0] (y/n) : n
Target System Display [erpdev01:0.0] :
Target System Root Service [enabled] :
Target System Web Entry Point Services [enabled] :
Target System Web Application Services [enabled] :
Target System Batch Processing Services [enabled] :
Target System Other Services [disabled] : enabled
Do you want the target system to have the same port values as the source system (y/n) [y] ? : n
Target System Port Pool [0-99] : 8
Checking the port pool 8
done: Port Pool 8 is free
Report file located at /erp_appl/apps/ERPTEST/fs1/inst/apps/ERPTEST_erpdev01/admin/out/portpool.lst
UTL_FILE_DIR on database tier consists of the following directories.
1. /usr/tmp
2. /usr/tmp
3. /erp_base/app/oracle/product/12.1.0.2/appsutil/outbound/ERPTEST_erpdev01
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 1
The new APPL_TOP context file has been created :
/erp_appl/apps/ERPTEST/fs1/inst/apps/ERPTEST_erpdev01/appl/admin/ERPTEST_erpdev01.xml
Check Clone Context logfile /erp_appl/apps/ERPTEST/fs1/EBSapps/comn/clone/bin/CloneContext_0328144204.log for details.
Creating Patch file system context file.....
Log file located at /erp_appl/apps/ERPTEST/fs1/EBSapps/comn/clone/bin/CloneContextPatch_0328144839.log
Target System Other File System Instance Top set to /erp_appl/apps/ERPTEST/fs2/inst/apps/ERPTEST_erpdev01
Target System Port Pool [0-99] : 11
Checking the port pool 11
done: Port Pool 11 is free
Report file located at /erp_appl/apps/ERPTEST/fs2/inst/apps/ERPTEST_erpdev01/admin/out/portpool.lst
The new APPL_TOP context file has been created :
/erp_appl/apps/ERPTEST/fs2/inst/apps/ERPTEST_aerpdev01/appl/admin/ERPTEST_erpdev01.xml
Tags:
Oracle EBS Cloning
Hi
ReplyDeleteThanks for the article. Can you please let me know how to create a pairsfile.txt. I am planning to automate the clone process... Your help will be much appreciated...
perl adcfgclone.pl component=appsTier pairsfile=pairsfile.txt dualfs
Thanks
Kumar