Wednesday, March 20, 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
---------
DEVDB

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

OWNER                            COUNT(*)
------------------------------ ----------
SYS                                     1
DEV_USER1                     2
DEV_USER2                     5
APPS                                  23

Step 2:Enable Maintainance mode

 ebsdev:applmgr::/home/applmgr>echo $TWO_TASK
DEVDB
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.


ebsdev: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 .
ebsdev:applmgr::/stage/patches/5522470>adpatch

Review the README for pre-requisite information.

Your default directory is '/d21/DEVDB/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

ebsdev:applmgr::/u01/DEVDB/apps/comn/admin/scripts/DEVDB_ebsdev>./adalnctl.sh stop

adalnctl.sh version 115.17

Shutting down listener process APPS_DEVDB.

adalnctl.sh: exiting with status 0

Step b:Stop applications using adstpall.sh

ebsdev:applmgr::/u01/DEVDB/apps/comn/admin/scripts/DEVDB_ebsdev>./adstpall.sh

You are running adstpall.sh version 115.22


Enter the APPS username: apps

Step c:Start listener using adalnctl.sh

ebsdev:applmgr::/u01/DEVDB/apps/comn/admin/scripts/DEVDB_ebsdev>./adalnctl.sh start

adalnctl.sh version 115.17

Starting up listener process APPS_DEVDB.

adalnctl.sh: exiting with status 0

Step d:Start applications using adstrtal.sh

ebsdev:applmgr::/u01/DEVDB/apps/comn/admin/scripts/DEVDB_ebsdev>./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
---------
DEVDB

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/DEVDB_ebsdev 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
DEV_USER1                    2
DEV_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.

ebsdev:applmgr::/d21/DEVDB/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 DEVDB 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://oradev.oracle.com:8000   with sysadmin/admin123

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

Step e:Intimate end User 

No comments: