Wednesday, July 11, 2012

Migrating  AutoConfig on the Database Tier/
Re-Build the Context file

During one of our DB Migration activity from 11gR1 to 11gR2 DB, when we tried to run Auto Config on DB node post upgrade, it failed consistently. I can't fathom any reason for failure. However to fix the situation, we need to migrate auto config to DB tier. 
There was also another problem. When I try to start the listener from new 11gR2 home it couldn't start. After lots of head banging, I decided to recreate the listener as well.
Following is the process which fixed my issue.

-- Create appsutl.zip on appsnode
[oracle@appsnode 7651166]$ cd /u01/app/oracle/visr12/apps/apps_st/appl/ad/12.0.0/bin
[oracle@appsnode bin]$ perl admkappsutil.pl
Starting the generation of appsutil.zip
Log file located at /u01/app/oracle/visr12/inst/apps/visr12_appsnode/admin/log/MakeAppsUtil_07090645.log
output located at /u01/app/oracle/visr12/inst/apps/visr12_appsnode/admin/out/appsutil.zip
MakeAppsUtil completed successfully.
[oracle@appsnode bin]$ cd /u01/app/oracle/visr12/inst/apps/visr12_appsnode/admin/out/
[oracle@appsnode out]$ ll -ltr
total 2868
drwxr-xr-x 2 oracle oinstall    4096 May 14 05:50 05140550
drwxr-xr-x 2 oracle oinstall    4096 May 14 06:05 05140605
drwxr-xr-x 2 oracle oinstall    4096 May 14 07:05 05140701
drwxr-xr-x 2 oracle oinstall   12288 May 14 07:11 05140705
drwxr-xr-x 2 oracle oinstall    4096 May 15 06:23 05150623
drwxr-xr-x 2 oracle oinstall    4096 May 15 06:25 05150624
drwxr-xr-x 2 oracle oinstall    4096 May 15 06:25 05150625
drwxr-xr-x 2 oracle oinstall   12288 May 25 07:03 05250658
drwxr-xr-x 2 oracle oinstall    4096 Jun  5 04:47 06050447
drwxr-xr-x 2 oracle oinstall   12288 Jun  5 05:00 06050457
drwxr-xr-x 2 oracle oinstall   12288 Jun  5 05:13 06050512
drwxr-xr-x 2 oracle oinstall   12288 Jun  6 03:16 06060314
drwxr-xr-x 2 oracle oinstall   12288 Jun  6 05:42 06060541
drwxr-xr-x 2 oracle oinstall   12288 Jun  6 06:21 06060620
drwxr-xr-x 2 oracle oinstall   12288 Jul  3 05:13 07030512
drwxr-xr-x 3 oracle oinstall    4096 Jul  9 06:45 appsutil
-rw-r--r-- 1 oracle oinstall 2799287 Jul  9 06:45 appsutil.zip


-- Copy it to DB node
[oracle@appsnode out]$ scp appsutil.zip  appsdbnode:/home/oracle/
appsutil.zip                                                  100% 2734KB   2.7MB/s   00:00


-- On DB Node re-generate the context file 
[oracle@appsdbnode appsutil]$ cd bin
[oracle@appsdbnode  bin]$ perl ./adbldxml.pl appsuser=apps appspass=apps

-- Running the above script will also create listner.ora file under your ORACLE_HOME
--  $ORACLE_HOME/network/admin/<CONTEXT>/listener.ora file



--Check the context file 
[oracle@appsdbnode appsutil]$ ./bin/adchkcfg.sh  contextfile=./visr12_appsdbnode.xml
Enter the APPS password:
The log file for this session is located at: /u01/app/oracle/product/11.2.0/db_1/appsutil/log/visr12_appsdbnode/07090710/adconfig.log
AutoConfig is running in test mode and building diffs...
AutoConfig will consider the custom templates if present.
        Using ORACLE_HOME location : /u01/app/oracle/product/11.2.0/db_1
        Classpath                   : :/u01/app/oracle/product/11.2.0/db_1/jdbc/lib/ojdbc5.jar:/u01/app/oracle/product/11.2.0/db_1/appsutil/java/xmlparserv2.jar:/u01/app/oracle/product/11.2.0/db_1/appsutil/java:/u01/app/oracle/product/11.2.0/db_1/jlib/netcfg.jar:/u01/app/oracle/product/11.2.0/db_1/jlib/ldapjclnt11.jar
        Using Context file          : /u01/app/oracle/product/11.2.0/db_1/appsutil/out/visr12_appsdbnode/07090710/visr12_appsdbnode.xml
Context Value Management will now update the test Context file
        Updating test Context file...COMPLETED


        [ Test mode ]
        No uploading of Context File and its templates to database.
Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 32 bits
Testing templates from ORACLE_HOME ...
Differences text report is located at: /u01/app/oracle/product/11.2.0/db_1/appsutil/out/visr12_appsdbnode/07090710/cfgcheck.txt
        Generating Profile Option differences report...COMPLETED
Differences text report for the Database is located at: /u01/app/oracle/product/11.2.0/db_1/appsutil/out/visr12_appsdbnode/07090710/ProfileReport.txt
        Generating File System differences report......COMPLETED
Differences html report is located at: /u01/app/oracle/product/11.2.0/db_1/appsutil/out/visr12_appsdbnode/07090710/cfgcheck.html
Differences Zip report is located at: /u01/app/oracle/product/11.2.0/db_1/appsutil/out/visr12_appsdbnode/07090710/ADXcfgcheck.zip
AutoConfig completed successfully.


[oracle@appsdbnode appsutil]$ vi /u01/app/oracle/product/11.2.0/db_1/appsutil/out/visr12_appsdbnode/07090710/cfgcheck.txt


-- Run the auto config again
[oracle@appsdbnode appsutil]$ ./bin/adconfig.sh  contextfile=visr12_appsdbnode.xml
Enter the APPS user password:
The log file for this session is located at: /u01/app/oracle/product/11.2.0/db_1/appsutil/log/visr12_appsdbnode/07090712/adconfig.log
AutoConfig is configuring the Database environment...
AutoConfig will consider the custom templates if present.
        Using ORACLE_HOME location : /u01/app/oracle/product/11.2.0/db_1
        Classpath                   : :/u01/app/oracle/product/11.2.0/db_1/jdbc/lib/ojdbc5.jar:/u01/app/oracle/product/11.2.0/db_1/appsutil/java/xmlparserv2.jar:/u01/app/oracle/product/11.2.0/db_1/appsutil/java:/u01/app/oracle/product/11.2.0/db_1/jlib/netcfg.jar:/u01/app/oracle/product/11.2.0/db_1/jlib/ldapjclnt11.jar
        Using Context file          : /u01/app/oracle/product/11.2.0/db_1/appsutil/visr12_appsdbnode.xml
Context Value Management will now update the Context file
        Updating Context file...COMPLETED
        Attempting upload of Context file and templates to database...COMPLETED
Updating rdbms version in Context file to db112
Updating rdbms type in Context file to 32 bits
Configuring templates from ORACLE_HOME ...
AutoConfig completed successfully.

No comments:

Post a Comment