Saturday 8 July 2017

How to Restore context file in oracle applications?

Scenario: Your Applications context file is either accidentally deleted or Corrupted. You do not have any latest backup of context file available.

Below are the steps to recreate context file 

The Applications context file can be retrieved by running the adclonectx.pl script.

perl /clone/bin/adclonectx.pl retrieve

Above script prompts for Database connection Info, apps username/password , Available Context files and the location to which context files can be restored.When prompted for the context file to be retrieved, select the option of retrieving the Applications tier context file that has been lost and retrieve it to the default location as in $CONTEXT_FILE parameter.

The above command can be used only when INST_TOP the is still intact. Incase if INST_TOP is also lost, the Applications tier context file may be retrieved as follows:

Execute the following command on the Database tier:
perl /appsutil/clone/bin/adclonectx.pl retrieve

When prompted for the context file to be retrieved, select the option of retrieving the Applications tier context file that has been lost.Choose the location to any writeable location and copy the restored context file to the value specified in $CONTEXT_FILE parameter on Application Tier.

To retrieve the Database tier context file,

Execute the following command on the Database tier:
perl /appsutil/clone/bin/adclonectx.pl retrieve

When prompted for the context file to be retrieved, select the Database tier context file and retrieve it to the default location ($CONTEXT_FILE on DB node).




Oracle Applications R12.2.5 New Features: dualfs in cloning


From Oracle Applications Release 12.2.5 Version, we have dualfs option for cloning applications tier.We can use this feature in earlier 12.2.x versions also, if AD-TXK Delta 7 patch is applied.Before AD-TXK Delta 7, it was required to run adcfgclone twice on run and patch filesystems.Using dualfs option,we can create both run and patch fs at one time.

-bash$ perl adcfgclone.pl appsTier dualfs

                     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...

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

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

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

Target System Database SID : VISN

Target System Database Server Node [r12erpt] : appsdb

Target System Database Domain Name [domain.com] :

Target System Base Directory : /u01/VISN

Target System Base Directory set to /u01/VISN

Target System Current File System Base set to /u01/VISN/fs1

Target System Other File System Base set to /u01/VISN/fs2

Target System Fusion Middleware Home set to /u01/VISN/fs1/FMW_Home
Target System Other File System Fusion Middleware Home set to /u01/VISN/fs2/FMW_Home

Target System Web Oracle Home set to /u01/VISN/fs1/FMW_Home/webtier
Target System Other File System Web Oracle Home set to /u01/VISN/fs2/FMW_Home/webtier

Target System Appl TOP set to /u01/VISN/fs1/EBSapps/appl
Target System Other File System Appl TOP set to /u01/VISN/fs2/EBSapps/appl

Target System COMMON TOP set to /u01/VISN/fs1/EBSapps/comn
Target System Other File System COMMON TOP set to /u01/VISN/fs2/EBSapps/comn

Target System Instance Home Directory [V] : /u01/VISN

Target System Current File System Instance Top set to /u01/VISN/fs1/inst/apps/VISN_appsmt

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

Target System Display [r12erpt:0.0] : appsmt:3.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] : 88

Checking the port pool 88
done: Port Pool 88 is free
Report file located at /u01/VISN/fs1/inst/apps/VISN_appsmt/admin/out/portpool.lst

UTL_FILE_DIR on database tier consists of the following directories.

1. /usr/tmp
2. /usr/tmp
3./u01/VISN/product/12.1.0/appsutil/outbound/VISN_appsmt
4. /usr/tmp
Choose a value which will be set as APPLPTMP value on the target node [1] : 3
The new APPL_TOP context file has been created :
  /u01/VISN/fs1/inst/apps/VISN_appsmt/appl/admin/VISN_appsmt.xml
Check Clone Context logfile /u01/VISN/fs1/EBSapps/comn/clone/bin/CloneContext_1023194859.log for details.

Creating Patch file system context file.....

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

Target System Other File System Instance Top set to /u01/VISN/fs2/inst/apps/VISN_appsmt

Target System Port Pool [0-99] : 89

Checking the port pool 89
done: Port Pool 89 is free
Report file located at /u01/VISN/fs2/inst/apps/VISN_appsmt/admin/out/portpool.lst
The new APPL_TOP context file has been created :
 /u01/VISN/fs2/inst/apps/VISN_appsmt/appl/admin/VISN_appsmt.xml
Check Clone Context logfile /u01/VISN/fs1/EBSapps/comn/clone/bin/CloneContextPatch_********.log for details.

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

Configuring: Run file system....
LogFile located at /u01/VISN/fs1/inst/apps/VISN_appsmt/admin/log/clone/run/RCloneApplyAppstier_*******.log