Oracle PSU升级(RAC环境)

教程发布:风哥 教程分类:ITPUX技术网 更新日期:2022-02-12 浏览学习:633

[size=22pt]Oracle RAC[size=22pt]升级[size=22pt]Patche[align=right][size=15pt]11.2.0.3.0[size=15pt]升级到[size=15pt]11.2.0.3.8(Linux[size=15pt]、[size=15pt]AIX)[align=right][size=15pt]by Phoenix(276493290)一、升级前准备 1、生产环境是一套RAC数据库,在不影响业务的前提下决定每个节点独自打Patch。2、首先确定数据库实例有几个,因为每个实例都需要执行脚本(后面会提到)。3、把PATCH包放到一个共享的单独的文件夹下,保证oracle和grid用户都能访问到。4、确保集群软件和数据库软件所在的磁盘有足够大的空间,因为Patch会自动备份当前的集群和数据库文件,如果Patch不成功会自动restore,如果自动不成功也可以手动rollback
注:AIX与Linux的打补丁步骤一样,不过在按照本文档打补丁时报错,如下:
grid:1、动态连接库拷贝错误报一下错误[font=Consolas] 执行[font=Consolas]opatch apply 报错[font=Consolas] OPatch failed with[font=Consolas] error code 73 使用fuser检查是否有程序在占用动态库文件,或者备份一下存在的文件然后mv名文件解决:查看执行以下命令,是否有输出genld -l | grep <$ORACLE_HOME>genkld | grep <$ORACLE_HOME>
如果有输出执行以下命令:/usr/sbin/slibclean
oracle:2、只是出现警告,可以忽略,或者可以修改一下地方:unsetOBJECT_MODEcd$ORACLE_HOME/bincpgenoradsksh genorasdksh.org修改前:if ["$OSDK_BASE" ]; then
echo "Generating BASE ORASDKlibrary..."
OSDK_NAM=$OSDK_BASE_NAM
else
echo "Generating FULL ORASDKlibrary..."
fi修改后:if ["$OSDK_BASE" ]; then
echo "Generating BASE ORASDKlibrary..."
OSDK_NAM=$OSDK_BASE_NAM
else
echo "Generating FULL ORASDKlibrary..."
OBJECT_MODE=64; export OBJECT_MODE;
fi关闭数据库和监听以oracle用户执行下面命令:relinkall
1.1:OPatch准备 11.2.0.3.0升级到11.2.0.3.8,OPatch版本必须是11.2.0.3.4或者更高版本。
1.1.1:查看当前OPatch版本信息 查看当前oracle和grid OPatch版本:[oracle@db OPatch]$ $ORACLE_HOME/OPatch/opatch versionOPatch Version: 11.2.0.3.5
OPatch succeeded.
如果不是到MOS下载,更新opatch到最高版本
安装opatch从mos网站下载OPatch112035.zip以后直接把zip包拷贝到$ORACLE_HOME目录下,执行以下命令:oracle:[oracle@vm02 11.2]# mv OPatch OPatch.bak[oracle@vm02 11.2]# unzip OPatch112035.zip[mailto:oracle@vm0211.2]oracle@vm0211.2]# cd OPatch[oracle@vm02 OPatch]# opatch versionOPatchVersion: 11.2.0.3.5
OPatch succeeded.
grid:root用户执行[root@vm02 asm]# cp -r /oracle/db/product/11.2/OPatch .[root@vm02 asm]# chown -R grid:dba OPatch[root@vm02 asm]# cd OPatch[root@vm02 OPatch]# ./opatch version
每个节点做相同操作,保证opatch版本符合要求1.1.2:oracle inventory检查 在应用patch前检查,为GI home 和dataase home检查patch的一致性[oracle@db OPatch]$$ORACLE_HOME/OPatch/opatch version
如果命令能够成功执行,将列出已经装的oracle组件信息,保存输出以便patch应用以后比对状态
二、更新补丁2.1、关闭em $/bin/emctl stop dbconsole
2.2、grid补丁(节点1)2.2.1):停止集群和数据库 [font=Arial, sans-serif][root@wsdb1 ~]#/opt/app/11.2.0/grid/crsctlstop crs[grid@wsdb1 ~]$ lsnrctl stop
2.2.2):解锁grid home目录(如果有错误),执行以下命令: root:[font=Arial, sans-serif][root@wsdb1 ~]# $ORACLE_HOME/crs/install/rootcrs.pl -unlock如果不执行解锁,将会报如下错误:[font=Arial, sans-serif][grid@wsdb2 ~]$/opt/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local/home/oracle/17076717[font=Arial, sans-serif]Oracle 中间补丁程序安装程序版本[font=Arial, sans-serif] 11.2.0.3.5版权所有[font=Arial, sans-serif] (c) 2013,Oracle Corporation。保留所有权利。[font=Arial, sans-serif]Oracle Home :/opt/app/11.2.0/grid[font=Arial, sans-serif]Central Inventory: /opt/app/oraInventory[font=Arial, sans-serif] from : /opt/app/11.2.0/grid/oraInst.loc[font=Arial, sans-serif]OPatchversion : 11.2.0.3.5[font=Arial, sans-serif]OUI version : 11.2.0.3.0[font=Arial, sans-serif]Log file location: /opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_14-25-01下午[font=Arial, sans-serif]_1.log[font=Arial, sans-serif]OPatchSession 无法加载指定[font=Arial, sans-serif] Oracle 主目录[font=Arial, sans-serif]/opt/app/11.2.0/grid 的产品清单。原因可能是[font=Arial, sans-serif]:[font=Arial, sans-serif] 对[font=Arial, sans-serif]ORACLE_HOME/.patch_storage 没有读权限或写权限[font=Arial, sans-serif] 其它[font=Arial, sans-serif] OUI 实例锁定了主产品清单[font=Arial, sans-serif] 对主产品清单没有读权限[font=Arial, sans-serif] 锁文件位于[font=Arial, sans-serif] ORACLE_HOME/.patch_storage 中[font=Arial, sans-serif] 主产品清单中不存在[font=Arial, sans-serif] Oracle 主目录[font=Arial, sans-serif]UtilSession 失败[font=Arial, sans-serif]: Locker::lock() mkdir/opt/app/11.2.0/grid/.patch_storage[font=Arial, sans-serif]Log file location:/opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_14-25-01下午[font=Arial, sans-serif]_1.log[font=Arial, sans-serif]OPatch failed witherror code 732.2.3):grid打补丁 [grid@wsdb1 17076717]$$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local/home/grid/path/17076717/
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/11.2.0/gridCentral Inventory : /opt/app/oraInventory from :/opt/app/11.2.0/grid/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location :/opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_12-59-21下午_1.log
Verifying environment and performingprerequisite checks...OPatch continues with these patches: 17076717
是否继续? [y|n]yUser Responded with: YAll checks passed.
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。(Oracle 主目录 ='/opt/app/11.2.0/grid')

本地系统是否已准备打补丁? [y|n]yUser Responded with: YBacking up files...Applying interim patch '17076717' to OH'/opt/app/11.2.0/grid'
正在为组件 oracle.crs, 11.2.0.3.0 打补丁...
正在为组件 oracle.usm, 11.2.0.3.0 打补丁...
Verifying the update...Patch 17076717 successfully applied.Log file location: /opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_12-59-21下午_1.log
OPatch succeeded.
2.2.4):验证补丁 [grid@wsdb1 OPatch]$ opatch lsinv
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/11.2.0/gridCentral Inventory : /opt/app/oraInventory from :/opt/app/11.2.0/grid/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location :/opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_13-12-29下午_1.log
Lsinventory Output file location :/opt/app/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2013-10-28_13-12-29下午.txt
--------------------------------------------------------------------------------已安装的顶级产品 (1):
Oracle Grid Infrastructure 11.2.0.3.0此 Oracle 主目录中已安装 1 个产品。

中间补丁程序 (1) :
Patch 17076717 : applied on Mon Oct28 13:03:43 CST 2013Unique Patch ID: 16721032Patch description: "Grid Infrastructure Patch Set Update :11.2.0.3.8 (HAS Components)" Created on 11 Oct 2013, 02:52:50 hrs PST8PDT Bugs fixed: 17076717, 16619898, 16315641, 15876003, 14275572, 13919095, 13696251 13348650, 12659561, 14305980, 14277586, 13987807, 14625969, 13825231 12794268, 13000491, 13498267, 15934834, 11675721, 14082976, 12771830 14515980, 14085018, 13943175, 14102704, 14171552, 12594616, 13879428 12897902, 12726222, 12829429, 13079948, 13090686, 12995950, 13251796 13582411, 14651272, 12903592, 12990582, 13857364, 15856610, 13082238 16446410,12947871, 13256955, 13037709, 14535011, 12878750, 16560359 14048512, 11772838, 13058611, 13001955, 13440962, 13727853, 13425727 12885323, 12870400, 14212634, 14407395, 13332363, 14761411, 13430626 14456069, 13811209, 12709476, 14168708, 14096821, 14626717, 13460353 13694885, 12857064, 12899169, 13111013, 12558569, 13323698, 16547309 10260842, 16613232, 13085732, 16555186, 14332688, 10317921, 16077216 13869978, 12914824, 13789135, 12730342, 12950823, 13355963, 13531373 14268365, 13776758, 12720728, 13620816, 14628188, 13023609, 15874565
2.3、oracle补丁(节点1)2.3.1):oracle打补丁 [root@wsdb1 path]# su - oracle[oracle@wsdb1 ~]$[oracle@wsdb1 16902043]$$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /home/oracle/16902043/
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/oracle/product/11.2.0/db_1Central Inventory : /opt/app/oraInventory from :/opt/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location :/opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-10-28_13-30-45下午_1.log
Verifying environment and performingprerequisite checks...OPatch continues with these patches: 13343438 13696216 13923374 14275605 14727310 16056266 16619892 16902043
是否继续? [y|n]yUser Responded with: YAll checks passed.
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。(Oracle 主目录 ='/opt/app/oracle/product/11.2.0/db_1')

本地系统是否已准备打补丁? [y|n]yUser Responded with: YBacking up files...Applying sub-patch '13343438' to OH'/opt/app/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.3.0 打补丁...
Verifying the update...Applying sub-patch '13696216' to OH'/opt/app/oracle/product/11.2.0/db_1'正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.sdo.locator, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.oms.core, 10.2.0.4.4 打补丁...
Verifying the update...Applying sub-patch '13923374' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.network.cman, 11.2.0.3.0 ] , 或找到更高版本。
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.3.0 打补丁...
正在为组件 oracle.network.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.network.listener, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
Verifying the update...Applying sub-patch '14275605' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.precomp.lang, 11.2.0.3.0 ] , 或找到更高版本。
正在为组件 oracle.network.client, 11.2.0.3.0 打补丁...
正在为组件 oracle.network.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.precomp.common, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.util, 11.2.0.3.0 打补丁...
Verifying the update...Applying sub-patch '14727310' to OH'/opt/app/oracle/product/11.2.0/db_1'正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.sdo.locator, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.oms.core, 10.2.0.4.4 打补丁...
Verifying the update...Applying sub-patch '16056266' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.network.cman, 11.2.0.3.0 ] , 或找到更高版本。
正在为组件 oracle.network.listener, 11.2.0.3.0 打补丁...
正在为组件 oracle.network.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.ovm, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.sdo.locator, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.deconfig, 11.2.0.3.0 打补丁...
Verifying the update...Applying sub-patch '16619892' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.precomp.lang, 11.2.0.3.0 ] , 或找到更高版本。
正在为组件 oracle.marvel, 11.2.0.3.0 打补丁...
正在为组件 oracle.precomp.common, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rman, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.agent, 10.2.0.4.3 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
正在为组件 oracle.xdk.parser.java, 11.2.0.3.0 打补丁...
正在为组件 oracle.xdk.rsf, 11.2.0.3.0 打补丁...
Verifying the update...Applying sub-patch '16902043' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.idm.oid, 11.2.0.3.0 ] , 或找到更高版本。正在为组件 oracle.ldap.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.ldap.rsf.ic, 11.2.0.3.0 打补丁...
正在为组件 oracle.owb.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
Verifying the update...Applying sub-patch '16902043' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.idm.oid, 11.2.0.3.0 ] , 或找到更高版本。
正在为组件 oracle.ldap.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.ldap.rsf.ic, 11.2.0.3.0 打补丁...
正在为组件 oracle.owb.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
Verifying the update...Composite patch 16902043 successfullyapplied.Log file location:/opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-10-28_13-30-45下午_1.log
OPatch succeeded.
2.3.2):补丁验证 [oracle@wsdb1 16902043]$$ORACLE_HOME/OPatch/opatch lsinv
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/oracle/product/11.2.0/db_1Central Inventory : /opt/app/oraInventory from :/opt/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location : /opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-10-28_13-50-03下午_1.log
Lsinventory Output file location :/opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2013-10-28_13-50-03下午.txt
--------------------------------------------------------------------------------已安装的顶级产品 (1):
Oracle Database 11g 11.2.0.3.0此 Oracle 主目录中已安装 1 个产品。

中间补丁程序 (1) :
Patch 16902043 : applied on Mon Oct28 13:42:02 CST 2013Unique Patch ID: 16676143Patch description: "Database Patch Set Update : 11.2.0.3.8(16902043)" Created on 24 Sep 2013, 23:20:58 hrs PST8PDTSub-patch 16619892; "Database Patch Set Update : 11.2.0.3.7 (16619892)"Sub-patch 16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"Sub-patch 14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"Sub-patch 14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"Sub-patch 13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"Sub-patch 13696216; "Database Patch Set Update :11.2.0.3.2 (13696216)"Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)" Bugs fixed: 13593999, 13566938, 10350832, 14138130, 12919564, 14198511, 13561951 13624984, 13588248, 16024441, 13080778, 17333199, 13914613, 13804294 16710324, 14258925, 12873183, 14755945, 13645875, 14472647, 12880299 14664355, 12998795, 14409183, 13719081, 14469008, 13492735, 13496884 12857027, 14263036, 13015379, 14263073, 14188650, 13742433, 13732226 16368108, 16314469, 12905058, 6690853, 13742434, 16212405, 12849688 12950644, 13742435, 13464002, 12899768, 12879027, 13063120, 13534412 13958038, 14613900, 12585543, 12535346, 13790109, 16382448, 12588744 13972394, 11877623, 13072654, 12395918, 13786142, 13814739, 12847466
2.3.3):启动数据库和集群服务
[root@wsdb1 bin]# ./crsctl start crsCRS-4123: Oracle High Availability Serviceshas been started.[root@wsdb1 bin]# su - grid[grid@wsdb1 ~]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora.DATA.dg ora....up.type ONLINE ONLINE wsdb1 ora....ER.lsnr ora....er.type ONLINE ONLINE wsdb2 ora....N1.lsnr ora....er.type ONLINE ONLINE wsdb2 ora.OCRVOTE.dg ora....up.type ONLINE ONLINE wsdb1 ora.asm ora.asm.type ONLINE ONLINE wsdb1 ora.cvu ora.cvu.type ONLINE ONLINE wsdb2 ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE ONLINE wsdb1 ora.oc4j ora.oc4j.type ONLINE ONLINE wsdb2 ora.ons ora.ons.type ONLINE ONLINE wsdb1 ora.scan1.vip ora....ip.type ONLINE ONLINE wsdb2 ora.wsdb.db ora....se.typeONLINE ONLINE wsdb2 ora....SM1.asm application ONLINE ONLINE wsdb1 ora....B1.lsnr application OFFLINE OFFLINE ora.wsdb1.gsd application OFFLINE OFFLINE ora.wsdb1.ons application ONLINE ONLINE wsdb1 ora.wsdb1.vip ora....t1.type ONLINE ONLINE wsdb1 ora....SM2.asm application ONLINE ONLINE wsdb2 ora....B2.lsnr application ONLINE ONLINE wsdb2 ora.wsdb2.gsd application OFFLINE OFFLINE ora.wsdb2.ons application ONLINE ONLINE wsdb2 ora.wsdb2.vip ora....t1.type ONLINE ONLINE wsdb2
[oracle@wsdb1 trace]$ srvctl start instance -d wsdb -i wsdb1[oracle@wsdb1 trace]$ sqlplus / as sysdba
SQL> select open_mode from v$database;
OPEN_MODE--------------------READ WRITE
SQL> exit
[grid@wsdb1 ~]$ crs_stat -tName Type Target State Host ------------------------------------------------------------ora.DATA.dg ora....up.type ONLINE ONLINE wsdb1 ora....ER.lsnr ora....er.type ONLINE ONLINE wsdb1 ora....N1.lsnr ora....er.type ONLINE ONLINE wsdb2 ora.OCRVOTE.dg ora....up.type ONLINE ONLINE wsdb1 ora.asm ora.asm.type ONLINE ONLINE wsdb1 ora.cvu ora.cvu.type ONLINE ONLINE wsdb2 ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE ONLINE wsdb1 ora.oc4j ora.oc4j.type ONLINE ONLINE wsdb2 ora.ons ora.ons.type ONLINE ONLINE wsdb1 ora.scan1.vip ora....ip.type ONLINE ONLINE wsdb2 ora.wsdb.db ora....se.type ONLINE ONLINE wsdb1 ora....SM1.asm application ONLINE ONLINE wsdb1 ora....B1.lsnr application ONLINE ONLINE wsdb1 ora.wsdb1.gsd application OFFLINE OFFLINE ora.wsdb1.ons application ONLINE ONLINE wsdb1 ora.wsdb1.vip ora....t1.type ONLINE ONLINE wsdb1 ora....SM2.asm application ONLINE ONLINE wsdb2 ora....B2.lsnr application ONLINE ONLINE wsdb2 ora.wsdb2.gsd application OFFLINE OFFLINE ora.wsdb2.ons application ONLINE ONLINE wsdb2 ora.wsdb2.vip ora....t1.type ONLINE ONLINE wsdb2

2.4、节点22.4.1):停止集群、监听 [root@wsdb2 bin]# ./crsctl stop crs[grid@wsdb2 ~]$ lsnrctl stop
2.4.2):grid打补丁 [grid@wsdb2 17076717]$ /opt/app/11.2.0/grid/OPatch/opatch napply -oh $ORACLE_HOME -local /home/grid/17076717
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/11.2.0/gridCentral Inventory : /opt/app/oraInventory from :/opt/app/11.2.0/grid/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location :/opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_14-32-09下午_1.log
Verifying environment and performingprerequisite checks...OPatch continues with these patches: 17076717
是否继续? [y|n]yUser Responded with: YAll checks passed.
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。(Oracle 主目录 ='/opt/app/11.2.0/grid')

本地系统是否已准备打补丁? [y|n]yUser Responded with: YBacking up files...Applying interim patch '17076717' to OH'/opt/app/11.2.0/grid'
正在为组件 oracle.crs, 11.2.0.3.0 打补丁...
正在为组件 oracle.usm, 11.2.0.3.0 打补丁...
Verifying the update...Patch 17076717 successfully applied.Log file location:/opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_14-32-09下午_1.log
OPatch succeeded.
2.4.3):grid补丁验证 [grid@wsdb2 OPatch]$ opatch lsinv
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/11.2.0/gridCentral Inventory : /opt/app/oraInventory from :/opt/app/11.2.0/grid/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location :/opt/app/11.2.0/grid/cfgtoollogs/opatch/opatch2013-10-28_13-12-29下午_1.log
Lsinventory Output file location : /opt/app/11.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2013-10-28_13-12-29下午.txt
--------------------------------------------------------------------------------已安装的顶级产品 (1):
Oracle Grid Infrastructure 11.2.0.3.0此 Oracle 主目录中已安装 1 个产品。

中间补丁程序 (1) :
Patch 17076717 : applied on Mon Oct28 13:03:43 CST 2013Unique Patch ID: 16721032Patch description: "Grid Infrastructure Patch Set Update :11.2.0.3.8 (HAS Components)" Created on 11 Oct 2013, 02:52:50 hrs PST8PDT Bugs fixed: 17076717, 16619898, 16315641, 15876003, 14275572, 13919095, 13696251 13348650, 12659561, 14305980, 14277586, 13987807, 14625969, 13825231 12794268, 13000491, 13498267, 15934834, 11675721, 14082976, 12771830 14515980,14085018, 13943175, 14102704, 14171552, 12594616, 13879428 12897902, 12726222, 12829429, 13079948, 13090686, 12995950, 13251796 13582411, 14651272, 12903592, 12990582, 13857364, 15856610, 13082238 16446410, 12947871, 13256955, 13037709, 14535011, 12878750, 16560359 14048512, 11772838, 13058611, 13001955, 13440962, 13727853, 13425727 12885323, 12870400, 14212634, 14407395, 13332363, 14761411, 13430626 14456069, 13811209, 12709476, 14168708, 14096821, 14626717, 13460353 13694885, 12857064, 12899169, 13111013, 12558569, 13323698, 16547309 10260842, 16613232, 13085732, 16555186, 14332688, 10317921, 16077216 13869978, 12914824, 13789135, 12730342, 12950823, 13355963, 13531373 14268365, 13776758, 12720728, 13620816, 14628188, 13023609, 15874565
2.4.4):oracle打补丁 Oracle[oracle@wsdb2 OPatch]$ opatch napply -oh $ORACLE_HOME -local /home/oracle/16902043/
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/oracle/product/11.2.0/db_1Central Inventory : /opt/app/oraInventory from :/opt/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location : /opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-10-28_14-43-09下午_1.log
Verifying environment and performingprerequisite checks...OPatch continues with these patches: 13343438 13696216 13923374 14275605 14727310 16056266 16619892 16902043
是否继续? [y|n]yUser Responded with: YAll checks passed.
请关闭本地系统上在此 ORACLE_HOME 之外运行的 Oracle 实例。(Oracle 主目录 ='/opt/app/oracle/product/11.2.0/db_1')

本地系统是否已准备打补丁? [y|n]yUser Responded with: YBacking up files...pplying sub-patch '13343438' to OH'/opt/app/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.dbscripts, 11.2.0.3.0 打补丁...
Verifying the update...Applying sub-patch '13696216' to OH'/opt/app/oracle/product/11.2.0/db_1'
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.sdo.locator, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.oms.core, 10.2.0.4.4 打补丁...
Verifying the update...Applying sub-patch '13923374' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.network.cman, 11.2.0.3.0 ] , 或找到更高版本。
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
…………….(略)
Verifying the update...Applying sub-patch '16902043' to OH'/opt/app/oracle/product/11.2.0/db_1'ApplySession: Oracle 主目录中不存在可选组件 [oracle.idm.oid, 11.2.0.3.0 ] , 或找到更高版本。
正在为组件 oracle.ldap.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.ldap.rsf.ic, 11.2.0.3.0 打补丁...
正在为组件 oracle.owb.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms, 11.2.0.3.0 打补丁...
正在为组件 oracle.rdbms.rsf, 11.2.0.3.0 打补丁...
正在为组件 oracle.sysman.console.db, 11.2.0.3.0 打补丁...
Verifying the update...Composite patch 16902043 successfullyapplied.Log file location:/opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-10-28_14-43-09下午_1.log
OPatch succeeded.
2.4.5):oracle补丁验证 [oracle@wsdb2 OPatch]$ opatch lsinv
Oracle 中间补丁程序安装程序版本11.2.0.3.5版权所有 (c) 2013, Oracle Corporation。保留所有权利。

Oracle Home : /opt/app/oracle/product/11.2.0/db_1Central Inventory : /opt/app/oraInventory from :/opt/app/oracle/product/11.2.0/db_1/oraInst.locOPatch version : 11.2.0.3.5OUI version : 11.2.0.3.0Log file location :/opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-10-28_14-56-58下午_1.log
Lsinventory Output file location :/opt/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2013-10-28_14-56-58下午.txt
--------------------------------------------------------------------------------已安装的顶级产品 (1):
Oracle Database 11g 11.2.0.3.0此 Oracle 主目录中已安装 1 个产品。

中间补丁程序 (1) :
Patch 16902043 : applied on Mon Oct28 14:54:39 CST 2013Unique Patch ID: 16676143Patch description: "Database Patch Set Update : 11.2.0.3.8(16902043)" Created on 24 Sep 2013, 23:20:58 hrs PST8PDTSub-patch 16619892; "Database Patch Set Update : 11.2.0.3.7 (16619892)"Sub-patch 16056266; "Database Patch Set Update : 11.2.0.3.6 (16056266)"Sub-patch 14727310; "Database Patch Set Update : 11.2.0.3.5 (14727310)"Sub-patch 14275605; "Database Patch Set Update : 11.2.0.3.4 (14275605)"Sub-patch 13923374; "Database Patch Set Update : 11.2.0.3.3 (13923374)"Sub-patch 13696216; "Database Patch Set Update : 11.2.0.3.2 (13696216)"Sub-patch 13343438; "Database Patch Set Update : 11.2.0.3.1 (13343438)" Bugs fixed: 13593999, 13566938, 10350832, 14138130, 12919564, 14198511, 13561951 13624984, 13588248, 16024441, 13080778,17333199, 13914613, 13804294 16710324, 14258925, 12873183, 14755945, 13645875, 14472647, 12880299 14664355, 12998795, 14409183, 13719081, 14469008, 13492735, 13496884 12857027, 14263036, 13015379, 14263073, 14188650, 13742433, 13732226 16368108, 16314469, 12905058, 6690853, 13742434, 16212405, 12849688 12950644, 13742435, 13464002, 12899768, 12879027, 13063120, 13534412 13958038, 14613900, 12585543, 12535346, 13790109, 16382448, 12588744 13972394, 11877623, 13072654, 12395918, 13786142, 13814739, 12847466 13649031, 13855490, 13981051, 12582664, 12797765, 17333200, 14262913 17332800, 12923168, 14695377, 13384182, 12912137, 16279401, 13612575 13466801, 13484963, 14207163, 13724193, 13642044, 13772618, 11063191 16694777, 13945708, 13070939, 12797420, 12865902, 13041324, 15869211 13605839, 14003090, 16314467, 16279211, 16314468, 12976376, 12755231 11708510, 13680405, 13742437, 14589750, 13026410, 13737746, 11868640 13742438, 14644185, 13326736, 15841373, 15910002, 13596521, 16362358 14398795, 13001379, 13579992, 16344871, 13099577, 9873405, 13742436 14275605, 9858539, 16372203, 14841812, 16344758, 11715084, 9547706 16231699, 14040433, 9703627, 12662040, 12617123, 16530565, 13483354 14393728, 14207317, 12845115, 12764337, 13354082, 16902043, 14459552 13397104, 14191508, 13913630, 12964067, 12983611, 13550185, 12780983 13810393, 12583611, 14546575, 15862016, 13476583, 13489024, 11840910 13903046, 15862017, 13572659, 16294378, 13718279, 13657605, 14088346 13448206, 16314466, 13419660, 14480676, 13632717, 14668670, 14063281 14110275, 13430938, 13467683, 13420224, 13812031, 14548763, 12646784 16299830, 14512189, 12755116, 17230530, 13616375, 14035825, 13427062 12861463, 12834027, 13092220, 15862021, 13632809, 13377816, 13036331 14727310, 16619892, 13685544, 13499128, 15862018, 16175381, 13584130 12829021, 15862019, 12794305, 14546673, 12791981, 13561750, 13503598 13787482, 10133521, 12744759, 12718090, 13848402, 13399435, 14762511 14023636, 9095696, 13725395, 12401111, 13860201, 12796518, 13257247 13362079, 14176879, 12917230, 13923374, 16014985, 14220725, 12621588 12312133, 13524899, 14480675, 16306019, 13559697, 9706792, 12974860 12940620, 14751895, 14480674, 13916709, 13098318, 14076523, 13773133 16794244, 15905421, 13340388, 13528551, 13366202, 12731940, 12894807 12747437, 13343438, 13454210, 12748240, 14205448, 13385346, 17082364 14127231, 15853081, 14273397, 14467061, 12971775, 13923995, 13582702 14571027, 12784406, 13907462, 12748538, 10242202, 13493847, 13035804 13857111, 16710363, 13544396, 14128555, 13686047, 16382353, 8547978 14226599, 17333203, 14095982, 13591624, 17333197, 14523004, 13440516 9397635, 14007968, 16794241, 13035360, 14062795, 12693626, 12925089 14189694, 12815057, 13332439, 14038787, 13040943, 11071989, 13843646 14062796, 16794243, 12913474, 14841409, 14390252, 13370330, 16314470 14062797, 13059165, 14062794, 12959852, 12345082, 13358781, 17333202 12960925, 16703112, 9659614, 14546638, 13699124, 13936424, 17333198 16794240, 14301592, 13338048, 12938841, 12658411, 12620823, 12656535 14062793, 12678920, 13038684, 14791477, 14062792, 13807411, 16742095 16794238, 15862022, 12594032, 13250244, 12612118, 9761357, 14053457 13742464, 14052474, 13060271, 13911821, 13457582, 13527323, 7509451 13791364, 15862020, 13910420, 12821418, 12780098, 13502183, 13696216 13705338, 14841558, 10263668, 16794242, 15862023, 16056266, 13834065 14351566, 13723052, 16794239, 13554409, 15862024, 13103913, 13645917 14063280, 12772404, 13011409

包含多个节点的 RAC 系统Local node = wsdb2Remote node = wsdb1
--------------------------------------------------------------------------------
OPatch succeeded.
2.4.5):启动集群和数据库 [root@wsdb2 bin]# ./crsctl start crsCRS-4123: Oracle High Availability Serviceshas been started.[root@wsdb2 bin]# ./crs_stat -tCRS-0184: Cannot communicate with the CRSdaemon.
[root@wsdb2 bin]# ./crs_stat -tName Type Target State Host ------------------------------------------------------------ora.DATA.dg ora....up.type ONLINE ONLINE wsdb1 ora....ER.lsnr ora....er.type ONLINE ONLINE wsdb1 ora....N1.lsnr ora....er.type ONLINE ONLINE wsdb1 ora.OCRVOTE.dg ora....up.type ONLINE ONLINE wsdb1 ora.asm ora.asm.type ONLINE ONLINE wsdb1 ora.cvu ora.cvu.type ONLINE ONLINE wsdb1 ora.gsd ora.gsd.type OFFLINE OFFLINE ora....network ora....rk.type ONLINE ONLINE wsdb1 ora.oc4j ora.oc4j.type ONLINE ONLINE wsdb1 ora.ons ora.ons.type ONLINE ONLINE wsdb1 ora.scan1.vip ora....ip.type ONLINE ONLINE wsdb1 ora.wsdb.db ora....se.type ONLINE ONLINE wsdb1 ora....SM1.asm application ONLINE ONLINE wsdb1 ora....B1.lsnr application ONLINE ONLINE wsdb1 ora.wsdb1.gsd application OFFLINE OFFLINE ora.wsdb1.ons application ONLINE ONLINE wsdb1 ora.wsdb1.vip ora....t1.type ONLINE ONLINE wsdb1 ora....SM2.asm application ONLINE ONLINE wsdb2 ora....B2.lsnr application ONLINE ONLINE wsdb2 ora.wsdb2.gsd application OFFLINE OFFLINE ora.wsdb2.ons application ONLINE ONLINE wsdb2 ora.wsdb2.vip ora....t1.type ONLINE ONLINE wsdb2 [root@wsdb2 bin]# su - grid[grid@wsdb2 ~]$ srvctl start instance -dwsdb -i wsdb2PRCC-1015 : wsdb 已在 wsdb2 上运行PRCR-1004 : 资源 ora.wsdb.db 已在运行[grid@wsdb2 ~]$ srvctl status database -dwsdb实例 wsdb1 正在节点 wsdb1 上运行实例 wsdb2 正在节点 wsdb2 上运行2.5、数据库执行脚本(节点1) 注意:确定当前数据库有几个实例,如果是多个实例那么每个实例都需要执行一次该脚本。(如果是rac该脚本只需要在一个节点执行即可)oracle用户执行:[font=Arial, sans-serif]The catbundle.sql [font=Arial, sans-serif]executionis reflected in the dba_registry_history view by a row associated with bundleseries PSU[font=Arial, sans-serif].
[oracle@wsdb1 admin]$ cd/opt/app/oracle/product/11.2.0/db_1/rdbms/admin[oracle@wsdb1 admin]$ sqlplus / as sysdba
SQL>@catbundle.sql psu apply
PL/SQL procedure successfully completed.
.................(略)SQL> SPOOL offSQL> SET echo offCheck the following log file for errors:/opt/app/oracle/cfgtoollogs/catbundle/catbundle_PSU_WSDB_APPLY_2013Oct28_15_15_10.log 执行utlrp脚本 并重启DB,该脚本的作用是重新编译无效的数据库对象SQL>@?/rdbms/admin/utlrp
SQL> shutdown immediate;
SQL> startup;2.5.1):rman更新catalog[font="]如果使用了[font="]rman[font="]的资料库,需要更新[font="]rman[font="]的[font="]catalog[font="]$ rman catalog username/password@alias[font="]RMAN> UPGRADE CATALOG;
2.5.2):节点1验证数据库版本信息 SQL> col comments for a20;SQL> col namespace for a10;SQL> col bundle_series for a10;SQL> col version for a10;SQL> set line 200;SQL>select NAMESPACE,VERSION,COMMENTS,BUNDLE_SERIES from sys.registry$history;NAMESPACE VERSION COMMENTS BUNDLE_SER-------------------- -------------------- ----------SERVER 11.2.0.3 Patchset 11.2.0.2.0 PSUSERVER 11.2.0.3 Patchset 11.2.0.2.0 PSUSERVER 11.2.0.3 PSU 11.2.0.3.8 PSU
[oracle@wsdb1OPatch]$ opatch lspatches16902043;DatabasePatch Set Update : 11.2.0.3.8 (16902043)
[grid@wsdb1OPatch]$ opatch lspatches17076717;GridInfrastructure Patch Set Update : 11.2.0.3.8 (HAS Components)2.5.3):节点2验证数据库版本信息 [oracle@wsdb2~]$ sqlplus / as sysdbaSQL> col comments for a20;SQL> col namespace for a10;SQL> col bundle_series for a10;SQL> col version for a10;SQL> set line 200SQL> selectNAMESPACE,VERSION,COMMENTS,BUNDLE_SERIES from sys.registry$history;
NAMESPACE VERSION COMMENTS BUNDLE_SER-------------------- -------------------- ----------SERVER 11.2.0.3 Patchset 11.2.0.2.0 PSUSERVER 11.2.0.3 Patchset 11.2.0.2.0 PSUSERVER 11.2.0.3 PSU 11.2.0.3.8 PSU
[oracle@wsdb2OPatch]$ opatch lspatches16902043;DatabasePatch Set Update : 11.2.0.3.8 (16902043)
[grid@wsdb2OPatch]$ opatch lspatches17076717;GridInfrastructure Patch Set Update : 11.2.0.3.8 (HAS Components)
三、回滚补丁3.1:回滚补丁3.1.1):数据库执行回滚[font="]cd $ORACLE_HOME/rdbms/admin[font="]sqlplus /nolog[font="]SQL> CONNECT / AS SYSDBA[font="]SQL> STARTUP[font="]SQL> @catbundle_PSU_[i]_ROLLBACK.sql[font="]SQL> QUIT

3.1.2):库回滚 11g升级完11.2.0.3.8补丁以后会在$ORACLE_HOME/rdbms/admin目录下会生成catbundle_PSU_$ORACLE_SID开头的两个脚本如下;[oracle@dbadmin]$ ls -lrt catbu*-rw-r--r--1 oracle oinstall 29922 Aug 8 2011 catbundle.sql-rw-r-----1 oracle oinstall 895 Aug 15 14:48catbundle_PSU_ORCL_ROLLBACK.sql-rw-r-----1 oracle oinstall 886 Aug 15 14:48catbundle_PSU_ORCL_APPLY.sql
执行回滚数据库脚本[font="]catbundle_PSU_ORCL_ROLLBACK.sql

3.1.3):软件回滚[font="]opatch rollback -id 16902043 注:16902043为补丁号

本文标签:
网站声明:本文由风哥整理发布,转载请保留此段声明,本站所有内容将不对其使用后果做任何承诺,请读者谨慎使用!
【上一篇】
【下一篇】