Oracle Patch的分类
a,临时补丁interim patch
该补丁也称一次性补丁one-off patch,是Oracle针对特定的bug而发行的临时补丁.
参见官方文档:http://docs.oracle.com/cd/B19306_01/em.102/b16227/oui8_opatch.htm#sthref448
b,CPU(Critical Patch Update)
参见官方文档:http://www.oracle.com/technetwork/topics/security/alerts-086861.html
参见Maclean文档:http://www.oracledatabase12g.com/archives/%E4%BA%86%E8%A7%A3oracle-critical-patch-update.html
c,PSU(Patch Set Update)
版本号的第5位表示
参见Dave文档:http://blog.csdn.net/tianlesoftware/article/details/5809526
参见Kamusis文档:http://www.dbform.com/html/2011/1518.html
d,PSR(Patch Set Release)
版本号的第4位表示
CPU与PSU的共同点与区别
a,CPU仅仅是指安全补丁,而PSU则包含了最新的CPU与其他patch.
b,CPU是累积,最新的CPU则包含以往所有的CPU内容,只需安装最新的PSR之后就可以安装最新的CPU,而PSU则需要在低版本的PSU上一步步升级安装(不对吧!The PSU patches are packaged as one cumulative patch. The PSU can coexist with any one-off patch that does not conflict with it.).
Oracle Patch的安装
例子1:安装interim(one-off)补丁
故障描述:
安装步骤:
1),关闭RDBMS实例与监听
2),[oracle@oracle ~]$ cp p4519934_10201_LINUX.zip $ORACLE_HOME/OPatch
3),[oracle@oracle OPatch]$ cd $ORACLE_HOME/OPatch
4),[oracle@oracle OPatch]$ unzip p4519934_10201_LINUX.zip
5),[oracle@oracle OPatch]$ cd 4519934
6),[oracle@oracle 4519934]$ ../opatch apply
7),[oracle@oracle 4519934]$ ../opatch lsinventory -detail
8),开启监听与RDBMS实例
9),Note:If a patch consists of SQL changes, follow the instructions in the patch readme, included with the patch to apply the SQL scripts.
最后在readme文档中有指定的SQL脚本执行,所有的RDMBS数据库下都要运行.
# Patch Special Instructions:
# ---------------------------
# Connect as SYS
# Then run rdbms/admin/prvtdadv.plb
# Then run rdbms/admin/prvtspcu.plb
例子2:安装CPU,以CPUJul2012为例
环境:Oracle 11.2.0.3.0 Linux5.6 x86
升级:CPUJul2012(为最新的CPU)
步骤:阅读安装包的README.html文档
1),下载p14038787_112030_LINUX.zip,该包为CPUJul2012
2),下载最新的OPatch p6880880_112000_LINUX.zip,为最新的11.2.0.3.0的OPatch
3),解压OPatch包,将原来的OPatch覆盖,更新为最新的即可.
4),cd $ORALCE_HOME/OPatch
unzip p6880880_112000_LINUX.zip
5),检查冲突
cd $ORACLE_HOME/OPatch/14038787
../opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./14038787
../opatch prereq CheckConflictAmongPatchesWithDetail -phBaseDir ./14038787
6),没有冲突的话,关闭数据库,接着安装。
7),../opatch napply -skip_subset -skip_duplicate
8),启动数据库实例,更新RDBMS的数据字典
SQL>@?/rdbms/admin/catbundle.sql cpu apply
9),确认是否成功安装CPU
set lines 191 pages 100
col action_time for a30
col action for a20
col VERSION for a20
col COMMENTS for a40
col BUNDLE_SERIES for a20
col NAMESPACE for a20
select * from registry$history;
SQL> select action_time,action,comments from registry$history;
ACTION_TIME ACTION COMMENTS
------------------------------ ------------------------------ --------------------------------------------------
18-SEP-11 06.02.59.465921 PM APPLY Patchset 11.2.0.2.0
12-MAY-12 03.41.35.805037 AM APPLY Patchset 11.2.0.2.0
25-SEP-12 05.19.19.245123 PM APPLY CPUJul2012
10),检查结果
1),安装前的准备
检查OPatch的版本
检查patch是否冲突,官方推荐如下。
注意查看patch的安装日志,进行问题确认。
3),更新数据字典。
a,临时补丁interim patch
该补丁也称一次性补丁one-off patch,是Oracle针对特定的bug而发行的临时补丁.
参见官方文档:http://docs.oracle.com/cd/B19306_01/em.102/b16227/oui8_opatch.htm#sthref448
b,CPU(Critical Patch Update)
参见官方文档:http://www.oracle.com/technetwork/topics/security/alerts-086861.html
参见Maclean文档:http://www.oracledatabase12g.com/archives/%E4%BA%86%E8%A7%A3oracle-critical-patch-update.html
c,PSU(Patch Set Update)
版本号的第5位表示
参见Dave文档:http://blog.csdn.net/tianlesoftware/article/details/5809526
参见Kamusis文档:http://www.dbform.com/html/2011/1518.html
d,PSR(Patch Set Release)
版本号的第4位表示
CPU与PSU的共同点与区别
a,CPU仅仅是指安全补丁,而PSU则包含了最新的CPU与其他patch.
b,CPU是累积,最新的CPU则包含以往所有的CPU内容,只需安装最新的PSR之后就可以安装最新的CPU,而PSU则需要在低版本的PSU上一步步升级安装(不对吧!The PSU patches are packaged as one cumulative patch. The PSU can coexist with any one-off patch that does not conflict with it.).
Oracle Patch的安装
例子1:安装interim(one-off)补丁
故障描述:
Thu Sep 20 22:01:02 2012
Errors in file /u01/app/oracle/admin/RDPSDB/bdump/rdpsdb_j002_29257.trc:
ORA-12012: error on auto execute of job 8887
ORA-44003: invalid SQL name
安装补丁:p4519934_10201_LINUX.zip安装步骤:
1),关闭RDBMS实例与监听
2),[oracle@oracle ~]$ cp p4519934_10201_LINUX.zip $ORACLE_HOME/OPatch
3),[oracle@oracle OPatch]$ cd $ORACLE_HOME/OPatch
4),[oracle@oracle OPatch]$ unzip p4519934_10201_LINUX.zip
5),[oracle@oracle OPatch]$ cd 4519934
6),[oracle@oracle 4519934]$ ../opatch apply
7),[oracle@oracle 4519934]$ ../opatch lsinventory -detail
8),开启监听与RDBMS实例
9),Note:If a patch consists of SQL changes, follow the instructions in the patch readme, included with the patch to apply the SQL scripts.
最后在readme文档中有指定的SQL脚本执行,所有的RDMBS数据库下都要运行.
# Patch Special Instructions:
# ---------------------------
# Connect as SYS
# Then run rdbms/admin/prvtdadv.plb
# Then run rdbms/admin/prvtspcu.plb
例子2:安装CPU,以CPUJul2012为例
环境:Oracle 11.2.0.3.0 Linux5.6 x86
升级:CPUJul2012(为最新的CPU)
步骤:阅读安装包的README.html文档
1),下载p14038787_112030_LINUX.zip,该包为CPUJul2012
2),下载最新的OPatch p6880880_112000_LINUX.zip,为最新的11.2.0.3.0的OPatch
3),解压OPatch包,将原来的OPatch覆盖,更新为最新的即可.
4),cd $ORALCE_HOME/OPatch
unzip p6880880_112000_LINUX.zip
5),检查冲突
cd $ORACLE_HOME/OPatch/14038787
../opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./14038787
../opatch prereq CheckConflictAmongPatchesWithDetail -phBaseDir ./14038787
6),没有冲突的话,关闭数据库,接着安装。
7),../opatch napply -skip_subset -skip_duplicate
8),启动数据库实例,更新RDBMS的数据字典
SQL>@?/rdbms/admin/catbundle.sql cpu apply
9),确认是否成功安装CPU
set lines 191 pages 100
col action_time for a30
col action for a20
col VERSION for a20
col COMMENTS for a40
col BUNDLE_SERIES for a20
col NAMESPACE for a20
select * from registry$history;
SQL> select action_time,action,comments from registry$history;
ACTION_TIME ACTION COMMENTS
------------------------------ ------------------------------ --------------------------------------------------
18-SEP-11 06.02.59.465921 PM APPLY Patchset 11.2.0.2.0
12-MAY-12 03.41.35.805037 AM APPLY Patchset 11.2.0.2.0
25-SEP-12 05.19.19.245123 PM APPLY CPUJul2012
10),检查结果
ora11gr2.sannet.net | ORA11G | /home/oracle > opatch lsinventory -bugs_fixed
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0.3.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/opatch2012-12-03_14-44-32PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2012-12-03_14-44-32PM.txt
------------------------------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.
List of Bugs fixed by Installed Patches:
Bug Fixed by Installed at Description
Patch
--- -------- ------------ -----------
12748240 14063281 Tue Sep 25 17:03:26 CST 2012 FIX FOR BUG 12748240
12780098 14063281 Tue Sep 25 17:03:26 CST 2012 FIX FOR BUG 12780098
13528551 14063281 Tue Sep 25 17:03:26 CST 2012 DB-11.2.0.3-MOLECULE-002-CPUJAN2012
13772618 14063281 Tue Sep 25 17:03:26 CST 2012 DB-11.2.0.3-MOLECULE-010-CPUAPR2012
13916709 14063281 Tue Sep 25 17:03:26 CST 2012 FIX FOR BUG 13916709
14063281 14063281 Tue Sep 25 17:03:26 CST 2012 DB-11.2.0.3-MOLECULE-018-CPUJUL2012
12880299 14063280 Tue Sep 25 17:03:14 CST 2012 RAC TCP HANDLERS BLOCK IF LISTENER REGISTRATION
IS RESTRICTED TO IPC W/COST
14063280 14063280 Tue Sep 25 17:03:14 CST 2012 DB-11.2.0.3-MOLECULE-017-CPUJUL2012
14062797 14062797 Tue Sep 25 17:03:11 CST 2012 DB-11.2.0.3-MOLECULE-016-CPUJUL2012
14062796 14062796 Tue Sep 25 17:03:07 CST 2012 DB-11.2.0.3-MOLECULE-015-CPUJUL2012
14062795 14062795 Tue Sep 25 17:02:44 CST 2012 DB-11.2.0.3-MOLECULE-014-CPUJUL2012
14062794 14062794 Tue Sep 25 17:01:41 CST 2012 DB-11.2.0.3-MOLECULE-013-CPUJUL2012
14062793 14062793 Tue Sep 25 17:01:31 CST 2012 DB-11.2.0.3-MOLECULE-012-CPUJUL2012
14062792 14062792 Tue Sep 25 17:01:20 CST 2012 DB-11.2.0.3-MOLECULE-011-CPUJUL2012
13466801 14038787 Tue Sep 25 17:00:52 CST 2012 CPUJAN2012 DATABASE 11.2.0.3
13632717 14038787 Tue Sep 25 17:00:52 CST 2012 CPUAPR2012 DATABASE 11.2.0.3
14038787 14038787 Tue Sep 25 17:00:52 CST 2012 CPUJUL2012 DATABASE 11.2.0.3
13499128 13742464 Tue Sep 25 17:00:44 CST 2012 DB-11.2.0.3-MOLECULE-001-CPUJAN2012
13503598 13742464 Tue Sep 25 17:00:44 CST 2012 FIX FOR BUG 13503598
13554409 13742464 Tue Sep 25 17:00:44 CST 2012 FIX FOR BUG 13554409
13742464 13742464 Tue Sep 25 17:00:44 CST 2012 DB-11.2.0.3-MOLECULE-003-CPUAPR2012
13742438 13742438 Tue Sep 25 17:00:00 CST 2012 DB-11.2.0.3-MOLECULE-009-CPUAPR2012
13742437 13742437 Tue Sep 25 16:58:30 CST 2012 DB-11.2.0.3-MOLECULE-008-CPUAPR2012
13742436 13742436 Tue Sep 25 16:57:57 CST 2012 DB-11.2.0.3-MOLECULE-007-CPUAPR2012
13742435 13742435 Tue Sep 25 16:57:22 CST 2012 DB-11.2.0.3-MOLECULE-006-CPUAPR2012
13742434 13742434 Tue Sep 25 16:56:43 CST 2012 DB-11.2.0.3-MOLECULE-005-CPUAPR2012
13742433 13742433 Tue Sep 25 16:55:56 CST 2012 DB-11.2.0.3-MOLECULE-004-CPUAPR2012
------------------------------------------------------------------------------------------------------
OPatch succeeded.
ora11gr2.sannet.net | ORA11G | /u01/app/oracle/product/11.2.0.3.0/db_1/OPatch > ./opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0.3.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/opatch2012-12-03_13-15-00PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2012-12-03_13-15-00PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.
Interim patches (16) :
Patch 14063281 : applied on Tue Sep 25 17:03:26 CST 2012
Unique Patch ID: 15014402
Created on 26 Jun 2012, 23:03:16 hrs PST8PDT
Bugs fixed:
14063281, 13772618, 13528551, 13916709, 12748240, 12780098
Patch 14063280 : applied on Tue Sep 25 17:03:14 CST 2012
Unique Patch ID: 15014402
Created on 26 Jun 2012, 23:03:16 hrs PST8PDT
Bugs fixed:
14063280, 12880299
Patch 14062797 : applied on Tue Sep 25 17:03:11 CST 2012
Unique Patch ID: 15014402
Created on 26 Jun 2012, 23:03:16 hrs PST8PDT
Bugs fixed:
14062797
Patch 14062796 : applied on Tue Sep 25 17:03:07 CST 2012
Unique Patch ID: 15014402
Created on 17 Jul 2012, 04:22:18 hrs PST8PDT
Bugs fixed:
14062796
Patch 14062795 : applied on Tue Sep 25 17:02:44 CST 2012
Unique Patch ID: 15014402
Created on 26 Jun 2012, 23:03:15 hrs PST8PDT
Bugs fixed:
14062795
Patch 14062794 : applied on Tue Sep 25 17:01:41 CST 2012
Unique Patch ID: 15014402
Created on 26 Jun 2012, 23:03:15 hrs PST8PDT
Bugs fixed:
14062794
Patch 14062793 : applied on Tue Sep 25 17:01:31 CST 2012
Unique Patch ID: 15014402
Created on 26 Jun 2012, 23:03:14 hrs PST8PDT
Bugs fixed:
14062793
Patch 14062792 : applied on Tue Sep 25 17:01:20 CST 2012
Unique Patch ID: 15014402
Created on 17 Jul 2012, 04:23:23 hrs PST8PDT
Bugs fixed:
14062792
Patch 14038787 : applied on Tue Sep 25 17:00:52 CST 2012
Unique Patch ID: 15014402
Created on 1 Jul 2012, 22:48:51 hrs PST8PDT
Bugs fixed:
13466801, 13632717, 14038787
Patch 13742464 : applied on Tue Sep 25 17:00:44 CST 2012
Unique Patch ID: 15014402
Created on 12 Mar 2012, 03:27:04 hrs PST8PDT
Bugs fixed:
13499128, 13742464, 13503598, 13554409
Patch 13742438 : applied on Tue Sep 25 17:00:00 CST 2012
Unique Patch ID: 15014402
Created on 12 Mar 2012, 03:20:41 hrs PST8PDT
Bugs fixed:
13742438
Patch 13742437 : applied on Tue Sep 25 16:58:30 CST 2012
Unique Patch ID: 15014402
Created on 12 Mar 2012, 03:20:02 hrs PST8PDT
Bugs fixed:
13742437
Patch 13742436 : applied on Tue Sep 25 16:57:57 CST 2012
Unique Patch ID: 15014402
Created on 12 Mar 2012, 03:19:18 hrs PST8PDT
Bugs fixed:
13742436
Patch 13742435 : applied on Tue Sep 25 16:57:22 CST 2012
Unique Patch ID: 15014402
Created on 12 Mar 2012, 03:18:40 hrs PST8PDT
Bugs fixed:
13742435
Patch 13742434 : applied on Tue Sep 25 16:56:43 CST 2012
Unique Patch ID: 15014402
Created on 12 Mar 2012, 03:17:49 hrs PST8PDT
Bugs fixed:
13742434
Patch 13742433 : applied on Tue Sep 25 16:55:56 CST 2012
Unique Patch ID: 15014402
Created on 12 Mar 2012, 03:16:35 hrs PST8PDT
Bugs fixed:
13742433
--------------------------------------------------------------------------------
OPatch succeeded.
例子-3,在CPUJul2012的基础上,安装CPUOct2012。
1),安装前的准备
检查OPatch的版本
检查patch是否冲突,官方推荐如下。
-
Conflicts with other patches
-
Subset patches (patch to be installed is a subset of an existing patch in the Oracle Home)
-
Duplicates (patch to be installed is the same as an existing patch in the Oracle Home)
ora11gr2.sannet.net | ORA11G | /u01/app/oracle/product/11.2.0.3.0/db_1/OPatch > /u01/app/oracle/product/11.2.0.3.0/db_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /home/oracle/14390252
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0.3.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/opatch2012-12-03_13-44-09PM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
ora11gr2.sannet.net | ORA11G | /u01/app/oracle/product/11.2.0.3.0/db_1/OPatch > /u01/app/oracle/product/11.2.0.3.0/db_1/OPatch/opatch prereq CheckConflictAmongPatchesWithDetail -phBaseDir /home/oracle/14390252
2),安装patch
ora11gr2.sannet.net | ORA11G | /home/oracle/14390252 > /u01/app/oracle/product/11.2.0.3.0/db_1/OPatch/opatch napply -skip_subset -skip_duplicate
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0.3.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/opatch2012-12-03_13-46-39PM_1.log
Verifying environment and performing prerequisite checks...
The following patches are identical and are skipped:
[ 13742433 13742434 13742435 13742436 13742437 13742438 13742464 14062792 14062794 14062795 14062796 14062797 14063280 ]
Checking skip_duplicate
Checking skip_subset
Conflicts/Supersets for each patch are:
Patch : 14390252
Bug Superset of 14038787
Super set bugs are:
13466801, 13632717, 14038787
Patch : 14480674
Bug Superset of 14062793
Super set bugs are:
14062793
Patch : 14548763
Bug Superset of 14063281
Super set bugs are:
14063281, 13772618, 13528551, 13916709, 12748240, 12780098
Patches [ 14038787 14062793 14063281 ] will be rolled back.
Do you want to proceed? [y|n]
y
User Responded with: Y
OPatch continues with these patches: 14390252 14480674 14480675 14480676 14548763 14664355
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.3.0/db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '14390252' to OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Rolling back interim patch '14038787' from OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.rdbms.rsf, 11.2.0.3.0...
Patching component oracle.rdbms, 11.2.0.3.0...
RollbackSession removing interim patch '14038787' from inventory
Rolling back interim patch '14062793' from OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.rdbms, 11.2.0.3.0...
RollbackSession removing interim patch '14062793' from inventory
Rolling back interim patch '14063281' from OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.rdbms, 11.2.0.3.0...
RollbackSession removing interim patch '14063281' from inventory
OPatch back to application of the patch '14390252' after auto-rollback.
Patching component oracle.rdbms.rsf, 11.2.0.3.0...
Patching component oracle.rdbms, 11.2.0.3.0...
Verifying the update...
Applying interim patch '14480674' to OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.rdbms, 11.2.0.3.0...
Verifying the update...
Applying interim patch '14480675' to OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.network.client, 11.2.0.3.0...
Patching component oracle.network.rsf, 11.2.0.3.0...
Verifying the update...
Applying interim patch '14480676' to OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.rdbms, 11.2.0.3.0...
Verifying the update...
Applying interim patch '14548763' to OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.rdbms, 11.2.0.3.0...
Verifying the update...
Applying interim patch '14664355' to OH '/u01/app/oracle/product/11.2.0.3.0/db_1'
Patching component oracle.rdbms, 11.2.0.3.0...
Patching component oracle.rdbms.rman, 11.2.0.3.0...
Patching component oracle.rdbms.rsf, 11.2.0.3.0...
Patching component oracle.rdbms.util, 11.2.0.3.0...
Verifying the update...
Patches 14390252,14480674,14480675,14480676,14548763,14664355 successfully applied.
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/opatch2012-12-03_13-46-39PM_1.log
OPatch completed with warnings.
注意查看patch的安装日志,进行问题确认。
3),更新数据字典。
ora11gr2.sannet.net | ORA11G | /home/oracle/14390252 > cd $ORACLE_HOME/rdbms/admin
ora11gr2.sannet.net | ORA11G | /u01/app/oracle/product/11.2.0.3.0/db_1/rdbms/admin > sqlplus /nolog
SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 3 14:08:25 2012
Copyright (c) 1982, 2011, Oracle. All rights reserved.
SQL> connect / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 619360256 bytes
Fixed Size 1346700 bytes
Variable Size 486540148 bytes
Database Buffers 125829120 bytes
Redo Buffers 5644288 bytes
Database mounted.
Database opened.
SQL> @catbundle.sql cpu apply
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Generating apply and rollback scripts...
Check the following file for errors:
/u01/app/oracle/cfgtoollogs/catbundle/catbundle_CPU_ORA11G_GENERATE_2012Dec03_14_13_09.log
Apply script: /u01/app/oracle/product/11.2.0.3.0/db_1/rdbms/admin/catbundle_CPU_ORA11G_APPLY.sql
Rollback script: /u01/app/oracle/product/11.2.0.3.0/db_1/rdbms/admin/catbundle_CPU_ORA11G_ROLLBACK.sql
PL/SQL procedure successfully completed.
Executing script file...
SQL> COLUMN spool_file NEW_VALUE spool_file NOPRINT
SQL> SELECT '/u01/app/oracle/cfgtoollogs/catbundle/' || 'catbundle_CPU_' || name || '_APPLY_' || TO_CHAR(SYSDATE, 'YYYYMonDD_hh24_mi_ss', 'NLS_DATE_LANGUAGE=''AMERICAN''') || '.log' AS spool_file FROM v$database;
SQL> SPOOL &spool_file
SQL> exec dbms_registry.set_session_namespace('SERVER')
PL/SQL procedure successfully completed.
SQL> PROMPT Processing Oracle Database Packages and Types...
Processing Oracle Database Packages and Types...
SQL> ALTER SESSION SET current_schema = sys;
Session altered.
SQL> @?/patch/scripts/bug12904308.sql
SQL> Rem
SQL> Rem $Header: rdbms/admin/bug12904308.sql /st_rdbms_11.2.0.3.0dbpsu/1 2012/07/18 04:46:58 vpriyans Exp $
SQL> Rem
SQL> Rem bug12904308.sql
SQL> Rem
SQL> Rem Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
SQL> Rem
SQL> Rem NAME
SQL> Rem bug12904308.sql - Audit CREATE/DROP DIRECTORY actions by default
SQL> Rem
SQL> Rem DESCRIPTION
SQL> Rem This file enables auditing for CREATE/DROP DIRECTORY actions
SQL> Rem
SQL> Rem NOTES
SQL> Rem <other useful comments, qualifications, etc.>
SQL> Rem
SQL> Rem MODIFIED (MM/DD/YY)
SQL> Rem vpriyans 07/12/12 - Created
SQL> Rem
SQL>
SQL> Rem --Enable Audit for CREATE/DROP DIRECTORY actions
SQL> AUDIT DIRECTORY BY ACCESS;
Audit succeeded.
SQL>
SQL> ALTER SESSION SET current_schema = SYS;
Session altered.
SQL> PROMPT Updating registry...
Updating registry...
SQL> INSERT INTO registry$history
2 (action_time, action,
3 namespace, version, id,
4 bundle_series, comments)
5 VALUES
6 (SYSTIMESTAMP, 'APPLY',
7 SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),
8 '11.2.0.3',
9 4,
10 'CPU',
11 'CPUOct2012');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
/u01/app/oracle/cfgtoollogs/catbundle/catbundle_CPU_ORA11G_APPLY_2012Dec03_14_13_17.log4),检查结果
SQL> select action_time,action,comments from registry$history;
ACTION_TIME ACTION COMMENTS
------------------------------ ------------------------------ ------------------------------
18-SEP-11 06.02.59.465921 PM APPLY Patchset 11.2.0.2.0
06-MAY-12 12.25.52.774688 AM APPLY Patchset 11.2.0.2.0
25-SEP-12 06.03.03.620870 PM APPLY CPUJul2012
03-DEC-12 02.13.18.003433 PM APPLY CPUOct2012
ora11gr2.sannet.net | ORA11G | /u01/app/oracle/product/11.2.0.3.0/db_1/OPatch > ./opatch lsinventory -bugs_fixed
Oracle Interim Patch Installer version 11.2.0.3.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0.3.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.0
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/opatch2012-12-03_14-26-01PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0.3.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2012-12-03_14-26-01PM.txt
------------------------------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.
List of Bugs fixed by Installed Patches:
Bug Fixed by Installed at Description
Patch
--- -------- ------------ -----------
14664355 14664355 Mon Dec 03 13:52:56 CST 2012 DB-11.2.0.3-MOLECULE-023-CPUOCT2012
12748240 14548763 Mon Dec 03 13:52:47 CST 2012 FIX FOR BUG 12748240
12780098 14548763 Mon Dec 03 13:52:47 CST 2012 FIX FOR BUG 12780098
13528551 14548763 Mon Dec 03 13:52:47 CST 2012 DB-11.2.0.3-MOLECULE-002-CPUJAN2012
13772618 14548763 Mon Dec 03 13:52:47 CST 2012 DB-11.2.0.3-MOLECULE-010-CPUAPR2012
13916709 14548763 Mon Dec 03 13:52:47 CST 2012 FIX FOR BUG 13916709
14063281 14548763 Mon Dec 03 13:52:47 CST 2012 DB-11.2.0.3-MOLECULE-018-CPUJUL2012
14548763 14548763 Mon Dec 03 13:52:47 CST 2012 DB-11.2.0.3-MOLECULE-022-CPUOCT2012
14480676 14480676 Mon Dec 03 13:52:41 CST 2012 DB-11.2.0.3-MOLECULE-021-CPUOCT2012
14480675 14480675 Mon Dec 03 13:52:38 CST 2012 DB-11.2.0.3-MOLECULE-020-CPUOCT2012
14062793 14480674 Mon Dec 03 13:52:32 CST 2012 DB-11.2.0.3-MOLECULE-012-CPUJUL2012
14480674 14480674 Mon Dec 03 13:52:32 CST 2012 DB-11.2.0.3-MOLECULE-019-CPUOCT2012
13466801 14390252 Mon Dec 03 13:52:18 CST 2012 CPUJAN2012 DATABASE 11.2.0.3
13632717 14390252 Mon Dec 03 13:52:18 CST 2012 CPUAPR2012 DATABASE 11.2.0.3
14038787 14390252 Mon Dec 03 13:52:18 CST 2012 CPUJUL2012 DATABASE 11.2.0.3
14390252 14390252 Mon Dec 03 13:52:18 CST 2012 DATABASE SECURITY PATCH UPDATE 11.2.0.3.0 (CPUOCT2
012)
12880299 14063280 Tue Sep 25 17:03:14 CST 2012 RAC TCP HANDLERS BLOCK IF LISTENER REGISTRATION
IS RESTRICTED TO IPC W/COST
14063280 14063280 Tue Sep 25 17:03:14 CST 2012 DB-11.2.0.3-MOLECULE-017-CPUJUL2012
14062797 14062797 Tue Sep 25 17:03:11 CST 2012 DB-11.2.0.3-MOLECULE-016-CPUJUL2012
14062796 14062796 Tue Sep 25 17:03:07 CST 2012 DB-11.2.0.3-MOLECULE-015-CPUJUL2012
14062795 14062795 Tue Sep 25 17:02:44 CST 2012 DB-11.2.0.3-MOLECULE-014-CPUJUL2012
14062794 14062794 Tue Sep 25 17:01:41 CST 2012 DB-11.2.0.3-MOLECULE-013-CPUJUL2012
14062792 14062792 Tue Sep 25 17:01:20 CST 2012 DB-11.2.0.3-MOLECULE-011-CPUJUL2012
13499128 13742464 Tue Sep 25 17:00:44 CST 2012 DB-11.2.0.3-MOLECULE-001-CPUJAN2012
13503598 13742464 Tue Sep 25 17:00:44 CST 2012 FIX FOR BUG 13503598
13554409 13742464 Tue Sep 25 17:00:44 CST 2012 FIX FOR BUG 13554409
13742464 13742464 Tue Sep 25 17:00:44 CST 2012 DB-11.2.0.3-MOLECULE-003-CPUAPR2012
13742438 13742438 Tue Sep 25 17:00:00 CST 2012 DB-11.2.0.3-MOLECULE-009-CPUAPR2012
13742437 13742437 Tue Sep 25 16:58:30 CST 2012 DB-11.2.0.3-MOLECULE-008-CPUAPR2012
13742436 13742436 Tue Sep 25 16:57:57 CST 2012 DB-11.2.0.3-MOLECULE-007-CPUAPR2012
13742435 13742435 Tue Sep 25 16:57:22 CST 2012 DB-11.2.0.3-MOLECULE-006-CPUAPR2012
13742434 13742434 Tue Sep 25 16:56:43 CST 2012 DB-11.2.0.3-MOLECULE-005-CPUAPR2012
13742433 13742433 Tue Sep 25 16:55:56 CST 2012 DB-11.2.0.3-MOLECULE-004-CPUAPR2012
------------------------------------------------------------------------------------------------------
OPatch succeeded.
结果对比