Monday, November 18, 2013

CLONING 11I APPS

Well, today my post is that another important and useful utility which apps dba perform quite often i.e. Cloning Oracle Application 11i Instance. Cloning is the act of creating an identical copy of an already existing Oracle Applications system for Test/Development instances.
Simply copying all of the components from source to target system does not provide us a working Oracle Applications system, there are various configuration files that must be changed & for this purpose we do Cloning. Do keep in mind that the new system & the existing system must have same component versions & operating system type (You can’t clone from windows to linux or Solaris).
Performing Cloning prerequisites steps:
We need to perform certain prerequisites steps before cloning the source system:
STEP 1. Login as Applications file user & run the environment file.
STEP 2. We need to check certain software component versions:
(i) Check the version of perl, it should be atleast 5.005 or above.
To check perl version, Type the following command-
$ perl -v
Make sure that perl is included in the PATH (environment variable of user; echo $PATH).
(ii) Check the version of JRE & JDK which should be atleast 1.1.8 & 1.3.1 or above respectively. for this type:
$ java -version
(iii) Check the version of zip which should be atleast 2.3 or above.for this type :
$ zip
If you don’t have following versions, upgrade these software components as per the operating system.
STEP 3: It is recommendedto apply the latest AD Minipack & the latest AutoConfig Template patch as mentioned in the metalink note 230672.1 but not necessary.
STEP 4: Then we check whether latest Rapid Clone patch is there or not, for this we query the database whether latest Rapid Clone patch and other prerequisite patches as mentioned in the metalink document 230672.1 as follows:
$ select * from AD_BUGS where bug_number='number';
If it shows ” no rows selected ” that means you need to apply the patch. Do ensure that you apply all the patches as per the requirement.
STEP 5: If your system is autoconfig enable configure the application tier by running the adautocfg.sh script as follows:
$ cd $COMMON_TOP/admin/scripts/CONTEXT_NAME/
$adautocfg.sh
If your system is not autoconfig enable then set up the autoconfig on application tier with the help of metalink document 165195.1 ( Migrating to AutoConfig on the Applications Tier).
NOTE:

  • To check whether your system is AutoConfig enable or not , open any configuration file, if you see the text “This file is automatically generated by AutoConfig….”at the top,this mean your system is autoconfig enabled.
  • Also all the applications after 11.5.7 are autoconfig enabled.
STEP 6:Now we set up AutoConfig on the database tier. For this we need to copy AutoConfig to the RDBMS ORACLE_HOME as follows:
• login as Applmgr . Set up the environment file & create appsutil.zip file in AD_TOP by typing the following command:
$ perl $AD_TOP/bin/admkappsutil.pl
This creates appsutil.zip in the $APPL_TOP/admin/out directory.
• Now login as Oracle on the database tier & copy the appsutil.zip file to the and unzip it:
$ cd
$ cp $APPL_TOP/admin/out/appsutil.zip
$ unzip -o appsutil.zip (Option -o will overwrite any existing appsutil directory in database ORACLE_HOME)
Now run AutoConfig on the database tier:
$ cd /appsutil/scripts//adautocfg.sh

difference between Rollup patch and family pack

Rollup patches are usually cumulative collections of one-off patches for an individual product.
Family pack patches are collections of patches for a set of related products (a product family).

Rollup patches are usually smaller than family pack patches, and therefore take less time to apply.
Family pack can patches often contain or supersede related rollup patches. However, because they have broader impact, family pack patches are usually released less frequently than rollup patches.


 Rollup Patch (RUP): An aggregation of patches that may be at the functional level, or at a specific product/family release level. For example, a Flexfields rollup patch contains all the latest patches related to Flexfields at the time the patch was created. A Marketing Family 11.5.10 rollup patch contains all the latest Marketing patches released since, and applicable to 11.5.10

Family Pack: An aggregation of patches at the product family level. Family product codes always end in "_PF" and family packs are given alphabetical sequence such as 11i.HR_PF.B, 11i.HR_PF.C, and 11i.HR_PF.D. Family packs are cumulative. In other words, Discrete Manufacturing Family Pack G (11i.DMF_PF.G) contains everything in 11i.DMF_PF.F, which contains everything in 11i.DMF_PF.E, and so on.

If you search the rollup patch thru Metalink, it would tell you whether it is included in any other patchset (i.e. Family Pack) or not.


anything that encompasses more a group of applications/products is a family pack. For example, a Financials Family Pack could have files/updates/bug fixes for GL, AP, AR, etc. but a AP rollup patch will have it for AP only.

In addition to this if you run patchsets.sh, you will get a very good idea of how Oracle separates these ou

How to find log files locations in 11i and R12

How to find log files locations in 11i and R12




The following log files location could help you to find-out issues and errors from your application 11i instance.

Database Tier Logs are

Alert Log File location:
$ORACLE_HOME/admin/$CONTEXT_NAME/bdump/alert_$SID.log

Trace file location:
$ORACLE_HOME/admin/SID_Hostname/udump

Application Tier Logs

Start/Stop script log files location:
$COMMON_TOP/admin/log/CONTEXT_NAME/ 

OPMN log file location
$ORACLE_HOME/opmn/logs/ipm.log

Apache, Jserv, JVM log files locations:
$IAS_ORACLE_HOME/Apache/Apache/logs/ssl_engine_log
$IAS_ORACLE_HOME/Apache/Apache/logs/ssl_request_log
$IAS_ORACLE_HOME/Apache/Apache/logs/access_log
$IAS_ORACLE_HOME/Apache/Apache/logs/error_log
$IAS_ORACLE_HOME/Apache/JServ/logs

Concurrent log file location:
$APPL_TOP/admin/PROD/log or $APPLLOG/$APPLCSF

Patch log file location:
$APPL_TOP/admin/PROD/log

Worker Log file location:
$APPL_TOP/admin/PROD/log

AutoConfig log files location:
Application Tier:
$APPL_TOP/admin/SID_Hostname/log//DDMMTime/adconfig.log

Database Tier:
$ORACLE_HOME/appsutil/log/SID_Hostname/DDMMTime/adconfig.log

Error log file location:
Application Tier:
$APPL_TOP/admin/PROD/log

Database Tier :
$ORACLE_HOME/appsutil/log/SID_Hostname



In Oracle Applications R12, the log files are located in $LOG_HOME (which translates to $INST_TOP/logs)
Below list of log file locations could be helpful for you:

Concurrent Reqeust related logs
$LOG_HOME/appl/conc - > location for concurrent requests log and out files
$LOG_HOME/appl/admin - > location for mid tier startup scripts log files

Apache Logs (10.1.3 Oracle Home which is equivalent to iAS Oracle Home - Apache, OC4J and OPMN)
$LOG_HOME/ora/10.1.3/Apache - > Location for Apache Error and Access log files
$LOG_HOME/ora/10.1.3/j2ee - > location for j2ee related log files
$LOG_HOME/ora/10.1.3/opmn - > location for opmn related log files

Forms & Reports related logs (10.1.2 Oracle home which is equivalent to 806 Oracle Home)
$LOG_HOME/ora/10.1.2/forms
$LOG_HOME/ora/10.1.2/reports

Startup/Shutdown Log files location:
$INST_TOP/apps/$CONTEXT_NAME/logs/appl/admin/log

Patch log files location:
$APPL_TOP/admin/$SID/log/ 

Clone and AutoConfig log files location in Oracle E-Business Suite Release 12 

Logs for the adpreclone.pl are located: 
On the database tier: 
RDBMS $ORACLE_HOME/appsutil/log/< context >/StageDBTier_< timestamp >.log 

On the application tier: 
$INST_TOP/admin/log/StageAppsTier_< timestamp >.log 

Where the logs for the admkappsutil.pl are located? 
On the application tier: 
$INST_TOP/admin/log/MakeAppsUtil_< timestamp >.log 

Logs for the adcfgclone.pl are located:

On the database tier: 
RDBMS $ORACLE_HOME/appsutil/log/< context >/ApplyDBTier_< timestamp >.log 

On the application tier: 
$INST_TOP/admin/log/ApplyAppsTier_< timestamp >.log 
Logs for the adconfig are located: 

On the database tier: 
RDBMS $ORACLE_HOME/appsutil/log/< context >/< timestamp >/adconfig.log 
RDBMS $ORACLE_HOME/appsutil/log/< context >/< timestamp >/NetServiceHandler.log 

On the application tier: 
$INST_TOP/admin/log/< timestamp >/adconfig.log 
$INST_TOP/admin/log/< timestamp >/NetServiceHandler.log

Cheers!

Cloning Oracle Application 11.5.9 system

Cloning Oracle Application 11.5.9 system

These are the basic cloning steps for any version.
The output will be a little different with a new version, for examle: java versions will be different and the location of the logs and adclone scripts will be diffrent, but it's all basically the same. You clone the database then the Apps tier.

Cloning
DB Tier

 

Make sure you run exec FND_CONC_CLONE.SETUP_CLEAN; on the new database after it's created
  1. The term source system refers to the production system and the term target system refers to the development or test system that is to be refreshed/cloned.
  2. Copy the Source System to the Target System
    Copy the application tier file system from the source Applications system to the target node by executing the following steps in the order listed.  Ensure the application tier files copied to the target system are owned by the target APPLMGR user, and that the database tier files are owned by the ORACLE user.
    1. Copy the application tier file system
      Log on to the source system application tier nodes as the APPLMGR user.
      • Shut down the application tier server processes
      • Copy the following application tier directories from the source node to the target application tier node:
        • <APPL_TOP>
        • <COMMON_TOP>/html
        • <COMMON_TOP>/java
        • <COMMON_TOP>/util
        • <COMMON_TOP>/clone
        • <806 ORACLE_HOME>
        • <iAS ORACLE_HOME>
    2. Copy the database tier file system
      Log on to the source system database node as the ORACLE user.
      • Copy the database (DBF) files from the source to the target system
      • Copy the source database ORACLE_HOME to the target system
  1. Configure the Target System
    Execute the following commands to configure the target system. You will be prompted for the target system specific values (SID, Paths, Ports, etc)

    1. Configure the target system database server
      Log on to the target system as the ORACLE user and type the following commands to configure and start the database:
         cd <RDBMS ORACLE_HOME>/appsutil/clone/bin
         perl ./adcfgclone.pl dbTier
    2. Please note choose the pool set to be <database port > -1 eg:IF you need 1522 for your database tns port then choose port pool set 1.
Typical output
Enter the APPS password [APPS]:
APPS
First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:
Provide the values required for creation of the new Database Context file. Hit enter to use the default value in brackets [].
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target system database SID [PROD]:TEST
Target system domain name [advisor.com]:
Target system RDBMS ORACLE_HOME directory [/u02/oracle/proddb/9.2.0]:/u02/oracle/testdb/9.2.0
Target system utl_file accessible directories list [/usr/tmp/PROD]:/usr/tmp/TEST
Number of DATA_TOP's on the target system [4]:
Target system DATA_TOP 1 [/u03/oracle/proddata]:/u03/oracle/testdata
Target system DATA_TOP 2 [/u04/oracle/proddata]:/u04/oracle/testdata
Target system DATA_TOP 3 [/u05/oracle/proddata]:/u05/oracle/testdata
Target system DATA_TOP 4 [/u06/oracle/proddata]:/u06/oracle/testdata
Do you want to preserve the Display set to seouldb1:0.0 (y/n) [y] ?:
Clone Context uses the same port pool mechanism as the Rapid Install
Once you choose a port pool, Clone Context will validate the port availability.
Enter the port pool number [0-99]:
1
Checking the port pool 1
done: Port Pool 1 is free
Database port is 1522
Backing up /u02/oracle/testdb/9.2.0/appsutil/TEST_seouldb1.xml to /u02/oracle/testdb/9.2.0/appsutil/TEST_seouldb1.xml0.bak
Creating the new Database Context file from :
/u02/oracle/testdb/9.2.0/appsutil/template/adxdbctx.tmp
The new database context file has been created :
/u02/oracle/testdb/9.2.0/appsutil/TEST_seouldb1.xml
Log file located at /u02/oracle/testdb/9.2.0/appsutil/clone/bin/CloneContext_11020154.log
Running Rapid Clone with command:
perl ./adclone.pl java=./../jre/1.3.1 mode=apply stage=/u02/oracle/testdb/9.2.0/appsutil/clone/bin/.. component=dbTier metho
d=CUSTOM dbctxtg=/u02/oracle/testdb/9.2.0/appsutil/TEST_seouldb1.xml  showProgress contextValidated=true
Beginning database tier Apply - Tue Nov  2 01:55:12 2004
Log file located at /u02/oracle/testdb/9.2.0/appsutil/log/TEST_seouldb1/ApplyDBTier_11020155.log

Completed Apply...
Tue Nov  2 01:59:08 2004
Beginning APPSDB_TEST registration to central inventory...
ORACLE_HOME NAME   : APPSDB_TEST
ORACLE_HOME PATH   : /u02/oracle/testdb/9.2.0
INVENTORY LOCATION : /var/opt/oracle/oraInst.loc
Log file located at /u02/oracle/testdb/9.2.0/logs/OracleHomeCloner_11020159.log
Starting database listener for TEST:
Running:
/u02/oracle/testdb/9.2.0/appsutil/scripts/TEST_seouldb1/addlnctl.sh start TEST
You are running addlnctl.sh version 115.3
Starting listener process TEST ...
Listener TEST has already been started.
addlnctl.sh: exiting with status 0


Cloning Apps Tier
Apps Tier
    1. Finishing Tasks
      • Update profile options
        • Site name
        • Default printer if applicable
      • Update printer settings
      • Update workflow configuration settings – if applicable
Verify the APPLCSF variable setting
    1. Configure the target system application tier server nodes
      Log on to the target systems as the APPLMGR user and type the following commands:
               cd <COMMON_TOP>/clone/bin
          perl ./adcfgclone.pl appsTier
Typical output
Enter the APPS password [APPS]:
apps
First Creating a new context file for the cloned system.
The program is going to ask you for information about the new system:

Provide the values required for creation of the new APPL_TOP Context file.
Do you want to use a virtual hostname for the target node (y/n) [n] ?:
Target system database SID [PROD]:TEST
Target system domain name [advisors.hal]:
Target system database server node [seouldb1]:
Does the target system have more than one application tier server node (y/n) [n] ?:
Is the target system APPL_TOP divided into multiple mount points (y/n) [n] ?:
Target system APPL_TOP mount point [/u01/oracle/prodappl]:/u01/oracle/testappl
Target system COMMON_TOP directory [/u03/oracle/prodcomn]:/u03/oracle/testcomn
Target system 8.0.6 ORACLE_HOME directory [/u01/oracle/prodora/8.0.6]:/u01/oracle/testora/8.0.6
Target system iAS ORACLE_HOME directory [/u01/oracle/prodora/iAS]:/u01/oracle/testora/iAS
Do you want to preserve the Display set to seouldb1:0.0 (y/n) [y] ?:
Location of JDK 1.3.1 on the target system [/usr/j2se]:
Clone Context uses the same port pool mechanism as the Rapid Install
Once you choose a port pool, Clone Context will validate the port availability.
Enter the port pool number [0-99]:
1
Checking the port pool 1
done: Port Pool 1 is free
Web Listener port is 8001
Complete port information available at /u01/oracle/testappl/admin/out/TEST_seouldb1/portpool.lst
Backing up /u01/oracle/testappl/admin/TEST_seouldb1.xml to /u01/oracle/testappl/admin/TEST_seouldb1.xml.bak
Creating the new APPL_TOP Context file from :
/u01/oracle/prodappl/ad/11.5.0/admin/template/adxmlctx.tmp
The new APPL_TOP context file has been created :
/u01/oracle/testappl/admin/TEST_seouldb1.xml
Log file located at /u03/oracle/testcomn/clone/bin/CloneContext_11020246.log
Running Rapid Clone with command:
perl ./adclone.pl java=./../jre/1.3.1 mode=apply stage=/u03/oracle/testcomn/clone/bin/.. component=appsTier method=CUSTOM ap
pctxtg=/u01/oracle/testappl/admin/TEST_seouldb1.xml  showProgress contextValidated=true
Beginning application tier Apply - Tue Nov  2 02:48:06 2004
Log file located at /u01/oracle/testappl/admin/TEST_seouldb1/log/ApplyAppsTier_11020248.log
/     50% completed       WARNING: AutoConfig completed with errors. Check logfile at /u01/oracle/testappl/admin/TEST_seouldb1/log
/ApplyAppsTier_11020248.log for details.

Completed Apply...
Tue Nov  2 02:57:52 2004
Beginning APPSIAS_TEST registration to central inventory...
ORACLE_HOME NAME   : APPSIAS_TEST
ORACLE_HOME PATH   : /u01/oracle/testora/iAS
INVENTORY LOCATION : /var/opt/oracle/oraInst.loc
Log file located at /var/opt/oracle/oraInventory/logs/OracleHomeCloner_11020258.log
ORACLE_HOME /u01/oracle/testora/iAS was registered successfully.
Starting application Services for TEST:
Running:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adstrtal.sh APPS/<appspwd>
You are running adstrtal.sh version 115.14
Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adapcctl.sh start
script returned:
****************************************************
adapcctl.sh version 115.43
Starting Apache Web Server Listener (dedicated HTTP) ...
Starting Apache Web Server Listener (dedicated PLSQL) ...
adapcctl.sh: exiting with status 0

.end std out.
****************************************************

Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adalnctl.sh start
script returned:
****************************************************
adalnctl.sh version
Checking for FNDFS executable.
Starting listener process APPS_TEST.
adalnctl.sh: exiting with status 0

.end std out.
****************************************************

Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adcmctl.sh start
script returned:
****************************************************
You are running adcmctl.sh version 115.19
Starting concurrent manager for TEST ...
Starting TEST_1102@TEST Internal Concurrent Manager
Default printer is noprint
adcmctl.sh: exiting with status 0

.end std out.
****************************************************

Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adfrmctl.sh start
script returned:
****************************************************
You are running adfrmctl.sh version 115.33
Starting forms server for TEST on port 9001.
adfrmctl.sh: exiting with status 0

.end std out.
****************************************************

Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adrepctl.sh start
script returned:
****************************************************
You are running adrepctl.sh version 115.20
starting Reports Server for TEST on port 7001.
adrepctl.sh: exiting with status 0

.end std out.
****************************************************

Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adfmcctl.sh start
script returned:
****************************************************
You are running adfmcctl.sh version 115.16
Starting forms load balancing client for TEST.
adfmcctl.sh: exiting with status 0

.end std out.
****************************************************

Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/adfmsctl.sh start
script returned:
****************************************************
You are running adfmsctl.sh version 115.12
starting forms  metrics server for TEST.
adfmsctl.sh: exiting with status 0

.end std out.
****************************************************

Executing service control script:
/u03/oracle/testcomn/admin/scripts/TEST_seouldb1/jtffmctl.sh start
script returned:
****************************************************
You are running jtffmctl.sh version 115.7
Starting Fulfillment Server for TEST on port 9301 ...
jtffmctl.sh: exiting with status 0

.end std out.

Check logfile /u03/oracle/testcomn/admin/log/TEST_seouldb1/11020258.log for details
Exiting with status 0
    1. Finishing Tasks
      • Update profile options
        • Site name
        • Default printer if applicable
      • Update printer settings
      • Update workflow configuration settings – if applicable
Verify the APPLCSF variable setting