Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3386087
  • 博文数量: 631
  • 博客积分: 10716
  • 博客等级: 上将
  • 技术积分: 8397
  • 用 户 组: 普通用户
  • 注册时间: 2008-04-01 22:35
文章分类

全部博文(631)

文章存档

2020年(2)

2019年(22)

2018年(4)

2017年(37)

2016年(22)

2015年(1)

2013年(12)

2012年(20)

2011年(19)

2010年(20)

2009年(282)

2008年(190)

分类: Oracle

2016-01-05 20:53:58

当前数据库环境:
两节点RAC
OS Redhat 6.4 64bit
Grid software 11.2.0.4
Oracle software 11.2.0.4
准备补丁安装包如下:
p6880880_112000_Linux-x86-64.zip
p18139609_112040_Linux-x86-64.zip
2.检查当前数据库的版本
[oracle@jzh03 OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
[oracle@jzh03 OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.
Oracle Home       : /s01/app/oracle/product/11.2.0/db_1
Central Inventory : /s01/app/oraInventory
from           : /s01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /s01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-12-12_10-39-59AM_1.log
Lsinventory Output file location : /s01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-12-12_10-39-59AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = jzh03
Remote node = jzh04
--------------------------------------------------------------------------------
OPatch succeeded.
3.更新OPatch version、ocm configuration
分别在节点1,2上用grid和oracle用户执行
Mv $ORACLE_HOME/OPatch /$ORACLE_HOME/OPatch.bak
[grid@jzh03 db_1]# mv OPatch/ OPatch.bak
[grid@jzh04 db_1]# mv OPatch/ OPatch.bak
4.分别在节点1,2上用grid和oracle用户执行
[grid@jzh03 u01]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
[grid@jzh04 u01]$ unzip p6880880_112000_Linux-x86-64.zip -d $ORACLE_HOME
 [oracle@jzh03 OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.6
OPatch succeeded.
5.解压文件
[oracle@jzh03 u01]$ unzip p18139609_112040_Linux-x86-64.zip
6.检查需要打的补丁与现有补丁是否冲突
[oracle@jzh03 u01]$ cd 18139609/
[oracle@jzh03 18139609]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /s01/app/oracle/product/11.2.0/db_1
Central Inventory : /s01/app/oraInventory
from           : /s01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.4.0
Log file location : /s01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-12-12_11-27-46AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
7.停crs服务
[grid@jzh03 ~]$ crs_stop -all
CRS-2500: Cannot stop resource 'ora.gsd' as it is not running
CRS-2789: Cannot stop resource 'ora.gsd' as it is not running on server 'jzh04'
Attempting to stop `ora.registry.acfs` on member `jzh04`
Attempting to stop `ora.registry.acfs` on member `jzh03`
Attempting to stop `ora.cvu` on member `jzh03`
Attempting to stop `ora.ons` on member `jzh03`
Attempting to stop `ora.LISTENER.lsnr` on member `jzh03`
Attempting to stop `ora.LISTENER_SCAN1.lsnr` on member `jzh03`
CRS-2789: Cannot stop resource 'ora.gsd' as it is not running on server 'jzh03'
Attempting to stop `ora.LISTENER.lsnr` on member `jzh04`
Attempting to stop `ora.ons` on member `jzh04`
8.更新补丁,以root用户执行:
[root@jzh03 18139609]# export ORACLE_HOME=/s01/app/grid/product/11.2.0/db_1
[root@jzh03 18139609]# $ORACLE_HOME/OPatch/opatch auto -oh $ORACLE_HOME/ -ocmrf $ORACLE_HOME/OPatch/ocm/bin/emocmrsp
Executing /s01/app/grid/product/11.2.0/db_1/perl/bin/perl /s01/app/grid/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /u01 -patchn 18139609 -oh /s01/app/grid/product/11.2.0/db_1/ -ocmrf /s01/app/grid/product/11.2.0/db_1/OPatch/ocm/bin/emocmrsp -paramfile /s01/app/grid/product/11.2.0/db_1/crs/install/crsconfig_params
 This is the main log file: /s01/app/grid/product/11.2.0/db_1/cfgtoollogs/opatchauto2014-12-12_15-00-38.log
 This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/s01/app/grid/product/11.2.0/db_1/cfgtoollogs/opatchauto2014-12-12_15-00-38.report.log
 2014-12-12 15:00:38: Starting Clusterware Patch Setup
Using configuration parameter file: /s01/app/grid/product/11.2.0/db_1/crs/install/crsconfig_params
Stopping CRS...
Stopped CRS successfully
patch /u01/18139609/18031668  apply successful for home  /s01/app/grid/product/11.2.0/db_1
patch /u01/18139609/18031740  apply successful for home  /s01/app/grid/product/11.2.0/db_1
patch /u01/18139609/18031731  apply successful for home  /s01/app/grid/product/11.2.0/db_1
Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
opatch auto succeeded.
[root@jzh03 18139609]# export ORACLE_HOME=/s01/app/oracle/product/11.2.0/db_1
[root@jzh03 18139609]# $ORACLE_HOME/OPatch/opatch auto -oh $ORACLE_HOME/ -ocmrf $ORACLE_HOME/OPatch/ocm/bin/emocmrsp
 Executing /s01/app/grid/product/11.2.0/db_1/perl/bin/perl /s01/app/oracle/product/11.2.0/db_1/OPatch/crs/patch11203.pl -patchdir /u01 -patchn 18139609 -oh /s01/app/oracle/product/11.2.0/db_1/ -ocmrf /s01/app/oracle/product/11.2.0/db_1/OPatch/ocm/bin/emocmrsp -paramfile /s01/app/grid/product/11.2.0/db_1/crs/install/crsconfig_params
This is the main log file: /s01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2014-12-12_15-13-01.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/s01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatchauto2014-12-12_15-13-01.report.log
2014-12-12 15:13:01: Starting Clusterware Patch Setup
Using configuration parameter file: /s01/app/grid/product/11.2.0/db_1/crs/install/crsconfig_params
Stopping RAC /s01/app/oracle/product/11.2.0/db_1 ...
Stopped RAC /s01/app/oracle/product/11.2.0/db_1 successfully
patch /u01/18139609/18031668  apply successful for home  /s01/app/oracle/product/11.2.0/db_1
patch /u01/18139609/18031740/custom/server/18031740  apply successful for home  /s01/app/oracle/product/11.2.0/db_1
Starting RAC /s01/app/oracle/product/11.2.0/db_1 ...
Started RAC /s01/app/oracle/product/11.2.0/db_1 successfully
opatch auto succeeded.
9.登陆数据库执行脚本
cd $ORACLE_HOME/rdbms/admin
[oracle@jzh03 admin]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Fri Dec 12 15:31:25 2014
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> @catbundle.sql psu apply
10.验证
$ORACLE_HOME/OPatch/opatch lspatches
18031740;OCW Patch Set Update : 11.2.0.4.2 (18031740)
18031668;Database Patch Set Update : 11.2.0.4.2 (18031668)
或者:
[oracle@jzh03 admin]$ $ORACLE_HOME/OPatch/opatch lsinventory a-ll
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.
Oracle Home       : /s01/app/oracle/product/11.2.0/db_1
Central Inventory : /s01/app/oraInventory
from           : /s01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.4.0
Log file location : /s01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2014-12-12_15-35-06PM_1.log
Lsinventory Output file location : /s01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2014-12-12_15-35-06PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g                                                  11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.
Interim patches (2) :
Patch  18031740     : applied on Fri Dec 12 15:14:29 CST 2014
Unique Patch ID:  17253722
Patch description:  "OCW Patch Set Update : 11.2.0.4.2 (18031740)"
Created on 19 Mar 2014, 09:06:31 hrs PST8PDT
Bugs fixed:
18328800, 16613232, 14525998, 14693336, 17273020, 17238586, 12928658
17391726, 17750548, 17387214, 18229842, 17172091, 17001914, 16346413
17155238, 17551223, 15832129, 17305100, 17483479, 17039197, 16317771
17292250, 17500165, 16206997, 17481314, 16876500, 17405302, 17065496
18343490, 13991403
Patch  18031668     : applied on Fri Dec 12 15:13:50 CST 2014
Unique Patch ID:  17255543
Patch description:  "Database Patch Set Update : 11.2.0.4.2 (18031668)"
Created on 20 Feb 2014, 05:15:58 hrs PST8PDT
Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
Bugs fixed:
17288409, 16399083, 17205719, 17811429, 10136473, 16472716, 17614227
17050888, 17040764, 17865671, 17325413, 14010183, 17726838, 13364795
17389192, 17612828, 17080436, 16613964, 17284817, 17441661, 17761775
17721717, 16721594, 17390431, 18203837, 17551709, 17344412, 16043574
17446237, 16863422, 18139690, 17071721, 17501491, 17610798, 17239687
17752121, 17468141, 17602269, 18203835, 17375354, 17313525, 17811456
16731148, 14133975, 18203838, 16956380, 17385178, 17235750, 13866822
17394950, 17478514, 17027426, 12905058, 14338435, 16450169, 13944971
18094246, 16929165, 16785708, 17265217, 17465741, 16220077, 16180763
16069901, 17546973, 16285691, 17323222, 18180390, 17088068, 16875449
17016369, 17443671, 16228604, 17811438, 17811447, 16837842, 18031668
16912439, 17332800, 17393683, 17622427, 17545847, 17186905, 16943711
16850630, 17082359, 17346671, 14852021, 17783588, 17437634, 16618694
17341326, 17296856, 17546761, 17716305
Rac system comprising of multiple nodes
Local node = jzh03
Remote node = jzh04
至此,PSU补丁升级完成!
阅读(3332) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~