Saturday, March 2, 2013

Applying patch to Oracle EBS 11i/R12 Applications

Applying patch to  Oracle EBS 11i/R12 Applications:
Below are the steps which I follow to apply patch to Oracle EBS 11i/R12,in the below scenario I'm using Oracle EBS 11i applications,but the same steps can be use for Oracle EBS R12 applications also

Step 1: Before applying patch:(check invalid objects in DB):

SQL> select name from v$database;

NAME
---------
TESTDB

SQL> select owner,count(*) from dba_objects where status='INVALID' group by owner;

OWNER                            COUNT(*)
------------------------------ ----------
SYS                                     1
TEST_USER1                     2
TEST_USER2                     5
APPS                                  23

Step 2:Enable Maintainance mode

 ebstest:applmgr::/home/applmgr>echo $TWO_TASK
TESTDB
Use 'adadmin' to enable maintainance mode before patching.

 5.    Change Maintenance Mode

Change Maintenance Mode
   ----------------------------------------

Maintenance Mode is currently: [Enabled].

Backing up restart files, if any......Done.

             Change Maintenance Mode
   ----------------------------------------

Maintenance Mode is currently: [Enabled].


Step 3:Applying patch using 'adpatch'(auto patch utility):
=====================================================

 Use: adpatch by going to patch directory

Go to the patch top directory,where all driver and required ldt files are present with the application
filesystem owner,makes sure all files have read,write and execute permission.
As described below:

Note:It is very important to review the readme.txt in unix vi editor before applying applying patch and follow the instruction as given in the readme.txt file and apply any pre-requistics patch if required.autoconfig run also not required unless it is specified after patch installation in readme.txt file.


ebstest:applmgr::/stage/patches/5522470>ls -altr
total 12432
-rwxrwxrwx    1 applmgr  dba            2931 Oct 29 2007  u5522470.drv
-rwxrwxrwx    1 applmgr  dba            1173 Oct 29 2007  f5522470.ldt
-rwxrwxrwx    1 applmgr  dba         6323692 Oct 29 2007  b5522470.ldt
-rwxrwxrwx    1 applmgr  dba              37 Oct 29 2007  marker1.txt
-rwxrwxrwx    1 applmgr  dba            2852 Oct 29 2007  README.txt
-rwxrwxrwx    1 applmgr  dba            5502 Oct 29 2007  README.html
drwxrwxrwx    5 applmgr  dba             256 Feb 21 01:21 po
drwxrwxrwx   54 root     dba           12288 Feb 21 01:21 ..
drwxr-xr-x    3 applmgr  dba             256 Feb 21 01:21 .
ebstest:applmgr::/stage/patches/5522470>adpatch

Review the README for pre-requisite information.

Your default directory is '/d21/TESTDB/apps/appl'.
Is this the correct APPL_TOP [Yes] ?

Verify the log file after applying patch

Step 4: Disable Maintainance mode again by using 'adadmin' utility:
=======================================================

Backing up restart files, if any......Done.

             Change Maintenance Mode
   ----------------------------------------

Maintenance Mode is currently: [Disabled].


Step 5: Bounce application after applying patch :
===================================================


Step a:Stop listener using adalnctl.sh

ebstest:applmgr::/u01/TESTDB/apps/comn/admin/scripts/TESTDB_ebstest>./adalnctl.sh stop

adalnctl.sh version 115.17

Shutting down listener process APPS_TESTDB.

adalnctl.sh: exiting with status 0

Step b:Stop applications using adstpall.sh

ebstest:applmgr::/u01/TESTDB/apps/comn/admin/scripts/TESTDB_ebstest>./adstpall.sh

You are running adstpall.sh version 115.22


Enter the APPS username: apps

Step c:Start listener using adalnctl.sh

ebstest:applmgr::/u01/TESTDB/apps/comn/admin/scripts/TESTDB_ebstest>./adalnctl.sh start

adalnctl.sh version 115.17

Starting up listener process APPS_TESTDB.

adalnctl.sh: exiting with status 0

Step d:Start applications using adstrtal.sh

ebstest:applmgr::/u01/TESTDB/apps/comn/admin/scripts/TESTDB_ebstest>./adstrtal.sh

You are running adstrtal.sh version 115.22

Step 6:After applying PATCH:
========================


Step a:Verify the patch is applied successfully:

SQL> select name from v$database;

NAME
---------
TESTDB

SQL> select bug_number,creation_date from ad_bugs where bug_number='5522470';

BUG_NUMBER                     CREATION_DATE
------------------------------ ---------------
5549427                        12-FEB-13

Step b:Run cmclean.sql
Run cmclean.sql from application node by going to $COMMON_TOP/admin/scipts/TESTDB_ebstest in 11i,where as in R12 goto $ADMIN_SCRIPTS_HOME or $INST_TOP/admin/scripts
commit;
Note:We run cmclean after clonning also to make sure the node name is updated in the FND_NODES Table correctly

SQL> select owner,count(*) from dba_objects where status='INVALID' group by owner;

OWNER                            COUNT(*)
------------------------------ ----------
SYS                                     1
TEST_USER1                    2
TEST_USER2                    5
APPS                                 22

Step c:Check the file versions got changed successfully after applying patch:

strings -a POXWARMB.pls|grep Header =>Can be used to check the file version.

ebstest:applmgr::/d21/TESTDB/apps/appl/po/11.5.0/sql>strings -a POXWARMB.pls|grep Header
 strings -a POXWARMB.pls|grep Header
/* $Header: POXWARMB.pls 115.27.11510.7 2009/02/11 11:08:59 krsethur ship $*/
/* $Header: POXWARMB.pls 115.27.11510.7 2009/02/11 11:08:59 krsethur ship $*/

Step d:Do the Health Check of Oracle EBS Application

Login TESTDB application by using Home page URL

Note :We can get HOME page URL by using below query:
SQL>Select Home_URL from icx_parameter;

 http://ebstest.abccomp.com:8035    with sysadmin/welcome123

Health check completed successfully by submitting active user Concurrent request REQUEST ID 28758820.

Step e:Intimate end User 

Make sure you intimate the end User or release your application to the end User

Enjoy Apps DBA tasks...


Best regards,

Rafi