Forgot your password?    
+ Reply to Thread
Results 1 to 6 of 6

Thread: Autoconfig Usage in Oracle Apps 11i and R12

  1. #1
    Expert Oracle Administrator
    Join Date
    Oct 2011
    Location
    New Delhi, India
    Posts
    427

    Autoconfig Usage in Oracle Apps 11i and R12

    AutoConfig - Simplifies configuration management in an Oracle E-Business Suite Release
    <CONTEXT_NAME>.xml, located in $APPL_TOP/admin acts as a central repository for the instance-specific information that AutoConfig needs to configure an environment, including the name and location of the database, and port numbers for the application tier servers.

    Autoconfig Centralizes and simplifies E-Business Suite configuration management.
    AutoConfig can be used to instantiate files or scripts, and then execute them for installation and configuration.
    Instantiation of a configuration file to be used at runtime
    Instantiation of an SQL script that will set profile option values that can be either site or instance-specific
    Instantiation of a shell script or Windows command file that will run an SQL script via SQL*Plus, and then execute the shell script
    Instantiation of scripts to startup and shutdown services


    Autoconfig Template and Driver Files

    AutoConfig uses template files to determine the basic settings that are needed. There is one template file for each configuration file.The template files are located in the relevant $PROD_TOP/admin/template directories. For example $AD_TOP/admin/template.

    When AutoConfig runs, it cycles through the various <PRODUCT_TOP>/admin/driver directories looking for AutoConfig template driver files.

    To Make a Modifiaction in the Context File :

    - Running the Context Editor to make changes to the contents of the Applications context file, as described on the following pages
    - Using Oracle Applications Manager 2.1.1 or higher, which includes a sophisticated, web-based context editor that can be used to edit the Applications (not database) context
    - Can change the value in the Context file manually.

    Running Autoconfig

    Before Running Autoconfig on Production

    1. Advisable to Take a backup of the listener.ora and tnsnames.ora
    2. Run adchkcfg.sh and take a backup of files going to be affected by Autoconfig.
    Running adchkcfg.sh (cont.)
    This script generates a report that lists the differences that would arise on account of runing autoconfig. these differences should first be reviewed.

    Usage
    adchkcfg.sh contextfile={contextfilepath}

    3. Running Autconfig requires downtime.

    When Running autoconfig, Get the Applications Services Down , Database Services should be up and Running.
    On 11i : $COMMON_TOP/admin/scripts/$CONTEXT_NAME/adstpall.sh
    On R12 : $ADMIN_SCRIPTS_HOME/adstpall.sh or $INST_TOP/admin/scripts/adstpall.sh

    To Run Autoconfig on the Applications Tier ,
    On 11i , Use : $COMMON_TOP/admin/scripts/$CONTEXT_NAME/adautocfg.sh
    On R12 , Use : $ADMIN_SCRIPTS_HOME/adautocfg.sh or $INST_TOP/admin/scripts/adautocfg.sh

    and check the log file for Success / Errors.

    To Run Autoconfig on the Database Tier ,
    Use : $ORACLE_HOME/appsutil/scripts/$CONTEXT_NAME/adautocfg.sh
    or Use : $ORACLE_HOME/appsutil/bin/adconfig.sh contextfile=<CONTEXT> appspass=<appspwd>


    Reviewing Logs

    AutoConfig log files are stored under:
    $APPL_TOP/admin/<CONTEXT_NAME>/log/MMDDhhmm/

    Using Rollback Scripts

    Each run of AutoConfig automatically creates a rollback script in case there is a need to revert to the previous configuration settings. This script and backups of all configuration files from each execution
    of AutoConfig are stored in: $APPL_TOP/admin/<CONTEXT>/out/<MMDDhhmm>

  2. #2
    Oracle Administrator
    Join Date
    Oct 2011
    Location
    Venice
    Posts
    40

    General info on Autoconfig

    Adding a bit General information ...

    - Autoconfig is method, which means to configure Oracle Applications.
    - All the information required to configure Oracle Applications 11i comes from a file
    called Context file.
    - There are two context files, one for Database Tier & Second for Application Tier.
    - Context file is repository for configuration stored in .xml format.
    - This xml context files are named as <SID>_<HOSTNAME>.xml

    What is location of Context files ?

    Database Context file resides in $ORACLE_HOME/appsutil/<SID>_<HOSTNAME>.xml
    Application Context file resides in $APPL_TOP/admin/<SID>_<HOSTNAME>.xml

    On R12

    Database Context file resides in : $ORACLE_HOME/appsutil/$CONTEXT_NAME.xml
    Applications context file resides in : $INST_TOP/appl/admin/CONTEXT_NAME.xml


    What other scripts comes into picture when we run Autoconfig ?

    We use script adautocfg.sh (on both Database & Application tier) which inturn calls adconfig.sh , which further calls adconfig.pl.
    * We should not worry about these two scripts, its for information only.


    Where are the logs created after executing autoconfig ?

    On database tier its under
    $ORACLE_HOME/appsutil/log/CONTEXT_NAME/MM_DD_YYYY/adconfig.log

    On Application tier its under
    $APPL_TOP/admin/$CONTEXT_NAME/log/MMDDYYYY/adconfig.log

    Autoconfig related log files in R12
    i) Database Tier Autoconfig log :
    $ORACLE_HOME/appsutil/log/$CONTEXT_NAME/MMDDHHMM/adconfig.log

    ii) Application Tier Autoconfig log :
    $INST_TOP/admin/log/$MMDDHHMM/adconfig.log



    What if Context file gets corrupted, Can we create a new ?

    Yes, We have utility named adbldxml to build xml file(Context File).


    How to check if my Apps 11i System is Autoconfig enabled ?

    Under $AD_TOP/bin check for file adcfginfo.sh & if this file exists use
    adcfginfo.sh contextfile=<CONTEXT> show=enabled


    How to Update Context file using OAM ?

    Say if we want to update the active port from <original port no.> to 60 , for this we will edit the application context file as follows:

    Step 1: Start all services
    $ $COMMON_TOP/admin/scripts/<context_name>/adstrtal.sh APPS/<apps password>
    Step 2: log on to OAM & click site map.
    Step 3:Click AutoConfig from the list of System Configuration features in the
    Administration tab.
    Step 4: Click the Edit Parameter button for the application tier context file to access
    the Context File Parameters page & then click the system tab.
    Step 5: Click the Focus icon (blue triangle) for oa_web_server. This expands
    oa_web_server and shows the web server related parameters.
    Step 6: Update the Web Port (s_active_webport) parameter from <Original port
    number> to 80.
    Step 7: Save it & answer the tab.Then logout of OAM


    How to Roll back an autoconfig session ?

    Each execution of AutoConfig creates a roll back script in case we want to revert back to the previous configuration settings. For this we need to perform the following steps:

    Step 1: Shut down all services:
    $COMMON_TOP/admin/scripts/<context_name>
    $ adstpall.sh APPS/<APPS password>
    Step 2: Restore AutoConfig session.
    $APPL_TOP>/admin/<context_name>/out/MMDDhhmm
    $ restore.sh
    Step 3: Restart all services:
    $COMMON_TOP/admin/scripts/<context_name>/adstrtal.sh APPS/<APPS
    password>

    How to Restore the previous configuration using OAM ?

    Now we run OAM AutoConfig to restore the Applications Context.

    Step 1: Log on to the Oracle Application Manager (OAM) & click site map.
    we will be able to log on but some services will be down.
    Step 2: Click AutoConfig from the list of System Configuration features in the
    Administration tab.
    Step 3: Click the Show History button for the application tier context file to access the
    Context File History page.
    Step 4: Click the Show Differences from Current Configuration button to see the
    recently updated parameters & Select Restore Previous Value for like the Web
    Port or/and Discoverer Port parameters.
    Step 5: Save & respond the tabs. Log out of OAM.
    Step 6: Shut down all services:
    $COMMON_TOP/admin/scripts/<context_name>
    $adstpall.sh APPS/<APPS password>
    Step 7: Run the AutoConfig script, adautocfg.sh & Respond to the prompts.
    Step 8: View the log file and check for any errors.
    Step 9: Restart all services:
    $COMMON_TOP/admin/scripts/<context_name>/adstrtal.sh APPS/<APPS
    password>
    Step 10: Log out to the Oracle Application Manager (OAM)

    * If the status of some services appears to be down, click the Refresh icon to update
    the status.

    Thank You
    Last edited by Hemant; 01-22-2012 at 09:48 PM.
    Cheers !
    pk.ora

  3. #3
    Oracle Administrator
    Join Date
    Oct 2011
    Location
    Venice
    Posts
    40

    How Autoconfig works ?

    Before running Autoconfig

    - Middle Tier must be down
    - Database Tier must be available

    Autoconfig uses template files to determine the basic settings that are needed.
    There is one template file for each configuration file.

    Different version of the template files exists for UNIX and Windows.
    For Example :

    httpd_ux.conf / httpd_nt.conf
    adfrmctl_ux.sh / adfrmctl_nt.sh

    The template files are located in the relevant $PROD_TOP/admin/template
    Directories. For example :

    $AD_TOP/admin/template
    $FND_TOP/admin/template

    What happens when Autoconfg Runs ?

    When Autoconfig runs, it cycles through the various /admin/driver directories looking for Autoconfig template driver files.

    Updating Template and Driver Files

    A significant advantage of the use of Autoconfig is that template and driver files can be updated via Application Patches.

    When patches are applied they have the appropriate template and driver files updated and finally when Autoconfig is run it updates the configuration and settings in a single go.

    Template Files are used to specify the basic settings.
    Driver Files have the list of names and location of the files for specific products.

    adautocfg.sh

    The script adautocfg.sh updates configuration files and profile options.

    It also does the following .........

    1) The Instance Specific values that are found on the XML Context files are updated /
    configured by running the adautocfg.sh
    2) Copies any Customization that has been performed on the instance.
    3) Overwrites existing configuration files with new ones.
    4) Runs SQL Scripts to update database like updating the instance specific profile
    options.

    Autoconfig uses the tmpl.drv files as drivers for the process as these files has the information about which source and destination files has to be merged and the commands/instructions that has to be used

    When adautocfg.sh scripts completes , it internally calls another script adconfig.sh. To this script adautocfg.sh passes parameters for processing.

    adconfig.sh again calls the Java API to start the AutoConfig Engine located in $AD_TOP/java/adconfig.zip.

    When AutoConfig is run it scans through each PRODUCT TOP/admin/drivers directory and searches for the appropriate template driver files. The files have the list of files that need to have token replaced along with the special actions that AutoConfig needs to perform.

    Once Autoconfig is run it needs no additional input to perform the task.


    As Autoconfig runs it evaluates the tokens found in the template file and determines the substitute values required and creates a target file with the appropriate values substituted for the tokens.

    The files created are know as target files and they are used during the configuration processes.
    Cheers !
    pk.ora

  4. #4
    Oracle Administrator
    Join Date
    Oct 2011
    Posts
    43

    Location for adchkcfg.sh

    Location for adchkcfg.sh is $AD_TOP/bin

  5. #5
    Oracle Administrator
    Join Date
    Oct 2011
    Posts
    43
    Nice work puneet thanks for the info

  6. #6
    Oracle Administrator
    Join Date
    Oct 2011
    Location
    Venice
    Posts
    40

    What if application/database context fiel is corrupted ot lost ? Create new :)

    Unfortunately I lost my appliaction context file and the worst thing is I am not having It's backup. then even I am not worried because I can create new by following the below steps


    1) Stop application Services ($APPLCSF/scripts/<context_name>/./adstpall.sh apps/apps)
    2) cd $AD_TOP/bin
    ./adbldxml.sh tier=apps appsuser=<APPSuser> appspasswd=<APPSpasswd>
    you have to wait for few moments and it will create a new context file in $APPL_TOP/admin.
    When it completes creation of context file it returns the filename create with full path.
    3) verify if contextfile is created @ $APPL_TOP/admin

    4) verify if its working fine Start application services ($APPLCSF/scripts/<context_name>/./adstrtall.sh apps/apps)
    5) should run autoconfig to make the file in sync and to make sure everything is working well.

    Run autoconfig
    1) Stop all application services

    2) -bash-3.1$ ./adautocfg.sh (this will ask you a number of question as I marked blue below answer appropriately -> I left all default)
    Enter the APPS user password:
    AutoConfig is configuring the Applications environment...

    AutoConfig will consider the custom templates if present.
    Using APPL_TOP location : /u02/appltier/prodappl
    Using java command : /u02/appltier/prodcomn/util/java/1.4/j2sdk1.4.2_04/bin/java
    Java version : 1.4.2_04
    Classpath : /u02/appltier/prodcomn/util/java/1.4/j2sdk1.4.2_04/jre/lib/rt.jar:/u02/appltier/prodcomn/util/java/1.4/j2sdk1.4.2_04/lib/dt.jar:/u02/appltier/prodcomn/util/java/1.4/j2sdk1.4.2_04/lib/tools.jar:/u02/appltier/prodcomn/java/appsborg2.zip:/u02/appltier/prodcomn/java

    Using Context file : /u02/appltier/prodappl/admin/PROD_puneethost.xml

    Context Value Management will now update the Context file


    Context Value Management has found new variables that must be defined to update the context file and continue with system configuration

    Variable : s_javamailer_imap_user
    Details : The Java-based Oracle Workflow Notification Mailer, introduced
    in Release 11.5.9, requires an IMAP username for inbound mail
    processing (refer to Metalink Note 231286.1). If the Java-based
    Workflow Notification Mailer is not being used, accept the default
    parameter value.
    Enter the IMAP username [NoImapUser]:

    Variable : s_javamailer_reply_to
    Details : The Java-based Oracle Workflow Notification Mailer, introduced
    in Release 11.5.9, requires a reply-to email address for inbound
    mail processing (refer to Metalink Note 231286.1). If the
    Java-based Workflow Notification Mailer is not being used, accept
    the default parameter value.
    Enter the IMAP reply-to email address [NoReplyTo]:

    Variable : s_javamailer_imaphost
    Details : The Java-based Oracle Workflow Notification Mailer, introduced
    in Release 11.5.9, requires an IMAP server hostname for inbound mail
    processing (refer to Metalink Note 231286.1). If the Java-based
    Workflow Notification Mailer is not being used, accept the default
    parameter value.
    Enter the IMAP server hostname [NoImapHost]:

    Variable : s_javamailer_imapdomainname
    Details : The Java-based Oracle Workflow Notification Mailer, introduced
    in Release 11.5.9, requires an IMAP domain name for inbound mail
    processing (refer to Metalink Note 231286.1). If the Java-based
    Workflow Notification Mailer is not being used, accept the default
    parameter value.
    Enter the IMAP domain name [NoImapDomain]:

    Updating Context file...COMPLETED

    Attempting upload of Context file and templates to database...COMPLETED

    Configuring templates from all of the product tops...
    Configuring AD_TOP........

    ...........and so on it went successfully.

    6) start all application services ($APPLCSF/scripts/<context_name>/adstrtall.sh apps/apps)



    In case of database context file you can follow the same by executing

    1) cd $RDBMS_ORACLE_HOME/appsutil/bin
    2) adbldxml.sh tier=db appsuser=<APPSuser> appspasswd=<APPSpasswd>


    I never tried it for database context file.So I am not sure if we need to put the database down and then do this or anything else.
    If anybody try then share your experience.
    Last edited by pkumar; 02-23-2012 at 09:43 PM.
    Cheers !
    pk.ora

+ Reply to Thread

Similar Threads

  1. adctrl Usage , Diagnosis and Resolution
    By pkumar in forum Oracle Apps Patching and Cloning, Installation , Migration,Upgrades
    Replies: 1
    Last Post: 01-14-2012, 11:23 AM
  2. asmcmd Usage with Examples
    By Hemant in forum RAC Installation, ASM Install , ASM Administration
    Replies: 0
    Last Post: 11-23-2011, 08:41 AM
  3. Oracle ASM Views and Usage - Quick Reference/Understanding
    By Hemant in forum RAC Installation, ASM Install , ASM Administration
    Replies: 0
    Last Post: 11-21-2011, 04:17 PM
  4. Srvctl Major Options and Usage in Oracle RAC
    By Hemant in forum RAC Concepts and Administration
    Replies: 0
    Last Post: 11-04-2011, 06:14 PM
  5. Oracle Applications 11i Forms from Socket to Servlet or vice versa without autoconfig
    By Hemant in forum Concepts,Service Management,Apache,OC4J,OPMN,JServ,Forms, Issues,Troubleshooting,
    Replies: 0
    Last Post: 10-30-2011, 01:20 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training


Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics