Monday, 13 June 2016

RAC auto PSU patching


This auto patching procedure should be done on every node in the cluster: (auto PSU method applies patch to both GI and RDBMS home in the same node)
===========================================================================
[oracle@oracletestdb softwares]$ /data01/app/oracle/product/11.2.0.4/grid_home/OPatch/ocm/bin/emocmrsp -no_banner -output /data01/softwares/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 (/data01/softwares/ocm.rsp) was successfully created.
===============================================================================
 [oracle@oracletestdb ~]$ /data01/app/oracle/product/11.2.0.4/grid_home/OPatch/opatch lsinventory -oh /data01/app/oracle/product/11.2.0.4/grid_home
Oracle Interim Patch Installer version 11.2.0.3.12
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /data01/app/oracle/product/11.2.0.4/grid_home
Central Inventory : /u01/app/oraInventory
   from           : /data01/app/oracle/product/11.2.0.4/grid_home/oraInst.loc
OPatch version    : 11.2.0.3.12
OUI version       : 11.2.0.4.0
Log file location : /data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatch/opatch2016-06-11_01-22-02AM_1.log

Lsinventory Output file location : /data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatch/lsinv/lsinventory2016-06-11_01-22-02AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oracletestdb.ushrnd3.savvis.net
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 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 = oracletestdb
  Remote node = s616183dc3sl16
--------------------------------------------------------------------------------
OPatch succeeded.
===========================================================================
[oracle@oracletestdb ~]$
[oracle@oracletestdb ~]$ cd /data01/softwares/
[oracle@oracletestdb softwares]$ ls
client                                                                                         p10404530_112030_Linux-x86-64_1of7.zip
database                                                                                       p10404530_112030_Linux-x86-64_2of7.zip
grid                                                                                           p10404530_112030_Linux-x86-64_3of7.zip
?m??e??Ö©?????"????+&??????Ñ?]`?ר???S?0??0P7?_d?7O?p?,??i~Z?&c???Êk~?XcÔ²????]?h???:???8?^H ????  p10404530_112030_Linux-x86-64_4of7.zip
OBIARCU                                                                                        p13390677_112040_Linux-x86-64_1of7.zip
ocm.rsp                                                                                        p13390677_112040_Linux-x86-64_2of7.zip
oracleasm-2.6.18-274.el5-2.0.5-1.el5.x86_64.rpm                                                p13390677_112040_Linux-x86-64_3of7.zip
oracleasm-2.6.18-274.el5debug-2.0.5-1.el5.x86_64.rpm                                           p22738793_112040_Linux-x86-64.zip
oracleasm-2.6.18-274.el5-debuginfo-2.0.5-1.el5.x86_64.rpm                                      p6880880_112000_Linux-x86-64.zip
oracleasmlib-2.0.4-1.el5.x86_64.rpm                                                            upgradebkp
oracleasm-support-2.1.8-1.el5.x86_64.rpm
[oracle@oracletestdb softwares]$ unzip p22738793_112040_Linux-x86-64.zip

oracle@oracletestdb softwares]$ sudo su -
[root@oracletestdb ~]# ps -ef|grep smon
root      4510  4442  0 01:29 pts/0    00:00:00 grep smon
oracle   14033     1  0 Jun08 ?        00:00:13 ora_smon_HYPPDR1
oracle   19657     1  0 Jun08 ?        00:00:14 ora_smon_OBIAPDR1
root     25505     1  0 Jun08 ?        00:09:49 /data01/app/oracle/product/11.2.0.4/grid_home/bin/osysmond.bin
oracle   27166     1  0 Jun08 ?        00:00:00 asm_smon_+ASM1
[root@oracletestdb ~]# cd  /data01/app/oracle/product/11.2.0.4/grid_home
[root@oracletestdb grid_home]# cd OPatch
[root@oracletestdb OPatch]# ./opatch auto /data01/softwares/22738793 -ocmrf /data01/softwares/ocm.rsp
Executing /data01/app/oracle/product/11.2.0.4/grid_home/perl/bin/perl ./crs/patch11203.pl -patchdir /data01/softwares -patchn 22738793 -ocmrf /data01/softwares/ocm.rsp -paramfile /data01/app/oracle/product/11.2.0.4/grid_home/crs/install/crsconfig_params

This is the main log file: /data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatchauto2016-06-11_01-30-53.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/data01/app/oracle/product/11.2.0.4/grid_home/cfgtoollogs/opatchauto2016-06-11_01-30-53.report.log

2016-06-11 01:30:53: Starting Clusterware Patch Setup
Using configuration parameter file: /data01/app/oracle/product/11.2.0.4/grid_home/crs/install/crsconfig_params

Unable to determine if /u01/app/oracle/product/11.2.0.4/dbhome_1 is shared oracle home
Enter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yes

Unable to determine if /data01/app/oracle/product/11.2.0.4/grid_home is shared oracle home
Enter 'yes' if this is not a shared home or if the prerequiste actions are performed to patch this shared home (yes/no):yes

Stopping RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Stopped RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully

patch /data01/softwares/22738793/22502456  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1
patch /data01/softwares/22738793/22502549/custom/server/22502549  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1
patch /data01/softwares/22738793/22674697  apply successful for home  /u01/app/oracle/product/11.2.0.4/dbhome_1

Stopping CRS...
Stopped CRS successfully

patch /data01/softwares/22738793/22502456  apply successful for home  /data01/app/oracle/product/11.2.0.4/grid_home
patch /data01/softwares/22738793/22502549  apply successful for home  /data01/app/oracle/product/11.2.0.4/grid_home
patch /data01/softwares/22738793/22502505  apply successful for home  /data01/app/oracle/product/11.2.0.4/grid_home

Starting CRS...
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.

Starting RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Started RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully

opatch auto succeeded.


=====================================================
Abover steps need to do in every node in the cluster:
=====================================================




[root@oracletestdb OPatch]# ps -ef|grep smon
root     13471     1  0 01:46 ?        00:00:00 /data01/app/oracle/product/11.2.0.4/grid_home/bin/osysmond.bin
oracle   15033     1  0 01:47 ?        00:00:00 asm_smon_+ASM1
oracle   17861     1  0 01:48 ?        00:00:00 ora_smon_HYPPDR1
oracle   17972     1  0 01:48 ?        00:00:00 ora_smon_OBIAPDR1
root     19079  4442  0 01:48 pts/0    00:00:00 grep smon
[root@oracletestdb OPatch]#
=========================================================
==========================================================
[oracle@oracletestdb OPatch]$ ps -ef|grep smon
root     13471     1  0 01:46 ?        00:00:14 /data01/app/oracle/product/11.2.0.4/grid_home/bin/osysmond.bin
oracle   15033     1  0 01:47 ?        00:00:00 asm_smon_+ASM1
oracle   17861     1  0 01:48 ?        00:00:01 ora_smon_HYPPDR1
oracle   17972     1  0 01:48 ?        00:00:01 ora_smon_OBIAPDR1
oracle   19879 16965  0 02:51 pts/0    00:00:00 grep smon
[oracle@oracletestdb OPatch]$ . oraenv
ORACLE_SID = [oracle] ? HYPPDR1
The Oracle base has been set to /u01/app/oracle
[oracle@oracletestdb OPatch]$ cd
[oracle@oracletestdb ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Sat Jun 11 02:51:57 2016

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, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options

SQL> @?/rdbms/admin/catbundle.sql psu apply
===========================================================
=======================================================

sqlplus / as sysdba
SQL> alter system set cluster_database=false scope=spfile;

srvctl stop database -d <db Name>  (we need to down instances in all the nodes, so i am using srvctl)

cd $ORACLE_HOME/sqlpatch/22674697
$sqlplus / as sysdba
sql>startup upgrade
sql>postinstall.sql
SQL> alter system set cluster_database=true scope=spfile;
sql>shut immediate
sql>exit

srvctl start database -d <db Name>

$sqlplus / as sysdba
sql>@?/rdbms/admin/utlrp.sql
========================================================


No comments:

Post a Comment