Exadata的补丁还是用OPatch,不过对版本有要求,至少是11.2.0.1.5 版本,目前最新是11.2.0.1.8 版本。
跟其他补丁集一样,BP也是只需要打最新版本的即可,有所不同的是,需要先做冲突检查。
一个小提醒是最好在BP出来一周以后再打(曾经在一个case上遇到最新的patch打不上去,最后原厂工程师只好不做任何解释的回退了)。所以现在可以打BP12了:)
简述步骤如下:
1.OPatch 版本确认。满足要求。
[oracle@boydb01 tmp]$ $ORACLE_HOME/OPatch/opatch version
Invoking OPatch 11.2.0.1.6
OPatch Version: 11.2.0.1.6
OPatch succeeded.
[oracle@boydb01 tmp]$
2.冲突检查。根据readme依次检查(包含GI和Database),确认没有冲突才可以继续,运气不好可能要开SR去解决问题,这次比较幸运。
———————————————
[oracle@boydb01 ~]$ /u01/app/11.2.0/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /tmp/12902308/12902308
Invoking OPatch 11.2.0.1.6
Oracle Interim Patch Installer version 11.2.0.1.6
Copyright (c) 2011, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.6
OUI version : 11.2.0.2.0
Log file location : /u01/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/opatch2011-10-18_11-06-52AM.log
Invoking prereq “checkconflictagainstohwithdetail”
…….
未发现冲突,可继续。
3.停grid control,需要在所有节点进行。
[oracle@boydb01 ~]$ export ORACLE_UNQNAME=boydb
[oracle@boydb01 ~]$ /u01/app/oracle/product/11.2.0/dbhome_1/bin/emctl stop dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.2.0.2.0
Copyright (c) 1996, 2010 Oracle Corporation. All rights reserved.
https://boydb01.boypoo.com:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 11g Database Control …
… Stopped.
4.生成ocm response file,这个必须做,不过可以在一边做完后拷贝到其他节点。
[root@boydb01 12902308]# /u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp
OCM Installation Response Generator 10.3.4.0.0 – Production
Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: NONE
Invalid email address.
Email address/User Name: aa@aa.com
Provide your My Oracle Support password to receive security updates via your My Oracle Support account.
Password (optional):
Unable to establish connection to Oracle Configuration Manager server.
Hostname (https://ccr.oracle.com) is unknown.
Unable to establish a network connection to Oracle. Specify the URL for an
Oracle Support Hub in this format:
http[s]://:
If you do not wish to configure OCM through an Oracle Support Hub, enter NONE
Oracle Support Hub URL: NONE
Unable to establish a network connection to Oracle. If your systems require a
proxy server for outbound Internet connections, enter the proxy server details
in this format:
[@][:]
If you want to remain uninformed of critical security issues in your
configuration, enter NONE
Proxy specification: NONE
The OCM configuration response file (ocm.rsp) was successfully created.
5.在每个节点上依次打Grid Infrastructure和database software的补丁
[root@boydb01 12902308]# opatch auto /tmp/12902308 -oh /u01/app/11.2.0/grid
Executing /usr/bin/perl /u01/app/11.2.0/grid/OPatch/crs/patch112.pl -patchdir /tmp -patchn 12902308 -oh /u01/app/11.2.0/grid -paramfile /u01/app/11.2.0/grid/crs/install/crsconfig_params
opatch auto log file location is /u01/app/11.2.0/grid/OPatch/crs/../../cfgtoollogs/opatchauto2011-10-18_11-37-40.log
Detected Oracle Clusterware install
Using configuration parameter file: /u01/app/11.2.0/grid/crs/install/crsconfig_params
OPatch is bundled with OCM, Enter the absolute OCM response file path:
/tmp/12902308/ocm.rsp
Successfully unlock /u01/app/11.2.0/grid
patch /tmp/12902308/12902308 apply successful for home /u01/app/11.2.0/grid
patch /tmp/12902308/12421404 apply successful for home /u01/app/11.2.0/grid
patch /tmp/12902308/12914289 apply successful for home /u01/app/11.2.0/grid
ACFS-9300: ADVM/ACFS distribution files found.
ACFS-9312: Existing ADVM/ACFS installation detected.
ACFS-9314: Removing previous ADVM/ACFS installation.
ACFS-9315: Previous ADVM/ACFS components successfully removed.
ACFS-9307: Installing requested ADVM/ACFS software.
ACFS-9308: Loading installed ADVM/ACFS drivers.
ACFS-9321: Creating udev for ADVM/ACFS.
ACFS-9323: Creating module dependencies – this may take some time.
ACFS-9327: Verifying ADVM/ACFS devices.
ACFS-9309: ADVM/ACFS installation correctness verified.
CRS-4123: Oracle High Availability Services has been started.
[root@boydb01 12902308]#
6.打完后可以查看
[oracle@boydb01 ~]$ /u01/app/11.2.0/grid/OPatch/opatch lsinventory -detail -oh /u01/app/11.2.0/grid
7.先到ORACLE_HOME(否则由于目录的原因会出错),然后运行升级脚本,对数据库本身进行修改。
[oracle@boydb01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Tue Sep 20 12:38:17 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 – 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> set time on timing on
12:38:27 SQL> @rdbms/admin/catbundle.sql exa apply
SP2-0310: unable to open file “rdbms/admin/catbundle.sql”
12:38:32 SQL> @?/rdbms/admin/catbundle.sql exa apply
PL/SQL procedure successfully completed.
最后检查文件:
catbundle_EXA__APPLY_.log
catbundle_EXA__GENERATE_.log
检查命令:
grep ^ORA | sort -u
正常情况是没有返回的。
最后启动GC,结束。
正常情况整个过程耗时1小时以内,中间apply命令自动会起停数据库,所以打补丁的时间还是需要考虑下的。
–注:命令和输出有masking
Recent Comments