Wednesday 7 December 2016

HOW TO APPLY APPS PATCH USING ADPATCH in R12.1.3

Hi DBA-Mates,
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.

Search 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 transfer it to Linux server by using Winscp or any other software.

Note:

Here, you can download the patch and put in any directory.
Unzip the patch.

But while running adpatch it will ask like below path where we need to provide the patch location:

Enter the directory where your Oracle Applications patch has been unloaded

The default directory is [/proxy/ebs/uat01/apps/apps_st/appl/ad/12.0.0/bin] : /<patch directory>

Note: To run the adadmin we need to go adadmin directory. If you are not sure ten you can use below command as:
$ which adadmin
$APPL_TOP/ad/12.0.0/bin/adadmin

Same way if you want to run adpatch then we need to go adpatch directory. If you are not sure then you can use below command as:
$ which adpatch
$APPL_TOP/ad/12.0.0/bin/adpatch

In below example, we are putting patches in same location at adpatch.

Step 2: Unzip the patch. And set the permission

$
pwd
/opt/oracle/VIS/apps/apps_st/appl/ad/12.0.0/bin
 
$ unzip p9501440_R12.XDO.B_R12_GENERIC.zip
 
$ chmod 755 9501440

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

[root@r12 ~]# 
su - oracle
$ 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';

SQL> select owner,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where STATUS='INVALID';


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

$ cd /opt/oracle/VIS/apps/apps_st/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)

pwd
/opt/oracle/VIS/inst/apps/VIS_r12/admin/scripts

$ 
./adstpall.sh apps/*****

Step 6Enable the Maintenance Mode

$
pwd
/opt/oracle/VIS/apps/apps_st/appl/ad/12.0.0/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 (adpatch) from the patch directory by entering the following command:

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

ls -l adpatch
-rwxrwxrwx 1 oracle oinstall 9380 Mar 31  2009 adpatch
$
./adpatch


After applying successfully patch disable the Maintenance mode as below.

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 options 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.

Step 9: After disabling the Maintenance Mode, we need to start the services.

$cd $ADMIN_SCRIPTS_HOME

$./adstrtal.sh apps/<apps_pwd>

After checking all the services from backend like:
$ps –ef|grep applmgr |wc –l
Or
$ps –ef|grep FNDLIBR
Or
$ps –ef|grep FND*

Once all the services are UP and Running.

Step 10: Check for Number of Invalid Objects from below command:

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

SQL> select owner,OBJECT_NAME,OBJECT_TYPE,STATUS from dba_objects where STATUS='INVALID';

If there is any new invalid objects then need to recompile.

Then does the front-end sanity check such as checking all the Concurrent Manager’s status and Submit a request.

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

Quick Check or High level patching steps in R12.1.3
1.   Careful during download the patch about the version i.e. R12.1.3 or R12.2
2.   Readme.html carefully.
3.   Check for any Pre-req patches.
4.   Check the correct hostname or server.
5.   Check the patch is applied or not.
6.   Check for Pre-Invalid Objects.
7.   Down the services if mentioned in Readme.html
8.   Enable the Maintenance mode.
9.   Apply the patch.
10.        Check the patch is applied or not.
11.        Disable the Maintenance mode.
12.        Start the services
13.        Check for Post-Invalid Objects.
14.        Release the instance

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

11 comments:

  1. Hi there everyone, it's my first pay a quick visit at this web page, and piece
    of writing is really fruitful in favor of me, keep up posting these
    content.

    ReplyDelete
    Replies

    1. Dear User,

      Thank you very much for your feedback.
      We have written more post such valuable post such as:
      R12.2 CLONING STEPS BY STEPS
      HOW TO APPLY CPU PATCH OCT 2015

      Regards,
      ora-data Team

      Delete
  2. An impressive share! I've just forwarded this onto a friend who was doing
    a little research on this. And he actually ordered
    me breakfast because I found it for him... lol. So let me reword this....

    Thank YOU for the meal!! But yeah, thanx for spending the time to talk about this matter here
    on your blog.

    ReplyDelete
  3. Would love to forever get updated outstanding weblog!

    ReplyDelete
    Replies
    1. Dear User,
      Thank you very much for your valuable feedback...

      Regards,
      ora-data Team

      Delete
  4. I know this website presents quality depending posts and other stuff,
    is there any other web site which gives these kinds of information in quality?

    ReplyDelete
  5. Hi, I do think this is an excellent website. I stumbledupon it ;) I am going to return yet again since I bookmarked it.
    Money and freedom is the greatest way to change, may you be rich and
    continue to help other people.

    ReplyDelete
  6. Hey I know this is off topic but I was wondering if you knew of any widgets I could
    add to my blog that automatically tweet my newest twitter updates.
    I've been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience
    with something like this. Please let me know if you run into anything.
    I truly enjoy reading your blog and I look forward to your new updates.

    ReplyDelete
  7. I'm not certain where you are getting your information, however great
    topic. I needs to spend some time learning more or working out more.

    Thank you for fantastic info I used to be searching for this information for my mission.

    ReplyDelete
  8. I’ll immediately clutch your rss as I can not find your email subscription hyperlink or e-newsletter service.
    Do you’ve any? Please permit me recognize in order that I
    may subscribe. Thanks. I’ve been surfing online more than three hours today, yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my view, if all website owners and bloggers
    made good content as you did, the net will be much more useful than ever before.
    Ahaa, its nice discussion regarding this post at this place at this weblog, I have read
    all that, so at this time me also commenting at this place.
    http://foxnews.net

    ReplyDelete

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