Wednesday, 7 December 2016

HOW TO APPLY APPS PATCH USING ADPATCH in R12.1.3


PATCH 
Patch is a program (set of instructions) to fix a particular problem or enhance/ add a particular feature in existing program/product/software. 

When ever applying an application patch, always must should follow the Readme.txt or Readme.html file. And always advised to first test the patches on Test Environment, then go for production Environment.

Step 1: Download the patch to your  pc and transfer it to Linux server
login to oracle metalink.(www.metalink.oracle.com)
Select the patches option then select the search type.

Query for patch by writing the patch no. & platform on which you want to download the patch.
Click download.
If you have downloaded the patch at desktop then move it to directory where you want it to unzip. With Winscp or any other software.

Step 2: Unzip the patch. And set the permission

[oracle@r12 bin]$ pwd

/opt/oracle/VIS/apps/apps_st/appl/ad/12.0.0/bin
 

[oracle@r12 bin]$ unzip p9501440_R12.XDO.B_R12_GENERIC.zip
 

[oracle@r12 bin]$ chmod 755 9501440

Step 3: Before applying a patch you must check whether the patch is already there or not and check for number of invalid objects. For this we query the database:

[root@r12 ~]# su - oracle
[oracle@r12 ~]$ sqlplus apps/*****

SQL>
select * from AD_BUGS where bug_number='<patch number>';

For Example:
SQL> select * from AD_BUGS where bug_number='9501440';
no rows selected


Check for INVALID objects.

SQL>Select count(*) from dba_objects where status='INVALID';


Step 4: Run the environment variable for application on Application Tier.

[applmgr@r12 appl]$ cd /opt/oracle/VIS/apps/apps_st/appl/
[applmgr@r12 appl]$ . ./APPSVIS_r12.env

Step 5: Stop the application with adstpall.sh utility. We are stopping applications because we are not using Hot Patch.
(Please Note: Database and Listener should be up)

[applmgr@r12 scripts]$ pwd
/opt/oracle/VIS/inst/apps/VIS_r12/admin/scripts


[applmgr@r12 scripts]$ ./adstpall.sh apps/*****

Step 6: Enable the Maintenance Mode

[applmgr@r12 bin]$ pwd
/opt/oracle/VIS/apps/apps_st/appl/ad/12.0.0/bin
[applmgr@r12 bin]$ ./adadmin

* Provide patch log file name as: 
Filename [admin.log]: patchnumber.log

* Batchsize leav it as default, hit enter.
Batchsize [1000]:

* Enter the password for SYSTEM, and then apps password. 
By Default System and Apps password is as shown below:

Enter the password for your 'SYSTEM' ORACLE schema: manager
Enter the ORACLE password of Application Object Library [APPS]: apps

1. Generate Applications Files menu

2. Maintain Applications Files menu

3. Compile/Reload Applications Database Entities menu

4. Maintain Applications Database Entities menu

5. Change Maintenance Mode

6. Exit AD Administration

* Select an option 5 and press enter key to Change Maintenance Mode.

* Then, Select an option 1 and press enter to Enable Maintenance Mode.

* Press enter to continue.

* Select option 3 and press Enter key to return to main menu .

* Press enter to Exit AD Administration

Step 7: Run autopatch from the patch directory by entering the following command:

[applmgr@r12 bin]$ pwd
/opt/oracle/VIS/apps/apps_st/appl/ad/12.0.0/bin

[applmgr@r12 bin]$ ls -l adpatch
-rwxrwxrwx 1 oracle oinstall 9380 Mar 31  2009 adpatch
[applmgr@r12 bin]$ ./adpatch


After applying successfully patch, Check for Number of Invalid Objects from below command:

SQL>Select count(*) from dba_objects where status='INVALID';

Step 8: Disabling maintenance mode.

The disabling steps are just same as enabling maintenance mode as shown above steps only the thing is you have to select 2 option to Disable maintenance Mode.
After running

./adadmin read carefully options and choose as 5->2->3->6.

5--> Change maintenance mode.
2--> Disable  maintenance mode.
3--> Return to Main Menu.
6--> Exit AD Administration.




Hope this is useful and helpful. I really appreciate if anybody can suggest better points. Please let us know for any concerns @ Contact Us ora-data.blogspot.com


Some more useful links:

Adop patching in R12.2 Q & A

R12.1 Vs R12.2

SESSION Concepts and Details

Interviews Questions & Answers

Job Tips

Thanks.


No comments:

Post a Comment

Thank you for your comments and suggestions. It's good to talk you.