二:生成ocm文件
在rac1和rac2分别生成ocm.rsp文件。
su - oracle
$ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /home/oracle/ocm.rsp
[oracle@dbrac1 ~]$ env|grep ORACLE_HOME
ORACLE_HOME=/oracle/app/oracle/product/11.2.0/dbhome_1
[oracle@dbrac1 ~]$
[oracle@dbrac1 ~]$ $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /home/oracle/ocm.rsp
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:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
The OCM configuration response file (/home/oracle/ocm.rsp) was successfully created.
[oracle@dbrac1 ~]$
[oracle@dbrac2 ~]$ $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -no_banner -output /home/oracle/ocm.rsp
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:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
The OCM configuration response file (/home/oracle/ocm.rsp) was successfully created.
[oracle@dbrac2 ~]$ ll
total 4
-rw-r--r-- 1 oracle oinstall 623 May 15 20:15 ocm.rsp
[oracle@dbrac2 ~]$
[root@dbrac1 tmp]# cat /etc/oratab
+ASM1:/oracle/app/11.2.0/grid:N # line added by Agent
dbrac:/oracle/app/oracle/product/11.2.0/dbhome_1:N # line added by Agent
[root@dbrac1 tmp]#
This is the main log file: /oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-15_17-26-36.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-15_17-26-36.report.log
patch /tmp/27107360/26925576 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27107360/26609929 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27107360/22502505 apply successful for home /oracle/app/11.2.0/grid
Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
This is the main log file: /oracle/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatchauto2018-05-15_17-56-39.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatchauto2018-05-15_17-56-39.report.log
patch /tmp/27107360/26925576 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
patch /tmp/27107360/26609929/custom/server/26609929 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
Starting RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Started RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully
--给GI_HOME打补丁:
用ORACLE用户生成的ocm.rsp相应文件报错:Argument(s) Error... Given 'ocmrf' file does not exists. Please check the arguments and try again. OPatch failed with error code 135
--再使用grid用户生成ocm.rsp响应文件,如下:
[grid@dbrac2 ~]$ /oracle/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp
OCM Installation Response Generator 10.3.7.0.0 - Production
Copyright (c) 2005, 2012, 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:
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]: y
The OCM configuration response file (ocm.rsp) was successfully created.
[grid@dbrac2 ~]$ ll
total 8
-rw-r--r-- 1 grid oinstall 621 May 15 23:02 ocm.rsp
[grid@dbrac2 ~]$
[grid@dbrac2 ~]$
--打补丁:
/oracle/app/11.2.0/grid/OPatch/opatch auto /tmp/27107360/ -oh /oracle/app/11.2.0/grid -ocmrf /home/grid/ocm.rsp
This is the main log file: /oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-15_23-04-01.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/11.2.0/grid/cfgtoollogs/opatchauto2018-05-15_23-04-01.report.log
patch /tmp/27107360/26925576 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27107360/26609929 apply successful for home /oracle/app/11.2.0/grid
patch /tmp/27107360/22502505 apply successful for home /oracle/app/11.2.0/grid
Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.
opatch auto succeeded.
[root@dbrac2 ~]#
--检查:
[root@dbrac2 ~]# su - grid
[grid@dbrac2 ~]$ opatch lspatches
22502505;ACFS Patch Set Update : 11.2.0.4.160419 (22502505)
26609929;OCW Patch Set Update : 11.2.0.4.170814 (26609929)
26925576;Database Patch Set Update : 11.2.0.4.180116 (26925576)
OPatch succeeded.
[grid@dbrac2 ~]$
--给ORACLE_HOME打补丁
/oracle/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch auto /tmp/27107360 -oh /oracle/app/oracle/product/11.2.0/dbhome_1 -ocmrf /home/oracle/ocm.rsp
This is the main log file: /oracle/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatchauto2018-05-15_22-15-50.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/oracle/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatchauto2018-05-15_22-15-50.report.log
patch /tmp/27107360/26925576 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
patch /tmp/27107360/26609929/custom/server/26609929 apply successful for home /oracle/app/oracle/product/11.2.0/dbhome_1
Starting RAC /oracle/app/oracle/product/11.2.0/dbhome_1 ...
Started RAC /oracle/app/oracle/product/11.2.0/dbhome_1 successfully
opatch auto succeeded.
[root@dbrac2 27107360]#
--检查:
[root@dbrac2 27107360]# su - oracle
[oracle@dbrac2 ~]$ opatch lspatches
26609929;OCW Patch Set Update : 11.2.0.4.170814 (26609929)
26925576;Database Patch Set Update : 11.2.0.4.180116 (26925576)