ITPub博客

首页 > Linux操作系统 > Linux操作系统 > CRS Patch 升級注意事項

CRS Patch 升級注意事項

原创 Linux操作系统 作者:cwyx2004 时间:2012-03-27 23:16:08 0 删除 编辑

When applying a needed patch to the Grid Infrastructure Home for ASM or CRS the opatch utility may error out with the messages:

 

ApplySession failed: ApplySession failed to prepare the system. ApplySession was not able to create the patch_storage area: /oragrid/rdb_v112/.patch_storage/
System intact, OPatch will not attempt to restore the system

OPatch failed with error code 73

 

       These errors can be found in the opatch.log file in grid_home/cfgtoollogs/opatch directory.
       The reason for these messages are the permissions of the Grid Infrastructure Home.
The grid home needs to be unlocked before a patch can be applied.


Solution


The needed command to unlock the grid home is described in

Oracle® Grid Infrastructure Installation Guide
11g Release 2 (11.2) for Linux (or other platform)
Part Number E10812-03
Chapter 5.4 Modifying Oracle Clusterware Binaries After Installation


       After installation, if you need to modify the Oracle Clusterware configuration, then you must unlock the Grid home.       Please check this chapter for more detailed instructions.

The basic steps needed are:

Unzip the the patch file into a patch location on all nodes. This is becuase we will do a rolling patch by 
stopping processes patching the homes and starting processes one node at a time using the -local flag.

1. Stop the CRS managed resources running from DB homes ( as the DB_HOME owner ) using

 

$DB_HOME/bin/srvctl stop home -o -s -n 
 


 
 note the status file is created by the process 

2. As root user change directory to the path Grid_home/crs/install, where Grid_home is the path to the Grid home, and unlock the Grid home using the command rootcrs.pl -unlock -crshome Grid_home, where Grid_home is the path to your Grid infrastructure home. For example, with the grid home /u01/app/11.2.0/grid, enter the following command:

# cd /u01/app/11.2.0/grid/crs/install
# perl rootcrs.pl -unlock -crshome /u01/app/11.2.0/grid


3. change user to grid software owner and apply the patch according its readme


/u01/app/11.2.0/grid/OPatch/opatch napply -oh -local



4. if requested in readme file of patch run the pre script. for DB component of the patch using (As DB Home Privilige User)

 patch location/custom/server/patch id/custom/scripts/prepatch.sh  -dbhome


5. Apply the DB patch using (As DB Home Privilige User) (if needed and stated in readme file. This example is for a bundle patch containing a CRS portion and a RDBMS portion)

   

/OPatch/opatch napply -oh -local /custom/server/

 Note here the sub-directory of the patch.

6. . Run the post script. for DB component of the patch using (As DB Home Privilige User) (if requested in readme file)

patch location/custom/server/patch id/custom/scripts/postpatch.sh -dbhome


7. Run the post script. (As Root Privilege User)

# cd /u01/app/11.2.0/grid/crs/install
# perl rootcrs.pl -patch



8. Start the CRS managed resources that were earlier running from DB homes using

/bin/srvctl start home -o -s -n 



9. Repeat steps 1 through 8 on each cluster member node.

These are the general commands to apply a patch to grid home. Make sure to read the readme file of the patch You are going to apply as additional steps may be needed.
The rootcrs.pl script. to unlock and patch grid home may not be mentioned in the particular readme.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/23908627/viewspace-719683/,如需转载,请注明出处,否则将追究法律责任。

下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2011-05-30

  • 博文量
    3
  • 访问量
    8673