Sunday 11 December 2016

Details of Adpreclone and Adcfgclone

What happens when we internally run adpreclone and adcfg ??

Below is the internal process happens when we fire those scripts. Simple and straight in an 
approachable way.


When you run this commnad adpreclone.pl dbTier . This will run in two steps Techstack and database.

Techstack:
It will create following directories in the ORACLE_HOME/appsutil/clone
Jlib, db, data where “Jlib” relates to libraries “db” will contain the techstack information, “data” will contain the information related to datafiles and required for cloning.
Creates driver files at ORACLE_HOME/appsutil/driver/instconf.drv

Converts inventory from binary to xml, the xml file is located at $ORACLE_HOME/appsutil/clone/context/db/Sid_context.xml

Prepare database for cloning:
This includes creating datbase control file script and datafile location information file at
$ORACLE_HOME/appsutil/template
adcrdbclone.sql, dbfinfo.lst

Generates database creation driver file at ORACLE_HOME/appsutil/clone/data/driver
data.drv

Copy JDBC Libraries at ORACLE_HOME/appsutil/clone/jlib/classes12.jar and appsoui

When Running adpreclone appsTier

This will create stage directory at $COMMON_TOP/clone. This also run in two steps.

Techstack:Creates template files for
Oracle_iAS_Home/appsutil/template
Oracle_806_Home/appsutil/template

Creates Techstack driver files for
IAS_ORACLE_HOME/appsutil/driver/instconf.drv
806_ORACLE_HOME/appsutil/driver/instconf.drv

APPL_TOP preparation:
-It will create application top driver file$COMMON_TOP/clone/appl/driver/appl.drv
-Copy JDBC libraries$COMMON_TOP/clone/jlib/classes111.zip

Now Shutdown all the services of Application and database for Copy the file System to target location

Configuring the target systemOnce it is done . Run as below adcfclone.pl for apps Tier and dbTier.

On database side:cd $ORACLE_HOME/appsutils/clone/binperl adcfgclone.pl dbTier pwd=apps
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

On Application Side:COMMON_TOP/clone/bin/perl adcfgclone.pl appsTier pwd=apps
Following scripts are run by adcfgclone.pl
Creates context file for target adclonectx.pl

Run driver files
$ORACLE_HOME/appsutil/driver/instconf.drv
$IAS_ORACLE_HOME/appsutil/driver/instconf.drv

Relinking of Oracle Home$ORACLE_HOME/bin/adlnk806.sh$IAS_ORACLE_HOME/bin/adlnkiAS.sh
At the end it will run the driver file $COMMON_TOP/clone/appl/driver/appl.drv and then runs autoconfig.

Thursday 8 December 2016

R12.2.x Rapid Clone: Application configuration 'perl adcfgclone.pl appsTier' : Oracle Homes are unregistered from the global inventory



Performing Rapid Clone on the application server resulted in an error within few minutes that I triggered 'adcfgclone.pl'. The issue is with Inventory.$ cd <COMMON_TOP>/clone/bin
$ perl adcfgclone.pl appsTier


Please note that 'fs2' is my RUN Edition in my environment.


Error from adcfgclone.pl:

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


Running: /wms/app/oracle/fs2/EBSapps/comn/clone/FMW/t2pjdk/bin/java -classpath /wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/engine.jar:



a/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereq.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraPrereqChecks.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstaller.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/OraInstallerNet.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/srvm.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl2.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/Scripts/ext/jlib/ojdl-log4j.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/xmlparserv2.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/prereq/webtier/oui/jlib/share.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/java oracle.apps.ad.clone.util.FMWOracleHomePreReqCheck -prereqCheckFMW -e /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/appl/admin/BERRY_PINK1.xml -stage /wms/app/oracle/fs2/EBSapps/comn/clone -log /wms/app/oracle/fs2/EBSapps/comn/clone/FMW/logs/prereqcheck.log




Beginning application tier Apply - Fri Jan 9 10:11:06 2015






/wms/app/oracle/fs2/EBSapps/comn/clone/bin/../jre/bin/java -Xmx600M -DCONTEXT_VALIDATED=true -Doracle.installer.oui_loc=/oui -classpath /wms/app/oracle/fs2/EBSapps/comn/clone/jlib/xmlparserv2.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/ojdbc6.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/java:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/OraInstaller.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/ewt3.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/oui/share.jar:/wms/app/oracle/fs2/FMW_Home/webtier/../Oracle_EBS-app1/oui/jlib/srvm.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/ojmisc.jar:/wms/app/oracle/fs2/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/wms/app/oracle/fs2/EBSapps/comn/clone/jlib/obfuscatepassword.jar oracle.apps.ad.clone.ApplyAppsTier -e /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/appl/admin/BERRY_PINK1.xml -stage /wms/app/oracle/fs2/EBSapps/comn/clone -showProgress -nopromptmsg



Log file located at /wms/app/oracle/fs2/inst/apps/BERRY_PINK1/admin/log/clone/ApplyAppsTier_01091011.log

| 0% completed

ERROR while running Apply...

Fri Jan 9 10:11:08 2015




ERROR: Failed to execute /wms/app/oracle/fs2/EBSapps/comn/clone/bin/adclone.pl






Please check logfile.



[applwms@PINK1 bin]$




Logfile (ApplyAppsTier_01091011.log):




#############################################################

Started ApplyAppsTier at Fri Jan 09 10:11:07 CST 2015

Version:

ApplyAppsTier.java : 120.11.12020000.6

#############################################################




Below Oracle Homes are already registered in the global inventory:



/wms/app/oracle/fs2/FMW_Home/Oracle_EBS-app1

/wms/app/oracle/fs2/FMW_Home/webtier

/wms/app/oracle/fs2/FMW_Home/oracle_common




Exiting Cloning...






Ensure that the above Oracle Homes are unregistered from the global inventory "/wms/app/oracle/oraInventory/ContentsXML/inventory.xml" and re-run adcfgclone.pl script






Solution:

Go to /wms/app/oracle/fs2/EBSapps/10.1.2/oui/bin (or $ORACLE_HOME/oui/bin) and run the following to unregister the Oracle Homes from the inventory.

$ cd $ORACLE_HOME/oui/bin
$ ./runInstaller -silent -deinstall REMOVE_HOMES={"/wms/app/oracle/fs2/FMW_Home/Oracle_EBS-app1"}$ ./runInstaller -silent -deinstall REMOVE_HOMES={"/wms/app/oracle/fs2/FMW_Home/oracle_common"}
$ ./runInstaller -silent -deinstall REMOVE_HOMES={"/wms/app/oracle/fs2/FMW_Home/webtier"}