Thursday, July 3, 2014

EBS 12.2 -- Cloning Step by Step -- Real-Life example

In this article , I will explain the cloning process in 12.2 by taking a real clone from an EBS 12.2.3 with split configuration to a single server environment. Also our source and target databases will be on ASM. Actually, as long as we have one server for db tier and one for  the application tier on the Source environment, the cloning process is the same as single to single cloning.
Also, ASM is involved in this example, but it doesnt bring us any difficulties as we use rman to duplicate our database tier on the clone environment.. We convert file paths , create the controlfile and make our database up&running automatically..
Note that: We dont deal with OS packages and Grid Home installations in this real life example, because we suppose those installations are already done by System Admins & Core Dba's.

For those who follow my blog will already my recent article about Cloning in 12.2
That is, in my earlier posts, I already explained the cloning process in 12.2 ..
You can reach the related article using the following url.. http://ermanarslan.blogspot.com.tr/2014/07/ebs-122-cloning-how-to-clone-ebs-122.html
It will help you understand the logic for different cloning scenarios .
At the same time, what you will find in this article will be more useful , as this article is based on an hands-on experience.


Okay,  in this real life example, we will clone our EBS Production environment to a environment called pre-prod.  In this example, you will see all the commands, command outputs and needed error corrections during a cloning process.



We have following phases in this cloning process:

  • Running Pre-Clone on the Source Apps Tier
  • Running Pre-Clone on the Source DB Tier
  • Copying Application Tier from Source to Target
  • Copying RDBMS Oracle Home from the Source To Target
  • Backing up to database online (with rman) 
  • Copying source database backup from Source to Target
  • Configuring the ownership of the directories on the Target Servers
  • Configuring Oracle RDBMS on the Target Server
  • Duplicating/ Opening the cloned database on the Target Database Server
  • Running Post Clone in the Target Database Server
  • Running Post Clone in the Target Application Tier
  • Running Pre-Clone on the Target Apps Tier
  • Copying EBSpps directory from Run edition to patch edition (in this case fs2 to fs1) in the Target Application server
  • Running postclone on the Patch Edition of the Target Application server & fixing the errors
  • Starting our clone environment

Running Pre-Clone on the Source Apps Tier:

SOURCE with applmgr user >

cd $ADMIN_SCRIPTS_HOME
perl adpreclone.pl appsTier
                     Copyright (c) 2011 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adpreclone Version 120.31.12020000.15

Enter the APPS User Password: 
Enter the Weblogic AdminServer password : 

 Checking the status of the Oracle WebLogic Administration Server....

 Running perl /apps/fs2/EBSapps/appl/ad/12.0.0/patch/115/bin/adProvisionEBS.pl ebs-get-serverstatus -contextfile=/apps/fs2/inst/apps/dberp_erpprod/appl/admin/dberp_erpprod.xml -servername=AdminServer -promptmsg=hide  

The Oracle WebLogic Administration Server is up.

Running:
perl /apps/fs2/EBSapps/appl/ad/12.0.0/bin/adclone.pl java=/apps/fs2/EBSapps/comn/util/jdk64 mode=stage stage=/apps/fs2/EBSapps/comn/clone component=appsTier method= appctx=/apps/fs2/inst/apps/dberp_erpprod/appl/admin/dberp_erpprod.xml showProgress 



 Setting the wls environment 

Beginning application tier Stage - Wed Jul  2 10:18:32 2014

/apps/fs2/EBSapps/comn/util/jdk64/bin/java -Xmx600M -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oui -classpath /apps/fs2/FMW_Home/webtier/lib/xmlparserv2.jar:/apps/fs2/FMW_Home/webtier/jdbc/lib/ojdbc6.jar:/apps/fs2/EBSapps/comn/java/classes:/apps/fs2/FMW_Home/webtier/oui/jlib/OraInstaller.jar:/apps/fs2/FMW_Home/webtier/oui/jlib/ewt3.jar:/apps/fs2/FMW_Home/webtier/oui/jlib/share.jar:/apps/fs2/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/apps/fs2/FMW_Home/webtier/jlib/ojmisc.jar:/apps/fs2/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/apps/fs2/FMW_Home/oracle_common/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.StageAppsTier -e /apps/fs2/inst/apps/dberp_erpprod/appl/admin/dberp_erpprod.xml -stage /apps/fs2/EBSapps/comn/clone -tmp /tmp -method CUSTOM   -showProgress -nopromptmsg 

Log file located at /apps/fs2/inst/apps/dberp_erpprod/admin/log/clone/StageAppsTier_07021018.log

  /     20% completed       

Completed Stage...

Running Pre-Clone on the Source DB Tier:

perl adpreclone.pl dbtier
                     Copyright (c) 2011 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adpreclone Version 120.31.12020000.4
adpreclone: unrecognized action specified: "dbtier"
[oracle@erpproddb dberp_erpproddb]$ perl adpreclone.pl dbTier

                     Copyright (c) 2011 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adpreclone Version 120.31.12020000.4

Enter the APPS User Password: 
Running:
perl /oracle/product/11.2.0.3/db/appsutil/bin/adclone.pl java=/oracle/product/11.2.0.3/db/appsutil/jre mode=stage stage=/oracle/product/11.2.0.3/db/appsutil/clone component=dbTier method=CUSTOM dbctx=/oracle/product/11.2.0.3/db/appsutil/dberp_erpproddb.xml showProgress 


Beginning database tier Stage - Wed Jul  2 10:40:30 2014

/oracle/product/11.2.0.3/db/appsutil/jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=false  -Doracle.installer.oui_loc=/oracle/product/11.2.0.3/db/oui -classpath /oracle/product/11.2.0.3/db/lib/xmlparserv2.jar:/oracle/product/11.2.0.3/db/jdbc/lib/ojdbc6.jar:/oracle/product/11.2.0.3/db/appsutil/java:/oracle/product/11.2.0.3/db/oui/jlib/OraInstaller.jar:/oracle/product/11.2.0.3/db/oui/jlib/ewt3.jar:/oracle/product/11.2.0.3/db/oui/jlib/share.jar:/oracle/product/11.2.0.3/db/oui/jlib/srvm.jar:/oracle/product/11.2.0.3/db/jlib/ojmisc.jar   oracle.apps.ad.clone.StageDBTier -e /oracle/product/11.2.0.3/db/appsutil/dberp_erpproddb.xml -stage /oracle/product/11.2.0.3/db/appsutil/clone -tmp /tmp -method CUSTOM    -showProgress
APPS Password : 
Log file located at /oracle/product/11.2.0.3/db/appsutil/log/dberp_erpproddb/StageDBTier_07021040.log

  /     50% completed       

Completed Stage...

Wed Jul  2 10:40:47 2014

Copying Application Tier from Source to Target:

connect to target application server with root user and copy the run edition filesystem from source to target.

TARGET> scp -r root@source:/u01/fs2 /u02

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;

piece handle=/yedek/Bck_For_Clone/DBERP_full_10_1.bck tag=TAG20140702T110301 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
Finished backup at 02-JUL-14

Copying source database backup from Source to Target:
connect to target db server with root user and copy database backup that we created in the previous steps,  from source to target.
 TARGET> scp -r root@soruce:/yedek/Bck_For_Clone /u01/backup_sil

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
Ex:
-rw-rw-r-- 1 oracle oinstall 779 Jul  1 14:31 /etc/oratab

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';

Note that: In oracle 11g, the duplication from the Target Database to the Auxiliary Database can be done using RMAN without connecting to the Target database or to a Catalog Database. If you have your full backup and if it accessible from the target server, then connect to auxiliary only and duplicate your database.

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:
/u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/../jre/bin/java -Xmx600M -cp /u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/java:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/xmlparserv2.jar:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/ojdbc5.jar oracle.apps.ad.context.CloneContext -e /u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/../context/db/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_27846.lst -stage /u01/oracle/product/11.2.0.3/db/appsutil/clone  2> /tmp/adcfgclone_27846.err; echo $? > /tmp/adcfgclone_27846.res

Log file located at /u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/CloneContext_0702143324.log

Provide the values required for creation of the new Database Context file.

Target System Hostname (virtual or normal) [erppreprod] : 

Target Instance is RAC (y/n) [n] : 

Target System Database SID : PREPROD

Target System Base Directory : /u01/oracle/product

Target System utl_file_dir Directory List : /tmp

Number of DATA_TOP's on the Target System [4] : 1

Target System DATA_TOP Directory 1 : +DATAERP

Target System RDBMS ORACLE_HOME Directory [/u01/oracle/product/11.2.0] : /u01/oracle/product/11.2.0.3/db

Do you want to preserve the Display [null] (y/n)  : n

Target System Display [erppreprod:0.0] : 

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] : 1

Checking the port pool 1
done: Port Pool 1 is free
Report file located at /u01/oracle/product/11.2.0.3/db/appsutil/temp/portpool.lst
Complete port information available at /u01/oracle/product/11.2.0.3/db/appsutil/temp/portpool.lst

Creating the new Database Context file from :
  /u01/oracle/product/11.2.0.3/db/appsutil/template/adxdbctx.tmp

The new database context file has been created :
  /u01/oracle/product/11.2.0.3/db/appsutil/PREPROD_erppreprod.xml

Log file located at /u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/CloneContext_0702143324.log
Check Clone Context logfile /u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/CloneContext_0702143324.log for details.

Running Rapid Clone with command:
Running:
perl /u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/adclone.pl java=/u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/../jre mode=apply stage=/u01/oracle/product/11.2.0.3/db/appsutil/clone component=dbTier method=CUSTOM dbctxtg=/u01/oracle/product/11.2.0.3/db/appsutil/PREPROD_erppreprod.xml showProgress contextValidated=true


Beginning database tier Apply - Wed Jul  2 14:34:43 2014

/u01/oracle/product/11.2.0.3/db/appsutil/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true  -Doracle.installer.oui_loc=/u01/oracle/product/11.2.0.3/db/oui -classpath /u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/xmlparserv2.jar:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/ojdbc6.jar:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/java:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/oui/OraInstaller.jar:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/oui/ewt3.jar:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/oui/share.jar:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/oui/srvm.jar:/u01/oracle/product/11.2.0.3/db/appsutil/clone/jlib/ojmisc.jar   oracle.apps.ad.clone.ApplyDBTier -e /u01/oracle/product/11.2.0.3/db/appsutil/PREPROD_erppreprod.xml -stage /u01/oracle/product/11.2.0.3/db/appsutil/clone   -showProgress
APPS Password : Log file located at /u01/oracle/product/11.2.0.3/db/appsutil/log/PREPROD_erppreprod/ApplyDBTier_07021434.log
  -     50% completed       

Completed Apply...
Wed Jul  2 14:37:46 2014

Starting database listener for PREPROD:
Running:
/u01/oracle/product/11.2.0.3/db/appsutil/scripts/PREPROD_erppreprod/addlnctl.sh start PREPROD
Logfile: /u01/oracle/product/11.2.0.3/db/appsutil/log/PREPROD_erppreprod/addlnctl.txt

You are running addlnctl.sh version 120.4


Starting listener process PREPROD ...


Listener PREPROD has already been started.


addlnctl.sh: exiting with status 0

addlnctl.sh: check the logfile /u01/oracle/product/11.2.0.3/db/appsutil/log/PREPROD_erppreprod/addlnctl.txt for more information ...  

After this point, our listener will be up & running , our db environment file will be created and fnd_nodes table will be cleared & the new db host will be added to that.

lsnrctl status PREPROD

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 02-JUL-2014 14:42:18

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=erppreprod)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     PREPROD
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                02-JUL-2014 14:36:44
Uptime                    0 days 0 hr. 5 min. 33 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/product/11.2.0.3/db/network/admin/PREPROD_erppreprod/listener.ora
Listener Log File         /u01/oracle/product/11.2.0.3/db/admin/PREPROD_erppreprod/diag/tnslsnr/erppreprod/preprod/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=erppreprod.erman.ermandom.com(PORT=1522)))
Services Summary...
Service "PREPROD" has 1 instance(s).
  Instance "PREPROD", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

cd $ORACLE_HOME
 ls -al |grep env
-rw-r--r--  1 oracle oinstall    4268 Jul  2 14:37 PREPROD_erppreprod.env

. $ORACLE_HOME/PREPROD_erppreprod.env.  ( you can source this environment in your .bash_profile)

sqlplus apps/apps;
SQL> select node_name,host from fnd_nodes;

NODE_NAME
------------------------------
HOST
--------------------------------------------------------------------------------
ERPPREPROD
erppreprod

Okay. At this point, we are done with the database, lets continue with the application configurations.

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
 perl adcfgclone.pl appsTier

                     Copyright (c) 2011 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adcfgclone Version 120.63.12020000.30

Enter the APPS password : 
Running:
/u01/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs2/EBSapps/comn/clone/jlib/java:/u01/fs2/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.clone.util.OPWrapper -encryptpwd /u01/fs2/EBSapps/comn/clone/bin/../FMW/tempinfoApps.txt

Enter the Weblogic AdminServer password : 
Running:
/u01/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs2/EBSapps/comn/clone/jlib/java:/u01/fs2/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.clone.util.OPWrapper /u01/fs2/EBSapps/comn/clone/bin/../FMW/tempinfo.txt
Running:
/u01/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs2/EBSapps/comn/clone/jlib/java:/u01/fs2/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.clone.util.OPWrapper /u01/fs2/EBSapps/comn/clone/bin/../FMW/EBSDataSource


Do you want to add a node (yes/no) [no] : 


Running:
/u01/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -cp /u01/fs2/EBSapps/comn/clone/jlib/java:/u01/fs2/EBSapps/comn/clone/jlib/xmlparserv2.jar:/u01/fs2/EBSapps/comn/clone/jlib/ojdbc5.jar:/u01/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs2/EBSapps/comn/clone/jlib/java:/u01/fs2/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.context.CloneContext -e /u01/fs2/EBSapps/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_12380.lst -stage /u01/fs2/EBSapps/comn/clone  2> /tmp/adcfgclone_12380.err; echo $? > /tmp/adcfgclone_12380.res

Log file located at /u01/fs2/EBSapps/comn/clone/bin/CloneContext_0702162307.log

Target System File Edition type [run] : 

Provide the values required for creation of the new APPL_TOP Context file.

Target System Hostname (virtual or normal) [erppreprod] : 

Target System Database SID : PREPROD

Target System Database Server Node [erppreprod] : 

Target System Database Domain Name [erman.ermandom.com] : 

Target System Base Directory : /u01

Target System Base Directory set to /u01

Target System Current File System Base set to /u01/fs2

Target System Other File System Base set to /u01/fs1

Target System Fusion Middleware Home set to /u01/fs2/FMW_Home

Target System Web Oracle Home set to /u01/fs2/FMW_Home/webtier

Target System Appl TOP set to /u01/fs2/EBSapps/appl

Target System COMMON TOP set to /u01/fs2/EBSapps/comn

Target System Instance Home Directory [/u01] : 

Target System Instance Top set to /u01/fs2/inst/apps/PREPROD_erppreprod

Do you want to preserve the Display [erpprod:0.0] (y/n)  : n

Target System Display [erppreprod:0.0] : 

Target System Root Service [enabled] : 

Target System Web Administration [enabled] : 

Target System Web Entry Point Services [enabled] : 

Target System Web Application Services [enabled] : 

Target System Batch Processing Services [enabled] : 

Target System Other Services [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] : 1

Checking the port pool 1
done: Port Pool 1 is free
Report file located at /u01/fs2/inst/apps/PREPROD_erppreprod/admin/out/portpool.lst
Complete port information available at /u01/fs2/inst/apps/PREPROD_erppreprod/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /usr/tmp
3. /u01/oracle/product/11.2.0.3/db/appsutil/outbound/PREPROD_erppreprod
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 

Creating the new APPL_TOP Context file from :
  /u01/fs2/EBSapps/comn/clone/context/apps/adxmlctx.tmp

The new APPL_TOP context file has been created :
  /u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml

Log file located at /u01/fs2/EBSapps/comn/clone/bin/CloneContext_0702162307.log
Check Clone Context logfile /u01/fs2/EBSapps/comn/clone/bin/CloneContext_0702162307.log for details.

Running Rapid Clone with command:
Running:
perl /u01/fs2/EBSapps/comn/clone/bin/adclone.pl java=/u01/fs2/EBSapps/comn/clone/bin/../jre mode=apply stage=/u01/fs2/EBSapps/comn/clone component=appsTier method=CUSTOM appctxtg=/u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml showProgress contextValidated=true



FMW Pre-requisite check log file location : /u01/fs2/EBSapps/comn/clone/FMW/logs/prereqcheck.log

Running: /u01/fs2/EBSapps/comn/clone/FMW/t2pjdk/bin/java -classpath /u01/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/engine.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereq.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereqChecks.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstaller.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstallerNet.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/srvm.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl2.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl-log4j.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/xmlparserv2.jar:/u01/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/share.jar:/u01/fs2/EBSapps/comn/clone/jlib/java oracle.apps.ad.clone.util.FMWOracleHomePreReqCheck -prereqCheckFMW -e /u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml -stage /u01/fs2/EBSapps/comn/clone -log /u01/fs2/EBSapps/comn/clone/FMW/logs/prereqcheck.log

Beginning application tier Apply - Wed Jul  2 16:23:45 2014

/u01/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /u01/fs2/EBSapps/comn/clone/jlib/xmlparserv2.jar:/u01/fs2/EBSapps/comn/clone/jlib/ojdbc6.jar:/u01/fs2/EBSapps/comn/clone/jlib/java:/u01/fs2/EBSapps/comn/clone/jlib/oui/OraInstaller.jar:/u01/fs2/EBSapps/comn/clone/jlib/oui/ewt3.jar:/u01/fs2/EBSapps/comn/clone/jlib/oui/share.jar:/u01/fs2/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/u01/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs2/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/u01/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.ApplyAppsTier -e /u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml -stage /u01/fs2/EBSapps/comn/clone    -showProgress -nopromptmsg 
Log file located at /u01/fs2/inst/apps/PREPROD_erppreprod/admin/log/clone/ApplyAppsTier_07021623.log
  \    100% completed       

Completed Apply...
Wed Jul  2 16:38:20 2014


 Executing command: /u01/fs2/EBSapps/10.1.2/bin/sqlplus @/u01/fs2/EBSapps/appl/ad/12.0.0/patch/115/sql/truncate_ad_nodes_config_status.sql


Do you want to startup the Application Services for PREPROD? (y/n) [n] : n

Services not started


Okay, after the post clone we have fs_ne directory in place, our environment selector file (EBSapps.env) is also created.

so we source the environment file . /u01/EBSapps.env and start our preclone process on the run edition filesystem of the target application server..

Running Pre-Clone on the Target Apps Tier:

TARGET> login with applmgr

.  /u01/EBSapps.env run
cd $ADMIN_SCRIPTS_HOME
sh adadminsrvctl.sh start ( our weblogic admin server should be up before the execution of preclone script, preclone needs it..)
perl adpreclone.pl appsTier


                     Copyright (c) 2011 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adpreclone Version 120.31.12020000.15

Enter the APPS User Password: 
Enter the Weblogic AdminServer password : 

 Checking the status of the Oracle WebLogic Administration Server....

 Running perl /u01/fs2/EBSapps/appl/ad/12.0.0/patch/115/bin/adProvisionEBS.pl ebs-get-serverstatus -contextfile=/u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml -servername=AdminServer -promptmsg=hide  

The Oracle WebLogic Administration Server is up.

Running:
perl /u01/fs2/EBSapps/appl/ad/12.0.0/bin/adclone.pl java=/u01/fs2/EBSapps/comn/util/jdk64 mode=stage stage=/u01/fs2/EBSapps/comn/clone component=appsTier method= appctx=/u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml showProgress 



 Setting the wls environment 

Beginning application tier Stage - Thu Jul  3 08:46:19 2014

/u01/fs2/EBSapps/comn/util/jdk64/bin/java -Xmx600M -DCONTEXT_VALIDATED=false -Doracle.installer.oui_loc=/oui -classpath /u01/fs2/FMW_Home/webtier/lib/xmlparserv2.jar:/u01/fs2/FMW_Home/webtier/jdbc/lib/ojdbc6.jar:/u01/fs2/EBSapps/comn/java/classes:/u01/fs2/FMW_Home/webtier/oui/jlib/OraInstaller.jar:/u01/fs2/FMW_Home/webtier/oui/jlib/ewt3.jar:/u01/fs2/FMW_Home/webtier/oui/jlib/share.jar:/u01/fs2/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/u01/fs2/FMW_Home/webtier/jlib/ojmisc.jar:/u01/fs2/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/u01/fs2/FMW_Home/oracle_common/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.StageAppsTier -e /u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml -stage /u01/fs2/EBSapps/comn/clone -tmp /tmp -method CUSTOM   -showProgress -nopromptmsg 

Log file located at /u01/fs2/inst/apps/PREPROD_erppreprod/admin/log/clone/StageAppsTier_07030846.log

  /     20% completed       
  \     20% completed       

Completed Stage...
Thu Jul  3 09:11:40 2014

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:
unset your env.
cd /u01/fs1/EBSapps/comn/clone/bin  (patch edition 's clone/bin)
perl adcfgclone.pl appsTier

Copyright (c) 2011 Oracle Corporation
                        Redwood Shores, California, USA

                        Oracle E-Business Suite Rapid Clone

                                 Version 12.2

                      adcfgclone Version 120.63.12020000.30

Enter the APPS password : 
Running:
/u01/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs1/EBSapps/comn/clone/jlib/java:/u01/fs1/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.clone.util.OPWrapper -encryptpwd /u01/fs1/EBSapps/comn/clone/bin/../FMW/tempinfoApps.txt

Enter the Weblogic AdminServer password : 
Running:
/u01/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs1/EBSapps/comn/clone/jlib/java:/u01/fs1/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.clone.util.OPWrapper /u01/fs1/EBSapps/comn/clone/bin/../FMW/tempinfo.txt
Running:
/u01/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -classpath /u01/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs1/EBSapps/comn/clone/jlib/java:/u01/fs1/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.clone.util.OPWrapper /u01/fs1/EBSapps/comn/clone/bin/../FMW/EBSDataSource


Do you want to add a node (yes/no) [no] : 


Running:
/u01/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -cp /u01/fs1/EBSapps/comn/clone/jlib/java:/u01/fs1/EBSapps/comn/clone/jlib/xmlparserv2.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojdbc5.jar:/u01/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs1/EBSapps/comn/clone/jlib/java:/u01/fs1/EBSapps/comn/clone/jlib/emCfg.jar oracle.apps.ad.context.CloneContext -e /u01/fs1/EBSapps/comn/clone/bin/../context/apps/CTXORIG.xml -validate -pairsfile /tmp/adpairsfile_5741.lst -stage /u01/fs1/EBSapps/comn/clone  2> /tmp/adcfgclone_5741.err; echo $? > /tmp/adcfgclone_5741.res

Log file located at /u01/fs1/EBSapps/comn/clone/bin/CloneContext_0703092807.log

Target System File Edition type [run] : patch

Enter the full path of Run File System Context file : /u01/fs2/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml

Provide the values required for creation of the new APPL_TOP Context file.

Target System Fusion Middleware Home set to /u01/fs1/FMW_Home

Target System Web Oracle Home set to /u01/fs1/FMW_Home/webtier

Target System Appl TOP set to /u01/fs1/EBSapps/appl

Target System COMMON TOP set to /u01/fs1/EBSapps/comn

Target System Instance Top set to /u01/fs1/inst/apps/PREPROD_erppreprod

Target System Port Pool [0-99] : 2

Checking the port pool 2
done: Port Pool 2 is free
Report file located at /u01/fs1/inst/apps/PREPROD_erppreprod/admin/out/portpool.lst
Complete port information available at /u01/fs1/inst/apps/PREPROD_erppreprod/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /usr/tmp
3. /u01/oracle/product/11.2.0.3/db/appsutil/outbound/PREPROD_erppreprod
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 

Creating the new APPL_TOP Context file from :
  /u01/fs1/EBSapps/comn/clone/context/apps/adxmlctx.tmp

The new APPL_TOP context file has been created :
  /u01/fs1/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml

Log file located at /u01/fs1/EBSapps/comn/clone/bin/CloneContext_0703092807.log
Check Clone Context logfile /u01/fs1/EBSapps/comn/clone/bin/CloneContext_0703092807.log for details.

Running Rapid Clone with command:
Running:
perl /u01/fs1/EBSapps/comn/clone/bin/adclone.pl java=/u01/fs1/EBSapps/comn/clone/bin/../jre mode=apply stage=/u01/fs1/EBSapps/comn/clone component=appsTier method=CUSTOM appctxtg=/u01/fs1/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml showProgress contextValidated=true



FMW Pre-requisite check log file location : /u01/fs1/EBSapps/comn/clone/FMW/logs/prereqcheck.log

Running: /u01/fs1/EBSapps/comn/clone/FMW/t2pjdk/bin/java -classpath /u01/fs1/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/engine.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereq.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereqChecks.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstaller.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstallerNet.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/srvm.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl2.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl-log4j.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/xmlparserv2.jar:/u01/fs1/EBSapps/comn/clone/prereq/webtier/oui/jlib/share.jar:/u01/fs1/EBSapps/comn/clone/jlib/java oracle.apps.ad.clone.util.FMWOracleHomePreReqCheck -prereqCheckFMW -e /u01/fs1/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml -stage /u01/fs1/EBSapps/comn/clone -log /u01/fs1/EBSapps/comn/clone/FMW/logs/prereqcheck.log

Beginning application tier Apply - Thu Jul  3 09:32:11 2014

/u01/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /u01/fs1/EBSapps/comn/clone/jlib/xmlparserv2.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojdbc6.jar:/u01/fs1/EBSapps/comn/clone/jlib/java:/u01/fs1/EBSapps/comn/clone/jlib/oui/OraInstaller.jar:/u01/fs1/EBSapps/comn/clone/jlib/oui/ewt3.jar:/u01/fs1/EBSapps/comn/clone/jlib/oui/share.jar:/u01/fs1/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs1/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/u01/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.ApplyAppsTier -e /u01/fs1/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml -stage /u01/fs1/EBSapps/comn/clone    -showProgress -nopromptmsg 
Log file located at /u01/fs1/inst/apps/PREPROD_erppreprod/admin/log/clone/ApplyAppsTier_07030932.log
  /    100% completed       

Completed Apply...
Thu Jul  3 09:46:32 2014

Skipping the starting of services
Enabling EBS_LOGON Trigger...

INFO :  Rapid Clone completed successfully , but the AutoConfig run recorded  some errors. 
Please review the AutoConfig section in the logfile.  and Re-Run the entire cloning cycle , after fixing the problem


Okay we completed the cloning but it seems that we have encountered a problem while running autoconfig..

Lets find that problem...

To find the cause of the error , we open the logfile of post clone, and search for autconfig related errors there..

vi /u01/fs1/inst/apps/PREPROD_erppreprod/admin/log/clone/ApplyAppsTier_07030932.log

Here, there is an important error in the 6th process of the Autoconfig..

AutoConfig Setup Phase
Running Setup Process 6 of 8 for AD_TOP
Executing script in InstantiateFile:
/u01/fs1/inst/apps/PREPROD_erppreprod/admin/install/afgcsreg.sh

script returned:
****************************************************

afgcsreg.sh started at Thu Jul  3 09:38:46 EEST 2014


The environment settings are as follows ...

       ORACLE_HOME : /u01/fs1/EBSapps/10.1.2
        ORACLE_SID :
          TWO_TASK : PREPROD_patch
              PATH : /u01/fs_ne/EBSapps/appl/ad/bin:/u01/fs1/FMW_Home/modules/org.apache.ant_1.7.1/bin:/u01/fs1/inst/apps/PREPROD_erppreprod/admin/scripts:/u01/fs1/FMW_Home/webtier/perl/bin:/u01/fs1/EBSapps/10.1.2/bin:/u01/fs1/EBSapps/appl/fnd/12.0.0/bin:/u01/fs1/EBSapps/appl/ad/12.0.0/bin:/u01/fs1/EBSapps/comn/util/jdk32/jre/bin:/u01/fs1/EBSapps/comn/util/jdk32/bin::/u01/fs1/EBSapps/10.1.2/OPatch:/u01/fs1/EBSapps/10.1.2/bin:/usr/bin:/usr/sbin:/u01/fs1/EBSapps/comn/util/jdk32/jre/bin:/u01/fs1/EBSapps/comn/clone/bin/../jre/bin:/u01/fs1/EBSapps/comn/clone/bin/../jre/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/applmgr/bin      Library Path : /u01/fs1/EBSapps/10.1.2/jdk/jre/lib/i386:/u01/fs1/EBSapps/10.1.2/jdk/jre/lib/i386/server:/u01/fs1/EBSapps/10.1.2/jdk/jre/lib/i386/native_threads:/u01/fs1/EBSapps/appl/cz/12.0.0/bin:/u01/fs1/EBSapps/10.1.2/lib32:/u01/fs1/EBSapps/10.1.2/lib:/usr/X11R6/lib:/usr/openwin/lib:/u01/fs1/EBSapps/10.1.2/jdk/jre/lib/i386:/u01/fs1/EBSapps/10.1.2/jdk/jre/lib/i386/server:/u01/fs1/EBSapps/10.1.2/jdk/jre/lib/i386/native_threads:/u01/fs1/EBSapps/appl/sht/12.0.0/lib

Executable : /u01/fs1/EBSapps/10.1.2/bin/sqlplus


SQL*Plus: Release 10.1.0.5.0 - Production on Thu Jul 3 09:38:47 2014

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Enter value for 1: Enter value for 2: Enter value for 3: ERROR:
ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

after that, similar  errors are coming like a rain :)

Uploading Metadata file /u01/fs1/EBSapps/appl/ad/12.0.0/admin/template/adctxinf.tmp
Metadata file /u01/fs1/EBSapps/appl/ad/12.0.0/admin/template/adctxinf.tmp upload failed.
Check log file created by FNDCPUCF program.
ERRORCODE = 1 ERRORCODE_END
.end std out.
APP-FND-01564: ORACLE error 12514 in AFPCOA

Cause: AFPCOA failed due to ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
.

The SQL statement being executed at the time of the error was:  and was executed from the file .
APP-FND-01564: ORACLE error 12514 in AFPCOA

Cause: AFPCOA failed due to ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
.
So,
It s searching for the service name PREPROD_patch to connect to the db..
Lets check our db site, lets check our listener if it is listening for the patching service..

lsnrctl status PREPROD

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 03-JUL-2014 10:19:28

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=erppreprod.erman.ermandom.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     PREPROD
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                02-JUL-2014 15:57:42
Uptime                    0 days 18 hr. 21 min. 45 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/product/11.2.0.3/db/network/admin/PREPROD_erppreprod/listener.ora
Listener Log File         /u01/oracle/product/11.2.0.3/db/admin/PREPROD_erppreprod/diag/tnslsnr/erppreprod/preprod/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=erppreproderman.ermandom.com)(PORT=1522)))
Services Summary...
Service "PREPROD" has 1 instance(s).
  Instance "PREPROD", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully


Opps, it doesnt listens for PREPROD_patch.

Lets make the listener to listen PREPROD_patch..

sqlplus "/as sysdba"
SQL>alter system set service_names='PREPROD','ebs_patch','PREPROD_patch' scope=memory;
System altered.
SQL> alter system set local_listener=PREPROD scope=memory;
System altered.
SQL> alter system register;
System altered.

lsnrctl status PREPROD

LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 03-JUL-2014 10:30:25

Copyright (c) 1991, 2011, Oracle.  All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=erppreprod.erman.ermandom.com)(PORT=1522)))
STATUS of the LISTENER
------------------------
Alias                     PREPROD
Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production
Start Date                02-JUL-2014 15:57:42
Uptime                    0 days 18 hr. 32 min. 43 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/oracle/product/11.2.0.3/db/network/admin/PREPROD_erppreprod/listener.ora
Listener Log File         /u01/oracle/product/11.2.0.3/db/admin/PREPROD_erppreprod/diag/tnslsnr/erppreprod/preprod/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=erppreprod.erman.ermandom.com)(PORT=1522)))
Services Summary...
Service "PREPROD" has 2 instance(s).
  Instance "PREPROD", status UNKNOWN, has 1 handler(s) for this service...
  Instance "PREPROD", status READY, has 1 handler(s) for this service...
Service "PREPROD_patch" has 1 instance(s).
  Instance "PREPROD", status READY, has 1 handler(s) for this service...
Service "ebs_patch" has 1 instance(s).
  Instance "PREPROD", status READY, has 1 handler(s) for this service...
The command completed successfully


Okay, Now it is listening for PREPROD_patch..

So , lets execute our post clone process again.. (because it says: Re-Run the entire cloning cycle , after fixing the problem)

First clean what we have done before and recreate the fs1 directory
rm -fR fs1/
ls
backup_sil  EBSapps.env  fs2  fs_ne  lost+found  oracle
mkdir fs1
cp -RH fs2/EBSapps/ fs1/

Then, re-execute  adcfgclone.pl appsTier from the patch edition filesystem.

/u01/fs1/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /u01/fs1/EBSapps/comn/clone/jlib/xmlparserv2.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojdbc6.jar:/u01/fs1/EBSapps/comn/clone/jlib/java:/u01/fs1/EBSapps/comn/clone/jlib/oui/OraInstaller.jar:/u01/fs1/EBSapps/comn/clone/jlib/oui/ewt3.jar:/u01/fs1/EBSapps/comn/clone/jlib/oui/share.jar:/u01/fs1/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/u01/fs1/EBSapps/comn/clone/jlib/ojmisc.jar:/u01/fs1/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/u01/fs1/EBSapps/comn/clone/jlib/obfuscatepassword.jar  oracle.apps.ad.clone.ApplyAppsTier -e /u01/fs1/inst/apps/PREPROD_erppreprod/appl/admin/PREPROD_erppreprod.xml -stage /u01/fs1/EBSapps/comn/clone    -showProgress -nopromptmsg 
Log file located at /u01/fs1/inst/apps/PREPROD_erppreprod/admin/log/clone/ApplyAppsTier_07031059.log
  -    100% completed       

Completed Apply...
Thu Jul  3 11:13:55 2014

Looking for incomplete CLONE record in ad_adop_session_patches table

The CLONE record status is no rows selected

Updating incomplete CLONE record to COMPLETED


Yes! This time ,it runs successful...

Now we are ready to start our cloned evironment..

Starting our clone environment:

Lastly we source our run environment and start our application services on the cloned 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..

19 comments :

  1. Hiç yorulmadınmı olum bunu yazarken :) . Neyse eline sağlık ... Apps tam bir bela dostum :)

    ReplyDelete
  2. Sadece bunu yazarken yoruldum Mustafa :) 12.2 de az konu kaldı ele almadığım. Onları da halledersem, önümüzdeki 2-3 sene yeni EBS işleri rahat gidecek.

    ReplyDelete
  3. Hi, I am completely new to EBS cloning. We have a production system and want to do some testing so we plan to do a clone to a new server. Do we need to install EBS on target server as well and then start the cloning process or just start the cloning and EBS cloning will take care of copying the binaries as well? Thanks for your wonderful post, it`s quite helpful.

    ReplyDelete
  4. Cloning involves, running preclone scripts , copying your apps tier, cloning your databsae (copy, or rman duplicate etc.) , running post clone scripts and taking some post actions(like masking , updating sensitive data, changin site name, running autoconfig to change the things if needed)
    So , when you clone you copy the binaries (both rdbms and apps tier)..
    But there are some exception scnearios .. One of these scenarios is that if your Source and Target platforms are different than eachother (for ex: source is solaris, target is linux)..
    If you have such an environment, then you need to install some of the binaries, like teckstack and rdbms software, taking necessary actions to convert the data between platforms etc..
    But having source and target different , is not recommended ..
    source and target must have the same OS.. (Rpm packages and limits disk sizes etc.. should be similar):

    anyways, thanks for you feedback.
    If you need further assistance , you can open an issue in to my forum and ask from there.
    http://ermanarslan.blogspot.com.tr/p/forum.html

    I give tech support from my forum.

    ReplyDelete
  5. Hi, thank you very much for your help, I really appreciate it. I was reading your other posts on this blog and found them quite useful. Thanks for that too for sharing your knowledge.

    ReplyDelete
  6. Thanks for your feedback.

    ReplyDelete
  7. Can fs_clone be used to copy the run filesystem to the patch filesystem - if the clone of the clone of the patch filesystem was unsuccessful?

    ReplyDelete
  8. No. fs_clone is a different thing.
    When you analyze the log file of adcfgclone.pl, you will see a lot of actions are undertaken by it.

    ReplyDelete
  9. Excellent post, saved my day with the cloning. I would probably move the patch listener step ahead in the documentation.

    ReplyDelete
  10. Excellent Blog and Definitely will helpful for the ebs DBA community, appreciated for effort to post a such a in details documentation.

    ReplyDelete
  11. Thank you all for your feedbacks.

    ReplyDelete
    Replies
    1. Hi Erman

      I have a doubt. If my target application is pre existing, then in that case to reduce the downtime, can I just rync the source application run file system with existing target run file system, run autoconfig and then run fs_clone to build the patch file system. Will this work.

      Thanks
      Samrat

      Delete
  12. Which directories will you synchronize using rsync? If you are talking about custom tops, then okay. If you are talking about entire APPL_TOP, it may be okay if you didnt apply any patch to your source system after you cloned it.
    In case of a FMW directories, you should test and see. Probably a postclone will be needed. There are configuration files there, they are required to be modified for the target site. So in general, it seems okay, sounds s okay, but need to be tested.

    ReplyDelete
  13. Hello,

    I wanted to know if it is necessary to down the application when it is up and running before copying the EBSapps folder to Patch edition.

    Thanks and Regards,
    Roshan

    ReplyDelete
  14. Hi Erman,

    Thanks alot for all your solutions which are making our DBA life's easy..i got the same Listener error so i implemented this solution and it worked previously i didn't get this kind of issue why since couple of time i am getting this error for patch FS clone, any permanent fix do we have, secondly before restarting patch fs clone again we need to clear patch fs entries from inventory.xml.

    Regards
    SHoeb

    ReplyDelete
  15. if you write the patch service name to init.ora/spfile, it won't be overwritten.

    ReplyDelete
  16. Question related to cloning of 12.2.6 (Delta 9) environment. Can we run adpreclone.pl appsTier on source when there is a patching cycle enabled (Till Before Cutover) ? If No till what phase we are still good to take adpreclone appsTier on source and then adcfgclone appsTier dualfs

    ReplyDelete
  17. Hi Emran,

    Can we provide Parameter file for the "Adcfgclone appsTier dualfs" command instead of entering them one by one ? what is the format of this file ? are there sample one ?

    Regards

    ReplyDelete

If you will ask a question, please don't comment here..

For your questions, please create an issue into my forum.

Forum Link: http://ermanarslan.blogspot.com.tr/p/forum.html

Register and create an issue in the related category.
I will support you from there.