方法一:登录数据库,检查DBA_REGISTRY_HIST视图
select *from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS --------------------- ------------------------------ ---------- ---------- ---------- --------------- 2013-08-24 12:03:45.119862 APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0 2015-07-24 17:37:04.622489 APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0
方法二:通过opatch lsinventory方式
$ORACLE_HOME/OPatch/opatch lsinventory -all
查看opatch版本信息
$ORACLE_HOME/OPatch/opatch version
OPatch Version: 11.2.0.3.4 OPatch succeeded.
更新dba_registry_history视图为最新PSU信息
SQL> startup SQL> !lsnrctl start SQL> alter system register;
升级数据库数据字典
SQL> @?/rdbms/admin/catbundle.sql psu apply
编译无效对象的脚本
SQL>@?/rdbms/admin/utlrp.sql
查看更新后的视图信息
set line 150 col ACTION_TIME for a30 col ACTION for a8 col NAMESPACE for a8 col VERSION for a10 col BUNDLE_SERIES for a5 col COMMENTS for a20 select * from dba_registry_history;
ACTION_TIME ACTION NAMESPACE VERSION ID BUNDLE_SERIES COMMENTS ------------------------------ ------ ---------- ---------- ---------- --------------- ------------------------- 2013-08-24 12:03:45.119862 APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0 2015-07-24 17:37:04.622489 APPLY SERVER 11.2.0.4 0 PSU Patchset 11.2.0.2.0 2015-07-24 20:52:13.592073 APPLY SERVER 11.2.0.4 5 PSU PSU 11.2.0.4.5
select action,comments from registry$history;
ACTION COMMENTS ------ ------------------------- APPLY Patchset 11.2.0.2.0 APPLY Patchset 11.2.0.2.0 APPLY PSU 11.2.0.4.5 #显示安装成功,补丁成功从11.2.0.2.0版本升级到补丁11.2.0.4.5
查看无效对象 SYS@orcl>select count(*) from dba_objects where status<>'VALID'; #为零表示正常
转载自:oracle11 打补丁方法 - vmsysjack - 博客园 (cnblogs.com)标签:0.2,0.4,11.2,ACTION,Oracle,APPLY,CPU,PSU From: https://www.cnblogs.com/hjj1215/p/18174237