Monday, October 17, 2016

Autoconfig

Autoconfig:

Oracle Applications has a complex architecture with many pieces of technology. For example Apache Web server, Apache Jserv, Forms Listener servlet (or forms server) etc. each of these has its own set of configuration files , which need to be set up correctly to function properly. Moreover Oracle Applications uses many profile options (e.g. Applications Web Agent, Applications Framework Agent etc) and other bits of information in the database to make the navigation seamless. These also need to be set correctly to function properly.

Managing these profile options and configuration files manually may give errors.So Autoconfig is a tool provided by the Oracle E-Business Suite to maintain these files and profile options. We can say AutoConfig is a collection of template configuration files that are used in combination with the appropriate database and applications context files to produce standardized environments.

Autoconfig maintains the environment specific values for the  environment in an xml file (stored in $INST_TOP/appl/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 does it work?

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 (like %s_webhost%).






How to customize the template for autoconfig files:

First of all we need to decide which file need to be customized and if it is possible to do it

You cannot customize all AutoConfig template files.The AutoConfig template file cannot be customized if the "LOCK" keyword appears in the template file's entry in the product driver file. AutoConfig ignores custom template files that are marked with "LOCK".

For example, the following entry in /admin/driver/adtmpl.drv would prevent customization of the file adconfig.txt:
ad admin/template adconfig.txt INSTE8 /admin adconfig.txt 600 LOCK

Steps to customize the Autoconfig unlock files

1) You must be knowing the product top for the file.So Create the custom directory in $PROD_TOP/admin/template
 Example
a. mkdir $FND_TOP/admin/template/custom
b. chmod 777 $FND_TOP/admin/template/custom

2) Determine the AutoConfig template file one wants to customize:
Execute the following command to find out the corresponding AutoConfig template file for the configuration file one want to customize:

Application /bin/adtmplreport.sh contextfile= target=
Database /appsutil/bin/adtmplreport.sh contextfile= target=

For example
$AD_TOP/bin/adtmplreport.sh contextfile=/appl/admin/.xml
target=$FND_TOP/admin/template/appsweb.cfg

The above command would return "$FND_TOP/admin/template/forms_web_1012_cfg.tmp", means
the "appsweb.cfg" file was created from the source Autoconfig template $FND_TOP/admin/template/forms_web_1012_cfg.tmp.

 3) Copy the "forms_web_1012_cfg.tmp" into custom directory created earlier  and then edit it to your requirements

a.Copy the template $FND_TOP/admin/template/forms_web_1012_cfg.tmp  to  $FND_TOP/admin/template/custom

b. Amend this template file and then run autoconfig ensuring that all applications middle tier processes are not running prior to running autoconfig

Some important points to remember:

1) If new templates comes ,the changes would be lost.  If the patch which replaces the file runs the autoconfig,it would show any complain for new template. But if you run autoconfig manually and you have new version of customized template in admin/template,then it will complain about it

2) We can list all the customized template done through the command

$AD_TOP/bin/adtmplreport.sh contextfile= listcustom



Important Questions:

1.What is the location of adconfig log file?
$INST_TOP/admin/log/

2. Is it possible to restore a autoconfig run?
Partially. Adconfig will create a restore script at $INST_TOP/admin/out/. This restore.sh will copy the backed up files before autoconfig run to its original locations. But the profile values updated in the database can’t be restored back.

3. How to run autoconfig in test mode?
adchkcfg.sh script at $AD_TOP/bin. This script will run autoconfig in test
mode and create the difference file which tells us what is going to change, when u actually run autoconfig.

4. In how many phases autoconfig will run?

Ans : Autoconfig will run in 3 phases.

1.INIT     – Instantiate the drivers and templates
2.SETUP   – Fill the templated with values from xml and create files
3.PROFILE  – Update the profile values in database.

5. Execute the following command to find out the corresponding AutoConfig template file for the configuration file one want to customize:

Application /bin/adtmplreport.sh contextfile= target=
Database /appsutil/bin/adtmplreport.sh contextfile= target=

For example
$AD_TOP/bin/adtmplreport.sh contextfile=/appl/admin/.xml
target=$FND_TOP/admin/template/appsweb.cfg

6.How to Create context file in R12?

Invoke adbldxml.pl from  Database Tier only. A new context file on the database tier can be created using the following command :
perl $ORACLE_HOME/appsutil/bin/adbldxml.pl [template=<contextfile_template>][out=<contextfile_name>

In order to generate the Applications context file on Applications tier, run the adclonectx.pl script.
perl [COMMON_TOP]/clone/bin/adclonectx

7.How to retrieve context file if we lost/corrupted?

To retrieve the applications tier context file ( if it is lost or deleted accidentally) , execute the following command on the applications tier :
perl <COMMON_TOP>/clone/bin/adclonectx.pl retrieve

8. What is driver file and its role?
The driver files list the names and locations of the template files that need to have context variables replaced. They also define the phases into which instantiation is divided, and specify the commands that are to be executed for specific products. When AutoConfig runs, it cycles through the various <PROD>_TOP/admin/driver directories looking for driver files such as adtmpl.drv, fndtmpl.drv, and icxtmpl.drv.

Phases of Operation

As AutoConfig parses the driver files, it carries out a series of actions, grouped into several distinct phases:

INSTE8 - Instantiates AutoConfig template files to the AutoConfig configuration files specified in the relevant template driver files.

INSTE8_SETUP - Executes setup scripts that carry out activities not involving connection to the database.

INSTE8_PRF - Executes setup scripts that update profile options.

INSTE8_APPLY - Executes setup scripts that carry out activities involving updates to the database.

BINCPY - Copies the file mentioned from the source file to the configuration file, creating parent directories for the latter if necessary. AutoConfig will report an error if the source file cannot be found.

BINCPY_IGERR - Copies the file mentioned from the source file to the configuration file, creating parent directories for the latter if necessary. AutoConfig will not report an error if the source file cannot be found.

AutoConfig carries out these actions in the following order:

All INSTE8 and BINCPY actions - Carries out all file instantiations called for during INSTE8, INSTE8_SETUP, INSTE8_PRF and INSTE8_APPLY, and all copying from source files to target configuration files.

INSTE8_SETUP actions - For the files that were instantiated in Step 1, AutoConfig runs all SETUP scripts.

INSTE8_PRF actions - For the files that were instantiated in Step 1, AutoConfig runs all PRF scripts.

INSTE8_APPLY actions - For the files that were instantiated in Step 1, AutoConfig runs all APPLY scripts.

At the end of this process, the required configuration files and profile options have been created for the E-Business Suite installation.


No comments:

Post a Comment

How to Compile Forms , Reports & Custom.pll in R12.2

How to Compile Custom.pll   cd $AU_TOP/resource  cp CUSTOM.plx CUSTOM.plx_bkup  cp CUSTOM.pll CUSTOM.pll_bkup  frmcmp_batch module=CUSTOM.pl...