Oracle Applications R12.2 Cloning
- Prepare Source Database tier for cloning
Log in to source machine as oracle user
Source $CONTEXT_NAME.env
Run preclone on source database tier
$ cd $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME
$ perl adpreclone.pl dbTier
- Configure target database
Log in to target machine as oracle user
Source $ORACLE_SID.env
Copy orapw$ORACLE_SID file from $ORACLE_SID/dbs on source to $ORACLE_SID/dbs on target
Update listener.ora and tnsnames.ora files on Source and target and check for the connectivity from both sides.
Connect to target application server(s) and bring down all the application services.
$ cd $ADMIN_SCRIPTS_HOME
$ adstpall.sh app/XXXXX
Connect to target database server and drop the existing database
$ sqlplus / as sysdba
SQL>create pfile from spfile;
SQL> shut immediate;
SQL> startup mount restrict;
SQL> drop database;
SQL> startup nomount;
Make sure the parameters are pointing to correct location.
- Duplicate database using RMAN
$rman target sys/passwd@<source tns alias name> auxiliary sys/passwd@<target tns alias name>
RMAN> run {
allocate channel tgt1 type disk;
allocate channel tgt2 type disk;
allocate channel tgt3 type disk;
allocate channel tgt4 type disk;
allocate auxiliary channel dup1 type disk;
allocate auxiliary channel dup2 type disk;
DUPLICATE TARGET DATABASE TO <Targetinstancename>
FROM ACTIVE DATABASE
NOFILENAMECHECK
;
}
- Clean up FND_NODES table
$ sqlplus apps/XXXXX
SQL> delete from fnd_nodes where node_name like ‘%Servernames%’; -- clean up source node names
SQL> delete from fnd_oam_context_files where node_name like ‘%Servernames%’; -- clean up source node names
- Run autoconfig on database node.
$ cd $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME
$ adautocfg.sh
- 6. Prepare Apps Tier
Log on to the primary node of the source application system as applmgr user
Source environment for Run Edition File system (APPS$CONTEXT_NAME.env)
Use following command to confirm File edition. It should return RUN/run
$ echo $FILE_EDITION
$ cd $ADMIN_SCRIPTS_HOME
$perl adpreclone.pl appsTier
- Configure target application (DUAL FILE SYSTEM – AD7 is the Pre Req) –
Log on to target application system as applmgr user
$ cd /u01/app/oracle/<sid> (/u01 or /u02)
$ rm –rf fs1 fs2 fs_ne
$ mkdir –p fs1/EBSapps
$ scp –r applmgr@source servername: /u01/app/oracle/<source application sid>/fs1/EBSapps/* .
Make sure the following directories are copied
$ 10.1.2 appl comn
- Run adcfgclone on target application server
$ cd /u01/app/oracle/<sid>/fs1/EBSapps/comn/clone/bin
$ perl adcfgclone.pl appsTier dualfs
Provide the input accordingly
Copyright (c) 2002, 2015 Oracle Corporation
Redwood Shores, California, USA
Oracle E-Business Suite Rapid Clone
Version 12.2
adcfgclone Version 120.63.12020000.56
Enter the APPS password :
Enter the Weblogic AdminServer password :
Do you want to add a node (yes/no) [no]:
Running: Context clone...
Target System Hostname (virtual or normal) [Application Server]: App server name
Target System Database SID: <SID>
Target System Database Server Node [DB Server name]: DB Server
Target System Database Domain Name [Domain name]:
Target System Base Directory: /u01/app/oracle/<sid> (Ex: <SID>, dev,trng,sccg,sccd,<SID>)
Target System Base Directory set to /u01/app/oracle/<SID>
Target System Current File System Base set to /u01/app/oracle/<SID>/fs1
Target System Other File System Base set to /u01/app/oracle/<SID>/fs2
Target System Fusion Middleware Home set to /u01/app/oracle/<SID>/fs1/FMW_Home
Target System Other File System Fusion Middleware Home set to /u01/app/oracle/<SID>/fs2/FMW_Home
Target System Web Oracle Home set to /u01/app/oracle/<SID>/fs1/FMW_Home/webtier
Target System Other File System Web Oracle Home set to /u01/app/oracle/<SID>/fs2/FMW_Home/webtier
Target System Appl TOP set to /u01/app/oracle/<SID>/fs1/EBSapps/appl
Target System Other File System Appl TOP set to /u01/app/oracle/<SID>/fs2/EBSapps/appl
Target System COMMON TOP set to /u01/app/oracle/<SID>/fs1/EBSapps/comn
Target System Other File System COMMON TOP set to /u01/app/oracle/<SID>/fs2/EBSapps/comn
Target System Instance Home Directory [/u01/app/oracle/<SID>]:
Target System Current File System Instance Top set to /u01/app/oracle/<SID>/fs1/inst/apps/<SID>_APP Server name
Do you want to preserve the Display [OLD Server name:0.0] (y/n): n
Target System Display [APP Server name: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]:
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]: pool (uat-1, <SID>-2, trng-3, dev-4)
Checking the port pool 2
done: Port Pool 2 is free
Report file located at /u01/app/oracle/<SID>/fs1/inst/apps/<SID>_APP Server name/admin/out/portpool.lst
UTL_FILE_DIR on database tier consists of the following directories.
/usr/tmp
/u01/app/oracle/product/12.1.0/db_1/outbound/<SID>_DB Server name
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:
/u01/app/oracle/<SID>/fs1/inst/apps/<SID>_APP Server name/appl/admin/<SID>_APP Server name.xml
Check Clone Context logfile /u01/app/oracle/<SID>/fs1/EBSapps/comn/clone/bin/CloneContext_0915092025.log for details.
Creating Patch file system context file.....
Log file located at /u01/app/oracle/<SID>/fs1/EBSapps/comn/clone/bin/CloneContextPatch_0915092153.log
Target System Other File System Instance Top set to /u01/app/oracle/<SID>/fs2/inst/apps/<SID>_APP Server name
Target System Port Pool [0-99]: 3 (primary pool +1)
Checking the port pool 3
done: Port Pool 3 is free
Report file located at /u01/app/oracle/<SID>/fs2/inst/apps/<SID>_APP Server name/admin/out/portpool.lst
The new APPL_TOP context file has been created:
/u01/app/oracle/<SID>/fs2/inst/apps/<SID>_APP Server name/appl/admin/<SID>_APP Server name.xml
Check Clone Context logfile /u01/app/oracle/<SID>/fs1/EBSapps/comn/clone/bin/CloneContextPatch_0915092153.log for details.
FMW Pre-requisite check log file location: /u01/app/oracle/<SID>/fs1/EBSapps/comn/clone/FMW/logs/prereqcheck.log
Running: FMW pre-req check...
Configuring: Run file system....
Configuring: Patch file system....
Clone completed. Do you want to start the services: Y/N
- Post steps
Reset passwords
Log on to target database server and source $CONTEXT_NAME.env file
$ sqlplus / as sysdba
SQL> alter user system identified by XXXXX;
SQL> alter user sys identified by XXXXX;
Disable concurrent request scheduled jobs
$ sqlplus apps/XXXXX
SQL> cmclean.sql
SQL> commit;
Cancel workflow scheduled jobs
$ sqlplus apps/XXXXX
SQL> UPDATE fnd_concurrent_requests
SET phase_code = 'C', status_code = 'D
WHERE 1 = 1
AND phase_code = 'P'
AND (status_code = 'I' OR status_code = 'Q')
AND concurrent_program_id NOT IN (SELECT concurrent_program_id
FROM fnd_concurrent_programs_tl
WHERE 1 = 1
AND user_concurrent_program_name IN ('Workflow Background Process',
'Workflow Control Queue Cleanup',
'Workflow Mailer Statistics Concurrent Program',
'Workflow Work Items Statistics Concurrent Program',
'Synchronize WF LOCAL tables',
'Workflow Agent Activity Statistics Concurrent Program',
'Workflow Directory Services User/Role Validation',
'Gather Schema Statistics'));
SQL> commit;
- Startup services
Log on to target application system and source EBSapps.env file
$ cd $ADMIN_SCRIPTS_HOME
$ adstrtall.sh apps/XXXXX
- Update XML publisher temporary directory
Login as system administrator and navigate as follow
XML Publisher Administrator Home Administration Configure General
Update temporary directory to local apps server directory
/u0/app/oracle/<instance name>
- Update APPS and SYSADMIN passwords
Update data source in weblogic
Login to weblogic console ->http://<hostname>:port/console
Login as weblogic admin (weblogic/password)
Navigate to data source on the left panel
Choose EBS data source
Choose connection pool
Update the password and save changes
Shutdown all application services
$ adstpall.sh apps/XXXXX
$FNDCPASS apps/<passwd> 0 y system/<passwd> system applsys <apps_passwd>
$FNDCPASS apps/<passwd> 0 y system/<passwd> user sysadmin <sysadmin_passwd>
Check LXXXXX.log for errors
Restart application services
$adstrtall.sh apps/XXXXX
- Update Weblogic Password
perl $FND_TOP/patch/115/bin/txkUpdateEBSDomain.pl -action=updateAdminPassword
- Workflow Override Address
SQL>$FND_TOP/sql/afsvcpup.sql
Choose 10006 and provide override address