如何如何打PSU补丁(11g RAC 升级11.2.0.2.1到最新的PSU11.2.0.2.4)

目的:11g RAC 升级11.2.0.2.1到最新的PSU11.2.0.2.4

1,metalink上下载最新的补丁,下载最新的Opatch

2,node3上停CRS等,更新OPatch版本,生成rsp文件,其它主机也会做同样操作

先生成rsp文件
cd /oracle/11.2.0/grid/OPatch/ocm/bin
./emocmrsp


As root user execute:

<GI_HOME>/bin/crsctl start crs

unzip <OPATCH-ZIP> -d <ORACLE_HOME>
<ORACLE_HOME>/OPatch/opatch version

su - grid
unzip /oracle/patchs/p6880880_112000_Linux-x86-64.zip -d /oracle/11.2.0/grid

su - oracle
unzip /oracle/patchs/p6880880_112000_Linux-x86-64.zip -d /oracle/app/oracle/product/11.2.0/db_1

验证补丁是否冲突

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./12827726
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./12827731

3,node5上手工打补丁

$GRID_HOME/OPatch/opatch napply -oh $GRID_HOME -local /oracle/patchs/12827731

/oracle/11.2.0/grid/OPatch/p12827731/12827731/custom/server/12827731/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME

/oracle/11.2.0/grid/OPatch/p12827731/12827731/custom/server/12827731/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /oracle/11.2.0/grid/OPatch/p12827731/12827726

$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /oracle/11.2.0/grid/OPatch/p12827731/12827731/custom/server/12827731


/oracle/11.2.0/grid/OPatch/p12827731/12827731/custom/server/12827731/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME

其中/oracle/11.2.0/grid/OPatch/p12827731为解压后的地址

4,node4上自动打补丁

su - oracle

[oracle@dtydb4 ~]$ emctl stop dbconsole

As the Grid home owner execute:

$GRID_HOME/OPatch/ocm/bin/emocmrsp


su - grid
unzip /oracle/patchs/p6880880_112000_Linux-x86-64.zip -d /oracle/11.2.0/grid

su - oracle
unzip /oracle/patchs/p6880880_112000_Linux-x86-64.zip -d /oracle/app/oracle/product/11.2.0/db_1

验证补丁版本
$ORACLE_HOME/OPatch/opatch lsinventory

先生成rsp文件
cd /oracle/11.2.0/grid/OPatch/ocm/bin
./emocmrsp

Follow these instructions in this section if the GI home is not shared and none of the Oracle database homes is shared.

As root user execute the following command on each node of the cluster:

/oracle/11.2.0/grid/OPatch/opatch auto /oracle/patchs

/oracle/11.2.0/grid/OPatch/ocm/bin/ocm.rsp

[root@dtydb4 patchs]# /oracle/11.2.0/grid/OPatch/opatch auto /oracle/patchs
Executing /usr/bin/perl /oracle/11.2.0/grid/OPatch/crs/patch112.pl -patchdir /oracle -patchn patchs -paramfile /oracle/11.2.0/grid/crs/install/crsconfig_params
opatch auto log file location is /oracle/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2012-01-13_09-47-25.log
Detected Oracle Clusterware install
Using configuration parameter file: /oracle/11.2.0/grid/crs/install/crsconfig_params
OPatch  is bundled with OCM, Enter the absolute OCM response file path:
/oracle/11.2.0/grid/OPatch/ocm/bin/ocm.rsp
patch /oracle/patchs/12827731/custom/server/12827731  apply successful for home  /oracle/app/oracle/product/11.2.0/db_1
patch /oracle/patchs/12827726  apply successful for home  /oracle/app/oracle/product/11.2.0/db_1
Successfully unlock /oracle/11.2.0/grid
The opatch Applicable check failed for /oracle/11.2.0/grid.  The patch is not applicable for /oracle/11.2.0/grid
patch /oracle/patchs/12827731  apply  failed  for home  /oracle/11.2.0/grid
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing previous ADVM/ACFS installation.
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies - this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4123: Oracle High Availability Services has been started.


在打补丁的同时,CRS会自动重启
[grid@dtydb4 ~]$ crs_stat -t
CRS-0184: Cannot communicate with the CRS daemon.


/oracle/11.2.0/grid/bin/crsctl stop crs

5,node3上自动打补丁,过程同上
6,
For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT

参看文档

http://oracledba.flyingamigos.com/archives/294

补丁里含的官方文档


你可能感兴趣的:(oracle,File,database,dependencies,patch,Components)