Skip to main content

R12.2 Rapid Clone using cold backup

Database Tier

Because this is a cold backup of the database only need to run dbTier and it will do the rest for you. Thanks to Arty for this little jewel.

cd $ORACLE_HOME/appsutil/clone/bin
perl adcfgclone.pl dbTier

Application Tier

Run File System

In R12.2 it has some check on the oraInst file. Make sure its there with the valid locations.

vi /etc/oraInst.loc
inventory_loc=/u03/APPLTEST/oraInventory
inst_group=dba

Remove the oracle inventory directory that you reference in oraInst. You could deregister or start messing around with the xml file but I found it easier to simply delete the directory.

rm -rf /u03/APPLTEST/oraInventory

Check which is the run file system

grep s_file_edition_type /u03/APPLTEST/TEST/fs1/EBSapps/comn/clone/context/apps/TEST_erpapprod.xml
grep s_file_edition_type /u03/APPLTEST/TEST/fs2/EBSapps/comn/clone/context/apps/TEST_erpapprod.xml


Because this is a snapshot of PROD I have to remove some of the files that aren't required. Oracle suggest's copying the EBSapps but again quicker to mount a snapshot when using Netapp. I first move the files and delete them when the clone is running to save time

export BASE_FS=/u03/APPLTEST/TEST
export RUNFS=fs1
export PATCHFS=fs2
mv -v ${BASE_FS}/${RUNFS}/FMW_Home ${BASE_FS}/${RUNFS}/FMW_Home_remove
mv -v ${BASE_FS}/${RUNFS}/inst ${BASE_FS}/${RUNFS}/inst_remove
mv -v ${BASE_FS}/${PATCHFS} ${BASE_FS}/${PATCHFS}_remove
mkdir ${BASE_FS}/${PATCHFS}


Configure the run file system

cd ${BASE_FS}/${RUNFS}/EBSapps/comn/clone/bin
perl adcfgclone.pl appsTier

Enter the APPS password :
Enter the Weblogic AdminServer password :
Do you want to add a node (yes/no) [no] :
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) [oraaptest] :
Target System Database SID : TEST
Target System Database Server Node [oraaptest] : oradbtest
Target System Database Domain Name [site.com] :
Target System Base Directory : /u03/APPLTEST/TEST
Target System Base Directory set to /u03/APPLTEST/TEST
Target System Current File System Base set to /u03/APPLTEST/TEST/fs2
Target System Other File System Base set to /u03/APPLTEST/TEST/fs1
Target System Fusion Middleware Home set to /u03/APPLTEST/TEST/fs2/FMW_Home
Target System Web Oracle Home set to /u03/APPLTEST/TEST/fs2/FMW_Home/webtier
Target System Appl TOP set to /u03/APPLTEST/TEST/fs2/EBSapps/appl
Target System COMMON TOP set to /u03/APPLTEST/TEST/fs2/EBSapps/comn
Target System Instance Home Directory [/u03/APPLTEST/TEST] :
Target System Instance Top set to /u03/APPLTEST/TEST/fs2/inst/apps/TEST_oraaptest
Do you want to preserve the Display [erpapprod:0.0] (y/n)  : n
Target System Display [oraaptest:0.0] : oraaptest:1.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] : 20
Checking the port pool 20
done: Port Pool 20 is free
Report file located at /u03/APPLTEST/TEST/fs2/inst/apps/TEST_oraaptest/admin/out/portpool.lst
UTL_FILE_DIR on database tier consists of the following directories.
1. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 1
Do you want to startup the Application Services for TEST? (y/n) [n] : y


Patch File System

Copy run file system to patch file system

cp -r ${BASE_FS}/${RUNFS}/EBSapps ${BASE_FS}/${PATCHFS}

Configure the patch file system

. ${BASE_FS}/EBSapps.env patch
cd ${BASE_FS}/${PATCHFS}/EBSapps/comn/clone/bin
perl adcfgclone.pl appsTier 

Comments

Popular posts from this blog

Cancel or abort adop session

ADOP is in my opinion still pretty half baked. This is a critical tool that just isn't as intuitive as the old adpatch was. However we move with the times and get the hang of the new way of doing things. Along the way you might want to abort or cancel a patching cycling. With the two file systems and db editioning this can be a bit more to manage. I have learnt the hard way so you need to use the full cleanup after aborting a session.
adop phase=abort
adop phase=cleanup cleanup_mode=full

Creating new WLS domain ends with exit code 255

Cloning the instance I ran into this weird error. Was not sure what to do but after learning my lesson I dug through the error logs after seeing this in the adcfgclone log file.
START: Creating new WLS domain.
Running /u03/APPLYES/YES/fs2/FMW_Home/oracle_common/bin/pasteConfig.sh -javaHome /u03/APPLYES/YES/fs2/EBSapps/comn/util/jdk64 -al /u03/APPLYES/YES/fs2/EBSapps/comn/clone/FMW/WLS/EBSdomain.jar -tdl /u03/APPLYES/YES/fs2/FMW_Home/user_projects/domains/EBS_domain_YES -tmw /u03/APPLYES/YES/fs2/FMW_Home -mpl /u03/APPLYES/YES/fs2/EBSapps/comn/clone/FMW/WLS/plan/moveplan.xml -ldl /u03/APPLYES/YES/fs2/inst/apps/YES_erpapyes/admin/log/clone/wlsT2PApply -silent true -debug true -domainAdminPassword /u03/APPLYES/YES/fs2/EBSapps/comn/clone/FMW/tempinfo.txt
Script Executed in 1903 milliseconds, returning status 255
ERROR: Script failed, exit code 255

Dig a bit deeper into the log files
cd /u03/APPLYES/YES/fs2/inst/apps/YES_erpapyes/admin/log/clone/wlsT2PApply
cat CLONE2016-01-10_04-37-11PM.log

Failed to initialize the application 'EBSDataSource' due to error weblogic.application.ModuleException after FNDCPASS apps change

Started testing password changes in our clone environments. Weblogic seems to love throwing you curve balls and when I changes the apps password with the below:
FNDCPASS apps/$APPS_PASS 0 Y system/system SYSTEM APPLSYS $APPS_PASS
I was not able to start the weblogic managed servers. A look in the log an I found this:

weblogic.application.ModuleException:
        at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:327)
        at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
        at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
        at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
        at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
        at weblogic.application.internal.BaseDep…