Saturday, April 29, 2017

Install Patch 21255373 in Grid Infrastructure 12.1.0.2 in Oracle Enterprise Linux 7.3 x64


For Oracle Grid Infrastructure 12c R1 (12.1.0.2), patch 21255373 is mandatory to upgrade to Oracle Grid Infrastructure 12.2.


Operating System: Oracle Enterprise Linux 7 Update 3 x64

Oracle Software: Oracle Grid Infrastructure 12c R1 (12.1.0.2)

Prerequisites:
  1. Installed Oracle Grid Infrastructure 12c R1 (12.1.0.2) (p17694377_121020_Linux-x86-64_3of8.zip and p17694377_121020_Linux-x86-64_4of8.zip)
  2. Download patch p21255373_121023forOCW_Linux-x86-64.zip from My Oracle Support.
  3. Unzip patch in a staging area. In my case I have the patch unzipped at “/media/sf_SharedFolder/DB12c/R1/Patch/
  4. This method is for Oracle Restart Environment, which means there is No-Shared Grid Infrastructure Home and No-Shared Oracle Database Home. There is no ACFS configured.
  5. Always refer to README.html file provided with the patch.
Assumptions:
  1. $ORACLE_BASE= /u01/app/grid
  2. $ORACLE_HOME=$GRID_HOME= /u01/app/12.1.0.2/grid
  3. Role segregation has been implemented, which means grid user is used to install Grid Infrastructure Binaries and oracle user is used to install Oracle Database Binaries.
  4. As of time when this blog was written patch 21255373 is also included as part of PSU p25434018_121020_Linux-x86-64_12.1.0.2.170418_DB_GI_PSU.zip, but before this PSU is installed patch 21255373 has to be installed separately. The prerequisite checks while upgrading Grid Infrastructure 12.1.0.2 to 12.2 will fail if patch 21255373 is not installed separately.

Please refer to my earlier post to see how to “Share Windows files and Folders in Oracle VirtualBox 5.1 VM” so that there is no need to copy the patch across to the Linux Virtual Machine. This will save space in the Guest Operating System and does not increase the size of Guest Operating System Virtual Hard Disk.

Patching process

1.      Set grid user environment for root user
Utility $GRID_HOME/OPatch/opatchauto has to be executed as root user to install this patch.

Profile of root user:

[root@db12c-01 ~]# cat .bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin
export EDITOR=vi
export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/12.1.0.2/grid
export GRID_HOME=$ORACLE_HOME
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export ORACLE_SID=+ASM

export PATH
[root@db12c-01 ~]#

2.      Check opatch version

In order to install this patch, make sure the OPatch utility version 12.1.0.1.2 or later is installed in $GRID_HOME.

[root@db12c-01 21255373]# which opatch
/u01/app/12.1.0.2/grid/OPatch/opatch
[root@db12c-01 21255373]# opatch version
OPatch Version: 12.2.0.1.8

OPatch succeeded.
[root@db12c-01 21255373]#

3.      Modify opatch executable



4. Check for applied patches

Check for applied patches using “opatch lsinventory“ before the patch is installed. At this time there are no patches applied in $GRID_HOME.

[grid@db12c-01 ~]$ opatch lsinventory
Oracle Interim Patch Installer version 12.1.0.1.3
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/12.1.0.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.1.0.2/grid/oraInst.loc
OPatch version    : 12.1.0.1.3
OUI version       : 12.1.0.2.0
Log file location : /u01/app/12.1.0.2/grid/cfgtoollogs/opatch/opatch2017-04-28_20-09-24PM_1.log

Lsinventory Output file location : /u01/app/12.1.0.2/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-04-28_20-09-24PM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Grid Infrastructure 12c                                       12.1.0.2.0
There are 1 products installed in this Oracle Home.


There are no Interim patches installed in this Oracle Home.


--------------------------------------------------------------------------------

OPatch succeeded.


5. Go to the top level patch folder

Go to the top level patch folder and check if the patch files has been unzipped.

[root@db12c-01 ~]# cd /media/sf_SharedFolder/DB12c/R1/Patch/21255373
[root@db12c-01 21255373]# pwd
/media/sf_SharedFolder/DB12c/R1/Patch/21255373
[root@db12c-01 21255373]#
[root@db12c-01 21255373]# ls
21255373  automation  bundle.xml  README.html  README.txt
[root@db12c-01 21255373]#
[root@db12c-01 21255373]#

6.       Check one-off patches conflict

Determine whether any currently installed one-off patches conflict with the PSU patch as follows:

[root@db12c-01 ~]# cd /media/sf_SharedFolder/DB12c/R1/Patch/21255373
[root@db12c-01 21255373]# pwd
/media/sf_SharedFolder/DB12c/R1/Patch/21255373
[root@db12c-01 21255373]#
[root@db12c-01 21255373]# ls
21255373  automation  bundle.xml  README.html  README.txt
[root@db12c-01 21255373]#
[root@db12c-01 21255373]# opatchauto apply 21255373 -analyze

OPatchauto session is initiated at Fri Apr 28 20:22:04 2017

System initialization log file is /u01/app/12.1.0.2/grid/cfgtoollogs/opatchautodb/systemconfig2017-04-28_08-22-07PM.log.

Session log file is /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/opatchauto2017-04-28_08-22-11PM.log
The id for this session is Q2JR

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.1.0.2/db_1
Patch applicablity verified successfully on home /u01/app/oracle/product/12.1.0.2/db_1


Verifying patch inventory on home /u01/app/oracle/product/12.1.0.2/db_1
Patch inventory verified successfully on home /u01/app/oracle/product/12.1.0.2/db_1


Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.1.0.2/grid
Patch applicablity verified successfully on home /u01/app/12.1.0.2/grid


Verifying patch inventory on home /u01/app/12.1.0.2/grid
No step execution required.........
Patch inventory verified successfully on home /u01/app/12.1.0.2/grid

OPatchAuto successful.

--------------------------------Summary--------------------------------

Analysis for applying patches has completed successfully:

Host:db12c-01
SIDB Home:/u01/app/oracle/product/12.1.0.2/db_1


==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /media/sf_SharedFolder/DB12c/R1/Patch/21255373/21255373
Log: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2017-04-28_20-22-21PM_1.log


Host:db12c-01
SIHA Home:/u01/app/12.1.0.2/grid


==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /media/sf_SharedFolder/DB12c/R1/Patch/21255373/21255373
Log: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2017-04-28_20-22-59PM_1.log



OPatchauto session completed at Fri Apr 28 20:24:01 2017
Time taken to complete the session 1 minute, 59 seconds
[root@db12c-01 21255373]#

7.       Apply the patch using opatchauto executable

As root user apply the patch.
[root@db12c-01 ~]# cd /media/sf_SharedFolder/DB12c/R1/Patch/21255373
[root@db12c-01 21255373]# pwd
/media/sf_SharedFolder/DB12c/R1/Patch/21255373
[root@db12c-01 21255373]#
[root@db12c-01 21255373]# ls
21255373  automation  bundle.xml  README.html  README.txt
[root@db12c-01 21255373]#
[root@db12c-01 21255373]# opatchauto apply 21255373

OPatchauto session is initiated at Fri Apr 28 20:24:14 2017

System initialization log file is /u01/app/12.1.0.2/grid/cfgtoollogs/opatchautodb/systemconfig2017-04-28_08-24-16PM.log.

Session log file is /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/opatchauto2017-04-28_08-24-20PM.log
The id for this session is 5LWD

Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.1.0.2/db_1
Patch applicablity verified successfully on home /u01/app/oracle/product/12.1.0.2/db_1


Verifying patch inventory on home /u01/app/oracle/product/12.1.0.2/db_1
Patch inventory verified successfully on home /u01/app/oracle/product/12.1.0.2/db_1


Executing OPatch prereq operations to verify patch applicability on home /u01/app/12.1.0.2/grid
Patch applicablity verified successfully on home /u01/app/12.1.0.2/grid


Verifying patch inventory on home /u01/app/12.1.0.2/grid
No step execution required.........
Patch inventory verified successfully on home /u01/app/12.1.0.2/grid


Preparing to bring down database service on home /u01/app/oracle/product/12.1.0.2/db_1
Successfully prepared home /u01/app/oracle/product/12.1.0.2/db_1 to bring down database service


Bringing down database service on home /u01/app/oracle/product/12.1.0.2/db_1
Following database has been stopped and will be restarted later during the session: iiocdb
Database service successfully brought down on home /u01/app/oracle/product/12.1.0.2/db_1


Bringing down CRS service on home /u01/app/12.1.0.2/grid
Prepatch operation log file location: /u01/app/12.1.0.2/grid/cfgtoollogs/crsconfig/hapatch_2017-04-28_08-26-05PM.log
CRS service brought down successfully on home /u01/app/12.1.0.2/grid


Start applying binary patch on home /u01/app/oracle/product/12.1.0.2/db_1
Binary patch applied successfully on home /u01/app/oracle/product/12.1.0.2/db_1


Start applying binary patch on home /u01/app/12.1.0.2/grid
Binary patch applied successfully on home /u01/app/12.1.0.2/grid


Starting CRS service on home /u01/app/12.1.0.2/grid
Postpatch operation log file location: /u01/app/12.1.0.2/grid/cfgtoollogs/crsconfig/hapatch_2017-04-28_08-30-14PM.log
CRS service started successfully on home /u01/app/12.1.0.2/grid


Starting database service on home /u01/app/oracle/product/12.1.0.2/db_1
Database service successfully started on home /u01/app/oracle/product/12.1.0.2/db_1


Preparing home /u01/app/oracle/product/12.1.0.2/db_1 after database service restarted
No step execution required.........
Prepared home /u01/app/oracle/product/12.1.0.2/db_1 successfully after database service restarted


Trying to apply SQL patch on home /u01/app/oracle/product/12.1.0.2/db_1
SQL patch applied successfully on home /u01/app/oracle/product/12.1.0.2/db_1


Verifying patches applied on home /u01/app/12.1.0.2/grid
No step execution required.........
Patch verification completed with warning on home /u01/app/12.1.0.2/grid


Verifying patches applied on home /u01/app/oracle/product/12.1.0.2/db_1
No step execution required.........
Patch verification completed with warning on home /u01/app/oracle/product/12.1.0.2/db_1

OPatchAuto successful.

--------------------------------Summary--------------------------------

Patching is completed successfully. Please find the summary as follows:

Host:db12c-01
SIDB Home:/u01/app/oracle/product/12.1.0.2/db_1
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /media/sf_SharedFolder/DB12c/R1/Patch/21255373/21255373
Log: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2017-04-28_20-26-27PM_1.log


Host:db12c-01
SIHA Home:/u01/app/12.1.0.2/grid
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /media/sf_SharedFolder/DB12c/R1/Patch/21255373/21255373
Log: /u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2017-04-28_20-27-20PM_1.log



OPatchauto session completed at Fri Apr 28 20:32:01 2017
Time taken to complete the session 7 minutes, 47 seconds
[root@db12c-01 21255373]#

8. Check for the applied patch

Use “opatch lsinventory” to check for the applied patch.

[grid@db12c-01 ~]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2017, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/12.1.0.2/grid
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/12.1.0.2/grid/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/12.1.0.2/grid/cfgtoollogs/opatch/opatch2017-04-28_21-14-29PM_1.log

Lsinventory Output file location : /u01/app/12.1.0.2/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-04-28_21-14-29PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: db12c-01
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 12c                                       12.1.0.2.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch  21255373     : applied on Fri Apr 28 20:30:08 AEST 2017
Unique Patch ID:  19853332
Patch description:  "OCW Interim patch for 21255373"
   Created on 31 Mar 2017, 02:17:03 hrs PST8PDT
   Bugs fixed:
     18589889, 19139608, 19280860, 19061429, 19133945, 19341538, 18946768
     19135521, 19361757, 19187207, 19302350, 19130141, 19530755, 19699720
     19168690, 19266658, 18899171, 19244316, 19653795, 18330979, 19471722
     18634372, 19027351, 18707416, 19184188, 19131709, 20235486, 19925992
     20006646, 18991776, 18439295, 19380733, 18943696, 19550195, 18135723
     19163425, 20014326, 19524857, 18849021, 18890943, 18861196, 19154753
     17940721, 19522313, 18748932, 18835283, 19184765, 19499021, 19046190
     19051385, 19682695, 19050688, 19831611, 19226141, 19053891, 18871287
     18998228, 18922918, 18980002, 19683886, 18956780, 18777835, 19026993
     17338864, 18261648, 19513650, 19702758, 18952577, 17447588, 19414274
     20752167, 19262534, 19147513, 19473088, 19178517, 19529729, 19455563
     19319904, 18703978, 20340620, 18536826, 19703246, 19292605, 19192901
     20660273, 20011635, 19479503, 19029647, 19179158, 18901356, 19140712
     18964974, 18835366, 19184276, 19013789, 19207286, 20510208, 20001507
     18950232, 20079414, 19680763, 19259765, 19148791, 19556820, 19449737
     18962892, 19187515, 19513888, 19230771, 19853036, 19453778, 19551830
     19068333, 18520351, 18843572, 19185148, 18945435, 19232454, 18541110
     18834955, 19319192, 19204743, 19178629, 19304104, 19140891, 19270660
     19457575, 19021575, 19069755, 18715884, 19584688, 18798573, 19812592
     19018001, 19325701, 19292272, 19270956, 19222693, 18700893, 19662663
     18406774, 19010177, 18910576, 18907170, 19700294, 19164099, 19331454
     18955644, 18508710, 18798432, 19146822, 19589221, 19537762, 16286734
     18762843, 19045143, 18945249, 19146980, 19184799, 19205086, 20091753
     18862203, 19537547, 19281106, 19031737, 19079087, 18968981, 19148367
     19150517, 20231741, 19217019, 18730096, 18975620, 19205617, 19513351
     18843054, 19150313, 18708349, 18953639, 19067804, 19371270, 19203996
     20038431, 19054979, 19209951, 19318983, 19154673, 18752378, 19150088
     19013444, 19234177, 18998379, 20157569, 18999857, 19273577, 19075747
     19367276, 19632437, 19612597, 19874047, 19288396, 18990354, 19557558
     19427050, 19127078, 18910443, 20053557, 20033787, 19315567, 19148982
     18290252, 18813323, 19777496, 19500293, 18643483, 19277814, 18523468
     19134098, 19071526, 18965694, 19226858, 18850051, 19602208, 20061168
     18417590, 19370739, 18920408, 19609388, 18636884, 18776786, 18989446
     19148793, 19043795, 19585454, 19955755, 18317489, 18260170, 18919682
     19807548, 18678829, 19124972, 19147509, 18849896, 18910748, 19273758
     18953878, 19076165, 19704993, 18999195, 19498411, 18759724, 19459023
     20276459, 19066844, 17208793, 19234907, 13843841, 19538714, 19383028
     19649640, 19062675, 19513969, 18859710, 19504641, 19341481, 20293730
     19986391, 18304090, 19343245, 19314048, 18834934, 19473851, 19241655
     18242738, 19458082, 19470791, 18894342, 18372060, 19522067, 18953889
     18827679, 19259290, 19140711, 19023430, 19045388, 19241857, 19076778
     19522571, 18875012, 18861564, 19066699, 19273760, 19225265, 18819158
     19068003, 18937186, 19049721, 19368917, 21255373, 19635215, 18868829
     19141785, 19885321, 19163887, 19820247, 18715868, 18852058, 19538241
     19804032

   Patch Location in Inventory:
     /u01/app/12.1.0.2/grid/inventory/oneoffs/21255373
   Patch Location in Storage area:
     /u01/app/12.1.0.2/grid/.patch_storage/21255373_Mar_31_2017_02_17_03

--------------------------------------------------------------------------------

OPatch succeeded.


Hope this helps.

No comments:

Post a Comment