Oracle的补丁一般都会有README.html,里面有详细的更新该补丁的介绍。

以下为我打补丁的记录:

1、You must use the OPatch utility release 10.2.0.2 It is available in $ORACLE_HOME.

  文档中提到OPatch 工具版本必须为10.2.0.2,故首先对OPatch版本进行检查。

[oracle@carefree ~]$ $ORACLE_HOME/OPatch/opatch lsinventoryInvoking OPatch 10.2.0.2.0

2、版本符合,开始解压补丁,应用补丁

[oracle@carefree ~]$ unzip p5490848_10202_LINUX.zipArchive:  p5490848_10202_LINUX.zip   creating: 5490848/........[oracle@carefree ~]$ cd 5490848[oracle@carefree 5490848]$ $ORACLE_HOME/OPatch/opatch applyInvoking OPatch 10.2.0.2.0......

3、启动实例,运行相关脚本

cd $ORACLE_HOME/cpu/CPUOct2006sqlplus /nolog
SQL> CONNECT /AS SYSDBASQL> STARTUPSQL> @catcpu.sqlSQL> @?/rdbms/adminutlrp.sqlSQL> SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS= 'INVALID';

4、查询补丁信息

   select * from dba_registry_history;

注意:打补丁之前,管理数据库实例,以及相关的信息

emctl stop dbconsole

isqlplusctl stop

lsnrctl stop

shutdwon immediate

5、回滚

cd 5490848$ORACLE_HOME/OPatch/opatch rollback -id 5490848cd $ORACLE_HOME/cpu/CPUOct2007sqlplus /nologSQL> CONNECT / AS SYSDBASQL> STARTUPSQL> @catcpu_rollback.sqlSQL> @?/rdbms/adminutlrp.sql SQL> SELECT OBJECT_NAME FROM DBA_OBJECTS WHERE STATUS = 'INVALID';