Tuesday, December 07, 2010

Apply Patch ---

Steps For Applying Patch: - 


=~=~=~=~=~=~=~=~==~=~ 
  Before  Applying Patch
=~=~=~=~=~=~=~=~==~=~


Download the Patch File.
Save the patch file on desktop.

[root@testerp ~]# cd Desktop
[root@testerp Desktop]# chmod 777 p8786999_R12.PJT.B_R12_GENERIC.zip 
[root@testerp ~]# su - appldev
[appldev@testerp ~]$ cp p8786999_R12.PJT.B_R12_GENERIC.zip  /home/appldev
[appldev@testerp ~]$ cd /home/appldev
[appldev@testerp ~]$ chown appldev.dba p8786999_R12.PJT.B_R12_GENERIC.zip

[root@testerp ~]# ps -ef |grep appldev
[root@testerp ~]# id
=~=~=~=~=~=~=~=~=~=~=~==~=~=~==~=~=~==~=~=~=~=~=~=~=~=~=~==~=~=~=~=~=~=~=~=~==
=~~=      uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel)
=~=~=~=~=~=~=~=~=~=~=~==~=~=~==~=~=~==~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~==~=~=~==

[root@testerp ~]# su - appldev
[appldev@testerp ]$ cd $ADMIN_SCRIPTS_HOME
[appldev@testerp scripts]$ ps -ef|grep appldev


 1.   Stop Application

[appldev@testerp scripts]$ ./adstpall.sh apps/apps

=~=~=~=~=~=~==~=~=~==~=~=~=
To kill a process (if error occured)
=~=~=~=~=~=~=~~=~=~==~=~=~=

=~=~=~      [appldev@testerp scripts]$ ps -ef|grep appldev
=~=~=~      [appldev@testerp scripts]$ ps -ef|grep appldev|wc -l
=~=~=~      [appldev@testerp scripts]$ kill -9 14113
=~=~=~      [appldev@testerp scripts]$ kill -9 12618 12657 12385
=~=~=~      [appldev@testerp scripts]$ kill -9 12385
=~=~=~      [appldev@testerp scripts]$ ./adcmctl.sh abort apps/apps
=~=~=~=~=~=~=~=~=~=~=~===


=~=~=~=~=~=~=~
   Apply Patch
=~=~=~=~=~=~=~



2 . Change Mantainance Mode : -


[appldev@testerp ~]$ adadmin
  AD Administration Main Menu
   --------------------------------------------------
   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


Enter your choice [6] : 5
***************************************************************
***   Change Maintenance Mode
***   -------------------------
***   Maintenance Mode is currently: [Disabled].
***   Maintenance mode should normally be enabled when patching
***   Oracle Applications and disabled when users are logged on
***   to the system.  See the Oracle Applications Maintenance
***   Utilities manual for more information about maintenance mode.
***************************************************************



3 . Enable Mantainance Mode : -

    Please select an option:
---------------------------------------------
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu

Enter your choice [3] : 1
***************************************************************
***   Change Maintenance Mode
***   -------------------------
***   Maintenance Mode is currently: [Enabled].
***  
***   Maintenance mode should normally be enabled when patching
***   Oracle Applications and disabled when users are logged on
***   to the system.  See the Oracle Applications Maintenance
***   Utilities manual for more information about maintenance mode.
***************************************************************

 [appldev@testerp ~]$ sqlplus apps/apps

SQL> select count(*),status from dba_objects group by status;
******************************************
***     COUNT(*)              STATUS
***     ----------                       -------
***       19                           INVALID
***       316522                   VALID
******************************************


SQL> select object_name,owner from dba_objects where status='INVALID';
**********************************************
***     OBJECT_NAME                             OWNER
***    ---------------------                                   ---------
***     PA_PROJ_ACCUM_MAIN             APPS
***     PA_TXN_ACCUMS                          APPS
***     PA_CHECK_COMMITMENTS      APPS

**********************************************

SQL> exit
 [appldev@testerp ~]$ cd
[appldev@testerp ~]$ ls -ltr

4 . Apply Patch (unzip the patch file then run adpatch)


[appldev@testerp ~]$ unzip p8786999_R12.PJT.B_R12_GENERIC.zip
[appldev@testerp ~]$ cd 8786999/
[appldev@testerp 8786999]$ ls -ltr

[appldev@testerp 8786999]$ adpatch
Filename [adpatch.log] : 8786999.log

[appldev@testerp 8786999]$ sqlplus apps/apps

SQL> select count(*),status from dba_objects group by status;
****************************************
***     COUNT(*)  STATUS
***     ---------- -------
***       5       INVALID
***       316536  VALID
****************************************


SQL> select object_name , owner from dba_object  s where status = 'INVALID';
************************************************
***     OBJECT_NAME                  OWNER
***     ----------------------------------
***     OPI_EDW_COGS_F_C             APPS
***     OPI_EDW_OPM_JOB_RSRC_F_C     APPS
***     OPI_EDW_OPM_JOB_DETAIL_F_C   APPS
************************************************


SQL> exit


=~=~=~=~=~=~=~=~=~==~=~
   After Applying Patch
=~=~=~=~=~=~=~=~=~==~=~


[appldev@testerp 8786999]$ adadmin

5 . Change Mantainance Mode : -


          AD Administration Main Menu
   --------------------------------------------------
   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

Enter your choice [6] : 5


6 . Disable Mantainance Mode : -

Please select an option:
   1.    Enable Maintenance Mode
   2.    Disable Maintenance Mode
   3.    Return to Main Menu

Enter your choice [3] : 2

[appldev@testerp 8786999]$ sqlplus apps

SQL> !pwd
/home/appldev/8786999

SQL> select * from ad_bugs where bug_number=8786999;
SQL> select 'installed' from ad_bugs where bug_number=8786999;

Patch Information: - 
SQL> SELECT * FROM
(SELECT bug_number AS Patch
FROM ad_bugs UNION SELECT patch_name AS Patch FROM ad_applied_patches)
WHERE Patch IN (’Patch_Number’);


SQL> exit

7 . Start  Application

[appldev@testerp 8786999]$ cd $ADMIN_SCRIPTS_HOME
[appldev@testerp scripts]$ ./adstrtal.sh apps/apps


[appldev@testerp scripts]$ ps -ef|grep tns
[appldev@testerp scripts]$ ps -ef|grep FNDLIBR
[appldev@testerp scripts]$ ps -ef|grep appldev
[appldev@testerp sql]$ ps -ef|grep pmon

[appldev@testerp scripts]$ exit
[root@testerp ~]# exit


Regards,
Sukhwinder Singh

.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

There was an error in this gadget