5 安装PSU 10.2.0.4.2
本例是基于10.2.0.4版本2009-10-22(Metalink 756671.1)发布的Oracle Recommended Patches的安装. 本PSU(Patch Set Update)是基于10.2.0.4版本的第二个累计补丁集10.2.0.4.2(Bug 8833280), 且已经包含了截至到200910月份的CPU(Critical Patches Update), 共修正了293个bug. PSU 10.2.0.4.2 包括如下以前发布的补丁:
Generic Recommended Bundle #4 (Patch 8362683)
RAC Recommended Bundle #3 (Patch 8344348)
Data Guard Broker Recommended Bundle #1 (Patch 7936793)
Data Guard Physical/Recovery Recommended Bundle #1 (Patch 7936993)
Data Guard Logical Recommended Bundle #1 (Patch 7937113)
5.1 停止Oracle相关进程
$ lsnrctl stop
$ emctl stop dbconsole
$ sqlplus / as sysdba
SQL> shutdown immediate;
5.2 安装PSU
安装过程大概3-5分钟.
$ cd /home/wangnc/10g/patches
$ unzip p8833280_10204_Linux-*
$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./8833280
$ cd 8833280
$ $ORACLE_HOME/OPatch/opatch apply
...
Is the local system ready for patching? [y|n]
y
...
5.3 执行psu_root.sh
如果数据库要用Job Scheduling, 则还需用root用户执行脚本psu_root.sh:
# cd /home/wangnc/10g/patches/8833280
# export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
# sh psu_root.sh
5.4 安装后数据库操作
如果原先已建数据库则一定要做本步骤, 大概4-5分钟.
1) 加载modified.sql到数据库
$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @?/rdbms/admin/catbundle.sql psu apply
2) 重编译数据库视图
确认未曾重新编译过:
SQL> SELECT * FROM registry$history where ID = '6452863';
no rows selected
确认有多少对象需要重新编译:
SQL> @?/cpu/view_recompile/recompile_precheck_jan2008cpu.sql
开始重新编译:
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> @?/cpu/view_recompile/view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP;
最后编译数据库失效对象:
SQL> @?/rdbms/admin/utlrp.sql
SQL> QUIT
5.5 验证安装结果
$ $ORACLE_HOME/OPatch/opatch lsinventory
5.6 启动Oracle其它进程
$ lsnrctl start
$ emctl start dbconsole
--End--
阅读(1568) | 评论(0) | 转发(0) |