10.2.0.x升级到10.2.0.5.5

联系:手机/微信(+86 17813235971) QQ(107644445)QQ咨询惜分飞

标题:10.2.0.x升级到10.2.0.5.5

作者:惜分飞©版权所有[未经本人同意,不得以任何形式转载,否则有进一步追究法律责任的权利.]

一、数据库10.2.0.x升级到10.2.0.5.5步骤
1、升级数据库到10.2.0.5.0
执行8202632升级补丁中的./runInstaller
执行dbua
 
2、升级opatch
使用6880880补丁替换原$ORACLE_HOME/OPatch目录
 
3、升级数据库到10.2.0.5.5
使用补丁12827745,执行$ORACLE_HOME/OPatch/opatch apply ./12827745
执行数据库升级
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> — Execute the next statement only if this is the first
PSU applied for 10.2.0.5 or this is the first PSU applied since 10.2.0.5.3.
SQL> @utlrp.sql
SQL> QUIT
 
二、升级过程中出现错误
1、opatch版本过低
严重:OPatch invoked as follows: 'apply ./ '
信息:
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.4.9
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/cfgtoollogs/
opatch/opatch2011-11-03_12-43-59下午.log
 
Patch 12827745 requires OPatch version 10.2.0.5.0.
The OPatch version being used (10.2.0.4.9) doesn't meet the minimum version
required by the patch(es). Please download latest OPatch from My Oracle Support.
 
信息:系统无任何变化, OPatch 不会尝试还原系统
 
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch version
Invoking OPatch 10.2.0.4.9
 
OPatch Version: 10.2.0.4.9
 
OPatch succeeded.
 
处理办法:升级opatch
下载补丁p6880880_102000_Linux-x86-64,备份原来$ORACLE_HOME/OPatch,然后用下载的补丁替换
[oracle@node1 opatch]$ $ORACLE_HOME/OPatch/opatch version
Invoking OPatch 10.2.0.5.1
 
OPatch Version: 10.2.0.5.1
 
OPatch succeeded.
 
2、检测补丁是否冲突
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch \
>prereq CheckConflictAgainstOHWithDetail -phBaseDir ./
Invoking OPatch 10.2.0.5.1
 
Oracle 中间补丁程序安装程序版本 10.2.0.5.1
版权所有 (c) 2010, Oracle Corporation。保留所有权利。
 
PREREQ session
 
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.5.1
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/cfgtoollogs/
opatch/opatch2011-11-03_13-50-44下午.log
 
Patch history file: /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch_history.txt
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
3、CheckActiveFilesAndExecutables failed
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch apply 
Invoking OPatch 10.2.0.5.1
 
Oracle 中间补丁程序安装程序版本 10.2.0.5.1
版权所有 (c) 2010, Oracle Corporation。保留所有权利。
 
 
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.5.1
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch2011-11-03_13-39-44下午.log
 
Patch history file: /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch_history.txt
 
ApplySession 将中间补丁程序 '12827745' 应用到 OH '/opt/oracle/product/10.2.0/db_1'
 
Running prerequisite checks…
Prerequisite check "CheckActiveFilesAndExecutables" failed.
The details are:
 
 
Following executables are active :
/opt/oracle/product/10.2.0/db_1/bin/oracle
在先决条件检查期间 ApplySession 失败:
Prerequisite check "CheckActiveFilesAndExecutables" failed.
系统无任何变化, OPatch 不会尝试还原系统
 
OPatch failed with error code 74
 
解决办法:关闭数据库相关程序
 
[oracle@node1 12827745]$  sqlplus / as sysdba
 
SQL*Plus: Release 10.2.0.5.0 – Production on Thu Nov 3 13:52:31 2011
 
Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.
 
 
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 – 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
 
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> !  
[oracle@node1 ~]$ lsnrctl stop
[oracle@node1 ~]$ emctl stop dbconsole
 
4、@catbundle.sql psu apply报错
ORA-04045: errors during recompilation/revalidation of IS1OGG.DDLREPLICATION
ORA-04064: not executed, invalidated 
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06512: at line 870
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06512: at line 870
ORA-04045: errors during recompilation/revalidation of IS1OGG.DDLREPLICATION
ORA-04064: not executed, invalidated 
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
ORA-06512: at line 870
ORA-04064: not executed, invalidated package body "IS1OGG.DDLREPLICATION"
ORA-06508: PL/SQL: could not find program unit being called: "IS1OGG.DDLREPLICATION"
 
解决方法:关闭ogg的ddl捕获
因为ddl捕获触发器,导致这些操作失败
ddl_disable.sql
升级完成后,开启ddl捕获触发器
ddl_enable.sql
 
三、opatch主要命令解释
1、查看升级是否成功
[oracle@node1 ~]$   $ORACLE_HOME/OPatch/opatch lsinv -bugs_fixed|grep PSU
                                                    ENCAPSULATED BY EXCEPTION HANDLING
9952230    12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.1 (INCLUDES CPUOCT2010)
10248542   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.2 (INCLUDES CPUJAN2011)
11724962   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.3 (INCLUDES CPUAPR2011)
12419392   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.4 (INCLUDES CPUJUL2011)
12827745   12827745  Thu Nov 03 13:55:42 CST 2011   DATABASE PSU 10.2.0.5.5 (INCLUDES CPUOCT2011)
 
2、检测补丁是否冲突
[oracle@node1 12827745]$ $ORACLE_HOME/OPatch/opatch prereq  \
>CheckConflictAgainstOHWithDetail -phBaseDir ./
Invoking OPatch 10.2.0.5.1
 
Oracle 中间补丁程序安装程序版本 10.2.0.5.1
版权所有 (c) 2010, Oracle Corporation。保留所有权利。
 
PREREQ session
 
Oracle 主目录       : /opt/oracle/product/10.2.0/db_1
主产品清单: /opt/oracle/oraInventory
   从           : /etc/oraInst.loc
OPatch 版本    : 10.2.0.5.1
OUI 版本       : 10.2.0.5.0
OUI 位置      : /opt/oracle/product/10.2.0/db_1/oui
日志文件位置 : /opt/oracle/product/10.2.0/db_1/cfgtoollogs/opatch/
opatch2011-11-03_13-50-44下午.log
 
Patch history file: /opt/oracle/product/10.2.0/db_1/
cfgtoollogs/opatch/opatch_history.txt
 
Invoking prereq "checkconflictagainstohwithdetail"
 
Prereq "checkConflictAgainstOHWithDetail" passed.
 
OPatch succeeded.
 
3、预演补丁实施
opatch apply -report
 
4、卸载补丁
opatch rollback -id 8350262
此条目发表在 Oracle安装升级 分类目录。将固定链接加入收藏夹。

10.2.0.x升级到10.2.0.5.5》有 1 条评论

  1. 惜分飞 说:

    DBA_REGISTRY_HISTORY provides information about upgrades, downgrades, and critical patch updates that have been performed on the database.

    ACTION_TIME	The time the upgrade, downgrade, or patch action was completed
    ACTION		The specific action (for example, UPGRADE or DOWNGRADE)
    NAMESPACE	The namespace of the components affected (for example, SERVER)
    VERSION		The version number of the server (for example, 10.2.0.1.0)
    ID	        The identification number of the Critical Patch Update
    COMMENTS	Additional comments about the action taken
    
    SQL> select ACTION_TIME,version,COMMENTS from dba_registry_history;
    
    ACTION_TIME                    VERSION     COMMENTS
    ------------------------------ ----------- ------------------------------
    02-NOV-11 05.24.59.162314 PM               view recompilation
    02-NOV-11 05.25.16.106489 PM   10.2.0.5.0  Upgraded from 10.2.0.4.0
    03-NOV-11 02.06.27.836439 PM   10.2.0.5    PSU 10.2.0.5.5