Friday, 15 November 2013

How to apply patch in Oracle Applications

Patching is the most basic thing that an Oracle Apps DBA is expected to know.A patch is applied either to fix a bug or to add some new functionality.

Here are the steps for patching in Apps 11i:

1. First check that the patch is already applied or not.
select * from ad_bugs where bug_number='patchnumber';


Now if the patch is not applied then go through the read me of the patch on Metalink. Check for pre-reqs and download the patch.

2. Download the patch from http://support.oracle.com for e.g : 9936620
3. Transfer the patch on the server using FTP software.
4. Unzip the patch on the server.
5. Source the Application environment file (APPS<SID>_HOSTNAME.env).
6. Stop the apps services
./adstpall.sh apps/password
7. Bounce the database(This is not mandatory but it kills any hanging process)
./addbctl.sh stop immediate
./addlnctl.sh stop listnername
./addlnctl.sh start listnername
./addbctl.sh start
6. Put the system in Maintenance mode
Run adadmin--Goto step 5-Change Maintenance mode-step 1 Enable Maintenance mode

Note: If you do want to stop all application services and put application in maintenance mode, You can apply patch by using hotpatch option.
e.g: adpatch options=hotpatch

7. Goto the patch directory where you downloaded the patch.Unzip the patch as applmgr user(application owner).It will create a directory with the patch number.
8. Goto the directory with the patch number and run
$ adpatch
It will ask for patch log file,apps,system password,driver name(c,d,g,u),number of workers.

Note: If you have multi-node environment, then start applying patch from concurrent processing node.

9. Go through the patch log file and check that there is no error
10. Disable maintenance mode
Run adadmin--Goto step 5-Change Maintenance mode-step 2 Dis-able Maintenance mode
11. Bounce the database again
12. Start the apps services
./adstartal.sh apps/password



No comments:

Post a Comment