补丁所需包:
p23530402_112040_MSWIN-x86-64_0719.zip (最新0719的psu补丁包)
p6880880_112000_MSWIN-x86-64_win.zip (最新windows的opatch工具)
配置安装前的环境:
1:关闭所有数据库相关服务。
2:显式停止分布式事务协调器服务。(net stop msdtc)
3:确保oracle_home % % \ Perl \bin出现在你的路径设置。如果不是请按照下面的步骤。(set ORACLE_HOME=C:\app\Administrator\product\11.2.0\dbhome_1)
补丁安装说明:
1:关闭所有实例和帧听器。
2:安装opatch
查询现有OPatch版本,版本低于11.2.0.3.5需要更新。
查询如下:
cd C:\app\Administrator\product\11.2.0\dbhome_1\OPatch
opatch version
更新如下:
unzip p6880880_112000_MSWIN-x86-64_win.zip
生成的OPatch文件夹,替换掉ORALCE安装目录下的文件夹。
3:解压补丁压缩包 进入OPatch目录应用补丁。
C:\app\Administrator\product\11.2.0\dbhome_1\OPatch>opatch apply C:\ORACLE\p2353
0402_112040_MSWIN-x86-64_0719\23530402\
确认已打成功
opatch lsinventory
4:升级数据字典
启动ORACLE服务,连入数据库
cd %ORACLE_HOME%\rdbms\admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql PSU apply
SQL> QUIT
确认升级成功:
col ACTION_TIME for a16
col ACTION for a5
col NAMESPACE for a6
col VERSION for a8
set numwidth 8
col BUNDLE_SERIES for a5
col COMMENTS for a25
select * from dba_registry_history;
5:编译无效对象
@?/rdbms/admin/utlrp.sql
查询无效对象
set line 200
set pagesize 200
col comments format a15
col action_time format a30
col bundle_series format a15
alter session set nls_timestamp_format = 'yyyy-mm-dd hh24:mi:ss.ff';
col object_name format a30
col object_id format 99999999
col object_type format a10
SELECT OWNER,OBJECT_NAME, OBJECT_ID, OBJECT_TYPE,to_char(CREATED,'
yyyy-mm-dd,hh24:mi:ss') CREATED,to_char(LAST_DDL_TIME,'yyyy-mm-dd,hh24:mi:ss') LAST_DDL_TIME,STATUS FROM dba_objects where status<>'VALID' order by owner,object_name,OBJECT_TYPE;