Sunday, September 22, 2013

AdConfig in Oracle Apps

Autoconfig is an 11i configuration tool (set of java classes run from perl/shell scripts) introduced in 11.5.4, which eliminates the need to manually maintain these configuration files and profile options. Autoconfig maintains the environment specific values for the 11i environment in an xml file (stored in $APPL_TOP/admin). When autoconfig run it overwrites the existing configuration files with new ones that it creates by merging the templates and the context file, it also updates the database by running the script it instantiates (merging a template with the values in the context file is termed as instantiating the template in Oracle parlance) from the script templates.
That’s essentially what autoconfig does i.e. Instantiating configuration files from templates and updating database with values from the xml file. It does not move directories, check for availability of ports, update DNS entries and so on. These have to be done manually.

How Auto config works..

Each configuration file has one corresponding template file (provided by autoconfig patches, stored in $PROD_TOP/admin/template directory). Profile options and other instance specific information in the database is maintained by many sql scripts, called from shell/perl scripts. These scripts also have corresponding template files (also provided by autoconfig patches, in $PROD_TOP/admin/templates).In these template files all the environment specific values are replaced by placeholders.
Configuration files can be easily created from the template file by just replacing all the placeholders with the corresponding values from the context file. This process is termed as “instantiating the template” in Oracle documentation. 
Driver files (stored in $PROD_TOP/admin/driver) store information about what to do with each template (e.g. instantiate it and replace the existing configuration file with it, instantiate it and run it). These files are named as <PROD_TOP>tmpl.drv (e.g. adtmpl.drv, fndtmpl.drv etc.) They contain one line for each template they manage.
When autoconfig (adconfig.pl or adconfig.sh) runs it just processes the driver file for each product, line by line doing what the driver file instructs it to do. The order of execution of each line is not sequential as we shall see later

How to run AutoConfig:
Step 1 : Stop all services 
$ $COMMON_TOP/admin/scripts/adstpall.sh APPS/ APPSPASSWORD
Step 2:Run the autoconfig script, $adautocfg.sh & respond to the prompts. 
Step 3:Check log files for any errors.log file for autoconfig is adconfig.log & is 
located in /admin//log/MMDDhhmm/ 
Step 4: Restart all services : 
$ $COMMON_TOP/admin/scripts/adstrtal.sh APPS/APPSPASSWORD

Roll back autoconfig :

Each execution of AutoConfig creates a roll back script in case we want to revert 
back to the previous configuration settings. For this we perform the following 
steps:
Step 1 :Shut down all services: 
$ cd $COMMON_TOP/admin/scripts/ 
$ adstpall.sh APPS/ 
Step 2:Restore AutoConfig session. 
$ cd $APPL_TOP>/admin//out/MMDDhhmm 
$ restore.sh 
Step 3 : Restart all services: 
$ $COMMON_TOP/admin/scripts//adstrtal.sh APPS/
Restoring the previous configuration 

Log file locations:(11i)
Dbtier
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MM_DD_YYYY/adconfig.log
Appstier:
$APPL_TOP/admin/$CONTEXT_NAME/log/MMDDYYYY/adconfig.log

R12:
Appstier
$INST_TOP/apps/$CONTEXT_NAME/admin/log/$MMDDHHMM/adconfig.log
Dbtier
$ORACLE_HOME/appsutil/log/$CONTEXT_NAME/<MMDDHHMM>/adconfig.log

No comments:

Post a Comment