ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Linux-x86 安装PSU 10.2.0.4.5

Linux-x86 安装PSU 10.2.0.4.5

原创 Linux操作系统 作者:流氓88 时间:2010-09-09 17:21:43 0 删除 编辑
PSU测试:决定给Linux x86系统打上最新的PSU


OS version:                Linux  2.6.18-92.el5xen
Oracle version:        10.2.0.4.0


metalinke搜索Patch Set Update ,搜到文章:
1、
Patch Set Updates for Oracle Products [ID 854428.1]
在里面的“7 Determining the Patch Set Update Version”找到database 10.2.0.4的最新一个PSU为10.2.0.4.5。

Patch
PSU Version
Patch 9654991
10.2.0.4.5
Patch 9352164
10.2.0.4.4
Patch 9119284
10.2.0.4.3
Patch 8833280
10.2.0.4.2
Patch 8576156
10.2.0.4.1


2、
根据链接,下载Patch 9654991,该patch既是PSU 10.2.0.4.5。查看README,发现这是一个 overlay PSU,需要安装base PSU 10.2.0.4.4。同样在Patch Set Updates for Oracle Products [ID 854428.1]找到链接,下载了Patch 9352164

3、查看Patch 9352164(即PSU 10.2.0.4.4),这是一个base CPU,那么可以确定只要打了PSU 10.2.0.4.4和PSU 10.2.0.4.5了。

4、从metalink查出来两篇known issues
Oracle Database Patch Set Update 10.2.0.4.4 Known Issues [ID 1061293.1]
Oracle Database Patch Set Update 10.2.0.4.5 Known Issues [ID 1089052.1]

5、从10.2.0.4.4 Known Issues查到还需要打上两个patch 9572766 (针对Bug  8830147和6994194)。因为这两个Bug没达到PSU的要求(到底是何要求),所以没有加到10.2.0.4.4的PSU里,需要单独打上。

另外还建议打上2个Patch:Patch 7361418和Patch 7036284。

根据下载链接下载这3个Patch。

6、10.2.0.4.5 Known Issues里也建议打上Patch 9572766和7036284。
其中有一段话:

Overlay PSU 10.2.0.4.5 Patches Uploaded as 10.2.0.4 Release
On 13-Jul-2010 the Overlay PSU 10.2.0.4.5 Patches were uploaded as release 10.2.0.4.4. The same patches for all platforms have also been uploaded on 4-Aug-2010 as release 10.2.0.4. Both patches are identical and either one can be downloaded and installed.

7、查看Patch的README,检查有何需要注意的。
两个PSU的README开篇就叫人去查看Known Issues。打PSU查看Known Issues确实很重要,可以看看是否有其他相关的Patch也需要打上。
8、从10.2.0.4.5的README,我们得到接下来的补丁应该如何打
1)先应用PSU 10.2.0.4.4,跟着应用PSU 10.2.0.4.5
2)根据10.2.0.4.4的README的Post-Installation说明进行操作,跟着再应用10.2.0.4.5的Post-Installation

但是个人觉得第2)步可以进行整合,

9、开始安装PSU和one-off patch
1)要安装10.2.0.4.4 PSU,需要数据库版本为10.2.0.4.0。不同版本数据库的PSU版本也跟着不同。
2)OPatch 版本要10.2.0.4.8或更高版本
使用旧版本的Opatch会报错:
$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164
Invoking OPatch 10.2.0.4.2

Oracle Interim Patch Installer version 10.2.0.4.2
Copyright (c) 2007, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 10.2.0.4.2
OUI version       : 10.2.0.4.0
OUI location      : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2010-09-09_23-59-40PM.log

Invoking prereq "checkconflictagainstohwithdetail"
The location "./9352164/README.html" is not a directory or a valid patch zip file.
Prereq "checkConflictAgainstOHWithDetail" not executed
PrereqSession failed: Invalid patch location.

OPatch failed with error code 73

下载高版本的OPatch,解压到$ORACLE_HOME下即可解决问题
3)
检查环境变量$PATH:
        export PATH=$PATH:/usr/ccs/bin
        export PATH=$PATH:$ORACLE_HOME/OPatch
4)如果已经安装有one-off patch,检查是否有使用了有关“spare”的初始化参数(比如_first_spare_parameter, _second_spare_parameter)。如果没有关于“spare”的参数被使用或者只有一个关于bug7291739的参数_first_spare_parameter,那么可以不进行额外操作;否则,需要查看文档Important Information about "SPARE" Database Parameters [ID 1083413.1] 进行相关操作。

我的环境没有找到有关“spare”的参数使用。

5)重要:补丁冲突检查:
unzip p9352164_10204_.zip
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164

$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./9352164
Invoking OPatch 11.2.0.1.3

Oracle Interim Patch Installer version 11.2.0.1.3
Copyright (c) 2010, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/10.2.0/db_1
Central Inventory : /u01/app/oracle/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.2.0.1.3
OUI version       : 10.2.0.4.0
OUI location      : /u01/app/oracle/product/10.2.0/db_1/oui
Log file location : /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch2010-09-10_01-48-47AM.log

Patch history file: /u01/app/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.


6)如果使用了physical standby,那么参考文档:How do you apply a Patchset,PSU or CPU in a Data Guard Physical Standby configuration [ID 278641.1]

7)关闭数据库实例和监听

8)开始安装PSU

unzip p9352164_10204_.zip
cd 9352164
opatch apply

完成后检查:
opatch lsinventory
opatch lsinventory -bugs_fixed | grep MOLECULE

安装以上方法把所有PSU和one-off patch都应用上,先装PSU 10.2.0.4.4,跟着装PSU 10.2.0.4.5,最后再装one-off patch。

9)用root执行,修改二进制extjob的权限(用于Job Scheduling system)。
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
sh psu_root.sh

不执行该脚本,以后执行job可能会报错:
ORA-27369: job of type EXECUTABLE failed with exit code: ...

psu_root.sh是否成功执行不会影响到PSU的安装,但会影响Job Scheduling system。

Post-Installation部分
接下来的操作不能在ASM实例里进行。但如果ASM实例已经关闭了,那么需要先将它打开再进行接下来的操作。

10)更新修改后的sql文件,执行catbundle.sql脚本。如果是RAC,只需要在其中一个节点执行。
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> --以下的是针对10.2.0.4.4 PSU的
SQL> @catbundle.sql psu apply
SQL> --以下的是针对10.2.0.4.5 PSU的,会有一些报错,某些对象或文件找不到,可以忽略
SQL> @catbundle.sql opsu apply
SQL> -- Execute the next statement only if this is the first 10.2.0.4 PSU applied in the Oracle home.
SQL> @utlrp.sql
SQL> QUIT

查看相关日志,检查错误
$ORACLE_HOME/cfgtoollogs/catbundle :

catbundle_OPSU__APPLY_.log
catbundle_OPSU__GENERATE_.log

以下错误可以忽略:
ORA-29809: cannot drop an operator with dependent objects
ORA-29931: specified association does not exist
ORA-29830: operator does not exist
ORA-00942: table or view does not exist
ORA-00955: name is already used by an existing object
ORA-01430: column being added already exists in table
ORA-01432: public synonym to be dropped does not exist
ORA-01434: private synonym to be dropped does not exist
ORA-01435: user does not exist
ORA-01917: user or role 'XDB' does not exist
ORA-01920: user name '' conflicts with another user or role name
ORA-01921: role name '' conflicts with another user or role name
ORA-01952: system privileges not granted to 'WKSYS'
ORA-02303: cannot drop or replace a type with type or table dependents
ORA-02443: Cannot drop constraint - nonexistent constraint
ORA-04043: object does not exist
ORA-29832: cannot drop or replace an indextype with dependent indexes
ORA-29844: duplicate operator name specified
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
ORA-06512: at line . If this error follow any of above errors, then can be safely ignored.
ORA-01927: cannot REVOKE privileges you did not grant


通过registry$history查看PSU信息。不执行catbundle.sql,查询不会有结果。上面执行两次脚本,分别插入2条信息到

set linesize 200  
set pagesize 999
col action_time format a30
col action format a20
col id format a10
col version format a10
col comments format a20

select substr(action_time,1,30) action_time,  
substr(id,1,8) id,  
substr(action,1,10) action,  
substr(version,1,8) version,  
substr(comments,1,20) comments  
from registry$history;



11)重编译视图,执行脚本view_recompile_jan2008cpu.sql
该脚本只需要被执行一次。如果先前安装PSU或CPU已经执行过,那么就不需要再执行了。

检查是否重编译视图过:
SELECT * FROM registry$history where ID = '6452863';

非RAC环境操作方法(RAC环境的有所不同)
cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT


查询registry$history;
select substr(action_time,1,30) action_time,  
substr(id,1,8) id,  
substr(action,1,10) action,  
substr(version,1,8) version,  
substr(comments,1,20) comments  
from registry$history;

结果:
ACTION_TIME                    ID         ACTION               VERSION    COMMENTS
------------------------------ ---------- -------------------- ---------- --------------------
10-SEP-10 02.38.51.984205 AM   4          APPLY                10.2.0.4   PSU 10.2.0.4.4
10-SEP-10 02.59.45.571087 AM   1          APPLY                10.2.0.4   PSU 10.2.0.4.5
10-SEP-10 03.15.16.269687 AM   6452863    CPU                             view recompilation


12)编译失效对象
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

注意:安装了PSU后,以下几种情况的新库,都需要执行上面10)和11)这两部分,即执行脚本catbundle.sql和view_recompile_jan2008cpu.sql
1)使用DBCA建立的新库
2)使用DBCA创建的脚本建立的新库
3)任何克隆或迁移的,没有执行过catbundle.sql和view_recompile_jan2008cpu.sql的数据库


此次安装主要是根据readme和metalink查询到的文档来进行安装。根据自己的理解进行安装,安装最后是顺利完成了。但由于不是生产环境,是否有什么隐患尚未可知。哪个步骤有问题了,还请ITPUB友指出

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11251399/viewspace-673080/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2009-09-16

  • 博文量
    1
  • 访问量
    7143