Monday, May 1, 2017

Install Patch 25437695 component patch of combo patch 25434018 in Grid Infrastructure 12.1.0.2 in Oracle Enterprise Linux 7.3 x64

Install Patch 25437695 component patch of combo patch 25434018 in Grid Infrastructure 12.1.0.2 in Oracle Enterprise Linux 7.3 x64

Patch 25437695 is component-patch of combo patch 25434018. First we install component-patch 25434003 and then 25437695.

Operating System: Oracle Enterprise Linux 7 Update 2 x64
Oracle Software: Or``acle 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 p25434018_121020_Linux-x86-64_12.1.0.2.170418_DB_GI_PSU.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 patching procedure 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.     Applied sub-component patch 25434003. Please refer to my earlier post "Install Patch 25434003 component patch of combo patch 25434018 in Grid Infrastructure 12.1.0.2 in Oracle Enterprise Linux 7.3 x64" to see how to install sub-component patch 25434003.
6.     Always refer to README.html file provided with the patch.

Assumptions:
1.      $ORACLE_BASE= /u01/app/oracle
2.      $ORACLE_HOME = /u01/app/oracle/product/12.1.0.2/db_1
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.      Patch p25434018_121020_Linux-x86-64_12.1.0.2.170418_DB_GI_PSU.zip includes 2 sub-component patches 25434003 and 25437695. This blog is about installing component patch 25437695.

Patching Process:

1.      Set oracle user environment variables
Utility $ORACLE_HOME/OPatch/opatch has to be executed as oracle user to install this patch.

Profile of oracle user:

[oracle@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/.local/bin:$HOME/bin

export EDITOR=vi
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
export ORACLE_SID=IIOCDB
export ORACLE_UNQNAME=IIOCDB
export LD_LIBRARY_PATH=$ORACLE_HOME/lib

export PATH
[oracle@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 $ORACLE_HOME.

[oracle@db12c-01 25434018]$
[oracle@db12c-01 25434018]$ which opatch
/u01/app/oracle/product/12.1.0.2/db_1/OPatch/opatch
[oracle@db12c-01 25434018]$
[oracle@db12c-01 25434018]$ opatch version
OPatch Version: 12.2.0.1.8

OPatch succeeded.
[oracle@db12c-01 25434018]$

3.      Modify opatch executable

4.      Check for applied patches
Check for applied patches using “opatch lsinventory“ before the patch is installed. At this time patch 25434003 has been applied in $GRID_HOME and $ORACLE_HOME. Please refer to my earlierpost to Install sub-component patch 25434003 in Grid Infrastructure 12.1.0.2 in Oracle Enterprise Linux 7.3 x64.

A sample output from $ORACLE_HOME

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


Oracle Home       : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2017-05-01_19-45-53PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-05-01_19-45-53PM.txt

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

Installed Top-level Products (1):

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


Interim patches (2) :

Patch  25363740     : applied on Fri Apr 28 21:38:16 AEST 2017
Unique Patch ID:  20990699
Patch description:  "OCW Patch Set Update : 12.1.0.2.170418 (25363740)"
   Created on 7 Mar 2017, 23:34:43 hrs PST8PDT
   Bugs fixed:
     21339083, 18589889, 20768643, 19061429, 19133945, 19341538, 19521169
     20011424, 19361757, 19187207, 19302350, 19130141, 19530755, 21441387
     19028836, 19699720, 19620918, 19168690, 18899171, 17005215, 19244316
     19653795, 18634372, 19471722, 19536337, 19184188, 19131709, 20160490
     20995001, 21131037, 19380733, 20985167, 18943696, 20552947, 19591984
     18135723, 18461246, 20014326, 19524857, 25250824, 18890943, 19154753
     19499021, 25206628, 19046190, 20923930, 20028666, 24451580, 19051385
     19050688, 19682695, 19831611, 22891868, 21607972, 18922918, 21087799
     18956780, 19683886, 23757020, 19026993, 20110156, 21269977, 18261648
     18362971, 19558324, 22651583, 20185476, 18882642, 19478119, 19414274
     17447588, 19262534, 20752167, 19147513, 22475834, 18893463, 21242118
     19514085, 20758997, 19659885, 19319904, 18703978, 23079844, 24796183
     19700256, 19703246, 20467806, 19192901, 21527118, 19479503, 19147751
     18901356, 21232394, 18964974, 22162062, 18835366, 19013789, 19207286
     18950232, 22583325, 19148791, 19556820, 16505171, 21228405, 22261732
     22135419, 19449737, 21878613, 21646169, 19187515, 19230771, 20795241
     19453778, 19853036, 18843572, 18520351, 21430567, 19185148, 19232454
     21220597, 18541110, 18834955, 19204743, 20175174, 19140891, 18747335
     20676340, 19270660, 19325701, 20877003, 19222693, 19662663, 19684131
     19010177, 19272663, 18910576, 18907170, 19426384, 9372680, 20737462
     19700294, 20289828, 19331454, 22568500, 20278216, 20827053, 20119857
     19703199, 22456393, 20588164, 18955644, 20991879, 18508710, 19908346
     19589221, 18952857, 19537762, 21152052, 16286734, 20669114, 18762843
     18945249, 19184799, 19205086, 19351363, 20091753, 19031737, 19079087
     19148367, 18968981, 19150517, 20231741, 19217019, 18730096, 18975620
     19067804, 21259359, 19054979, 19209951, 19318983, 18747382, 19154673
     18752378, 22905714, 19150088, 19013444, 19234177, 18999857, 19075747
     19367276, 19612597, 19874047, 19677813, 23049292, 19427050, 18910443
     20033787, 19148982, 19777496, 20730170, 24362631, 18523468, 19277814
     20562133, 19071526, 21420753, 25537905, 18850051, 20433932, 20061168
     18468128, 19370739, 20822591, 19609388, 18776786, 20136892, 18989446
     19148793, 22904978, 19585454, 18317489, 19955755, 19059053, 19807548
     19124972, 22229116, 18910748, 19147509, 18849896, 19617592, 19398098
     22840085, 19076165, 19498411, 19704993, 21294273, 19459023, 20634511
     21229744, 19516572, 21474380, 21484367, 20276459, 21550724, 17208793
     19234907, 20007009, 19538714, 22867050, 22728264, 19383028, 19513969
     22195657, 23111368, 19986391, 19314048, 18834934, 19473851, 19458082
     18894342, 19522067, 23618734, 18116578, 19241857, 19076778, 19066699
     25206563, 19068003, 18937186, 20267877, 19916737, 19770543, 22863466
     19635215, 19613533, 21057239, 20783416, 19315522, 19141785, 19163887
     19885321, 25233268, 18715868, 18852058, 19701617, 19280860, 19139608
     21453435, 18946768, 19135521, 18604143, 23150001, 19627476, 20568884
     20317221, 20177779, 19266658, 19491996, 24522717, 18330979, 19027351
     21227730, 18707416, 21118157, 21113068, 19925992, 20235486, 20006646
     15922206, 18439295, 18991776, 21245437, 23170839, 19163425, 19550195
     20389257, 18849021, 18861196, 17940721, 18524834, 19287706, 19522313
     18835283, 18748932, 19184765, 21639478, 14851828, 20598625, 19226141
     19053891, 18871287, 25371730, 18998228, 18980002, 19682778, 19325604
     8934841, 18777835, 17338864, 18945906, 19513650, 19702758, 18952577
     19473088, 19178517, 18729269, 19529729, 19455563, 20877072, 23275930
     20340620, 18536826, 19292605, 22264951, 20920711, 20660273, 20011635
     17592037, 18935857, 22989069, 19029647, 19179158, 22302421, 23076471
     19140712, 20012766, 23049301, 19184276, 25206643, 20510208, 20001507
     20079414, 19680763, 19259765, 18962892, 19513888, 14661880, 21519340
     21222147, 20218012, 19551830, 21616278, 19068333, 18945435, 20775015
     19319192, 20839581, 19178629, 18774591, 21694237, 19304104, 19284357
     22594310, 20725084, 19457575, 21297657, 19069755, 19021575, 18715884
     19584688, 18798573, 19812592, 19018001, 19292272, 19270956, 21967791
     21794779, 23055224, 18700893, 21276514, 20467377, 18406774, 20607821
     21976167, 21082737, 21694632, 20115586, 20883009, 19164099, 18283792
     19155350, 19884033, 19146822, 18798432, 21123424, 24356071, 19471836
     20936562, 18750781, 19045143, 20559126, 22483804, 19146980, 19601003
     20099624, 21378016, 19537547, 19281106, 18862203, 19954372, 18235274
     19205617, 19513351, 20219458, 19150313, 18843054, 18708349, 19332386
     18953639, 21423055, 19371270, 25221056, 19203996, 20038431, 19370846
     21053036, 18998379, 20157569, 21357522, 19273577, 24709351, 25206634
     22113170, 19632437, 18990354, 19288396, 20620581, 19557558, 19127078
     22548137, 21792881, 20900588, 20053557, 22088198, 22664609, 19315567
     19444471, 19154933, 20953798, 18290252, 18813323, 19915945, 19500293
     18643483, 19134098, 23034352, 25206614, 18965694, 19226858, 19591356
     19602208, 22884308, 20069197, 18417590, 18920408, 18263259, 18636884
     22289350, 19043795, 20746507, 18260170, 18919682, 18678829, 19319357
     19273758, 18953878, 18999195, 24314323, 18759724, 20458032, 19066844
     13843841, 20290467, 22934855, 19649640, 19062675, 21924910, 18859710
     20862812, 19504641, 23101611, 19341481, 20293730, 19343245, 18304090
     19241655, 19470791, 18242738, 20649573, 18372060, 18953889, 18827679
     19140711, 19023430, 19259290, 19045388, 20186278, 25197395, 19522571
     19709663, 18875012, 18861564, 21075392, 19273760, 19225265, 15885689
     20853464, 21696068, 18819158, 21394146, 19049721, 19368917, 25206650
     21255373, 22393909, 20408163, 20579351, 18868829, 20350915, 21327402
     22024217, 23101338, 19820247, 25206585, 20363708, 19538241, 19804032

Patch  25171037     : applied on Fri Apr 28 21:36:44 AEST 2017
Unique Patch ID:  21099266
Patch description:  "Database Patch Set Update : 12.1.0.2.170418 (25171037)"
   Created on 7 Mar 2017, 12:37:23 hrs PST8PDT
Sub-patch  24732082; "Database Patch Set Update : 12.1.0.2.170117 (24732082)"
Sub-patch  24006101; "Database Patch Set Update : 12.1.0.2.161018 (24006101)"
Sub-patch  23054246; "Database Patch Set Update : 12.1.0.2.160719 (23054246)"
Sub-patch  22291127; "Database Patch Set Update : 12.1.0.2.160419 (22291127)"
Sub-patch  21948354; "Database Patch Set Update : 12.1.0.2.160119 (21948354)"
Sub-patch  21359755; "Database Patch Set Update : 12.1.0.2.5 (21359755)"
Sub-patch  20831110; "Database Patch Set Update : 12.1.0.2.4 (20831110)"
Sub-patch  20299023; "Database Patch Set Update : 12.1.0.2.3 (20299023)"
Sub-patch  19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)"
   Bugs fixed:
     19309466, 21172913, 19902195, 18250893, 25475853, 17655240, 19383839
     21266085, 19028800, 19035573, 16756406, 19366375, 18456643, 24523374
     19289642, 18845653, 19915271, 21291274, 18417036, 20475845, 22148226
     22528741, 19243521, 19658708, 21153266, 19326908, 19597583, 17414008
     20897759, 19174430, 22046677, 22243719, 24825843, 21960504, 19054077
     22657942, 20688221, 20428621, 21899588, 21387964, 13542050, 19723336
     19835133, 17532734, 19333670, 21373473, 23260854, 19687159, 14643995
     20977794, 20734332, 19012119, 19869255, 17551063, 18681056, 21977392
     23324000, 19676012, 20588502, 19520602, 19841800, 19439759, 20245930
     19303936, 19001359, 21476308, 22916353, 19393542, 23533524, 21099555
     22353346, 19141838, 19644859, 21106027, 21915719, 19908836, 21421886
     22529728, 19358317, 19134173, 19524158, 20447445, 20803014, 23025340
     21188584, 19335438, 19390567, 19058490, 18799993, 19769480, 19475971
     21097043, 21225209, 20677396, 19284031, 19450314, 19016730, 18967382
     20919320, 22075064, 20347562, 20348653, 22551446, 19896336, 24812585
     20048359, 21896069, 22496904, 19524384, 18440095, 16439813, 18354830
     20596234, 20440930, 22022760, 20936905, 19171086, 23197103, 17867700
     19791273, 18990023, 21241829, 19591608, 22296366, 20173897, 17210525
     18914624, 19571367, 21260431, 19501299, 20181030, 25056052, 20425790
     21868720, 19124589, 19402853, 19888853, 16870214, 17722075, 18202441
     18743542, 19001390, 20882568, 25546608, 19081128, 22173980, 21875360
     19178851, 19149990, 20951038, 22168163, 16777441, 25161298, 19606174
     24308635, 20848335, 20569094, 19791377, 19050649, 19382851, 20920911
     20528052, 22762046, 19189525, 19469538, 20598042, 22458049, 18988834
     19176326, 19048007, 22905130, 19238590, 20387265, 16941434, 21263635
     24397438, 20673810, 22160989, 20356733, 22380919, 18499088, 18436647
     21059919, 20825533, 18952989, 19124336, 22294260, 20794034, 19468347
     20284155, 19883092, 20657441, 17365043, 25539063, 21285458, 20952966
     25330273, 19176223, 21300341, 18288842, 19699191, 22353199, 24437510
     22083366, 21419850, 20669434, 18964978, 19577410, 21373076, 14283239
     19931709, 20368850, 21239530, 20880215, 20798891, 18122373, 20043616
     23124895, 19013183, 18856999, 21450666, 21133343, 22695831, 18893947
     21196809, 21354456, 19587324, 20464614, 24808595, 22062026, 19189317
     18307021, 21917884, 19708632, 20711718, 20134339, 22077517, 22815955
     24690216, 18973548, 22507210, 20101006, 20250147, 19197175, 23501901
     18797519, 19597439, 21387128, 19180770, 19879746, 19354335, 21785691
     19730508, 22366558, 24285405, 6599380, 21297872, 20322560, 18964939
     22520320, 21575362, 20171986, 22365117, 21542577, 22507234, 23170620
     20627866, 20124446, 16923858, 19518079, 19371175, 20466322, 18940497
     19074147, 22923409, 20842388, 17274537, 21380789, 19154375, 20474192
     19044962, 19532017, 19662635, 22374754, 20560611, 18899974, 18705806
     20471920, 19052488, 22024071, 19503821, 22809871, 20074391, 21184223
     23089357, 19157754, 21220620, 24316947, 18921743, 19865345, 19065677
     19065556, 19018447, 19018206, 19777862, 22223463, 19304354, 20878790
     21322887, 20879889, 20890311, 24350831, 19578350, 20869721, 21142837
     21756699, 20217801, 18819908, 19363645, 25483815, 21072646, 20898391
     19291380, 19593445, 20373598, 19248799, 20031873, 19155797, 19279273
     18886413, 18618122, 25490238, 20922010, 19990037, 20509482, 24739928
     18966843, 19077215, 20703000, 21526048, 20704450, 19068970, 21620471
     19023822, 20543011, 19670108, 19068610, 20267166, 21756677, 20476175
     18549238, 20328248, 18674047, 19385656, 18849537, 19684504, 20315311
     20899461, 19308965, 19143550, 21911701, 19024808, 18948177, 19468991
     20009833, 20868862, 20466628, 21756661, 20397490, 19706965, 22178855
     19604659, 16359751, 19032777, 19329654, 20862087, 19928926, 18974476
     23314180, 20212067, 20603378, 20859910, 19307662, 21847223, 21668627
     20281121, 19075256, 20877664, 19487147, 19076343, 24577566, 19430401
     19676905, 20844426, 20904530, 20925795, 20441797, 21296029, 21629064
     21442094, 23229229, 22865673, 20708701, 25079710, 19280225, 21315084
     18840932, 19213447, 18740837, 20294666, 19989009, 18191823, 21517440
     22062517, 19174942, 17319928, 21889720, 19703301, 20122715, 18411216
     20117253, 19258504, 21188532, 24386767, 17890099, 21649497, 16887946
     25264559, 18791688, 19721304, 22092979, 19490948, 19619732, 21164318
     20879709, 20165574, 19272708, 19818513, 19547370, 20139391, 24693382
     20228093, 21281532, 19978542, 22165897, 22359063, 19409212, 19805359
     19461270, 19434529, 18799063, 18990693, 20378086, 21246723, 17008068
     21422580, 21632821, 20831538, 20424899, 22351572, 20361671, 18674024
     19689979, 20235511, 23220453, 19873610, 16619249, 24411921, 20562898
     21091431, 19440586, 22757364, 18610915, 22175564, 19561643, 19399918
     19195895, 20832516, 20017509, 20907061, 21665897, 20746251, 19183343
     21787056, 23096938, 21273804, 19067244, 18043064, 21329301, 18885870
     19536415, 17835294, 25093739, 20446883, 21299490, 24413809, 21744290
     18254023, 20591183, 20413820, 19185876, 22465352, 20558005, 20402832
     19627012, 20093776, 18909599, 20618595, 16863642, 19639483, 19315691
     20331945, 19512341, 21479753, 19637186, 19174521, 19022470, 18607546
     20401975, 18306996, 18851894, 19649152, 20581111, 19201867, 20318889
     20936731, 21060755, 21294938, 20898997, 18510194, 19534363, 19188927



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

OPatch succeeded.
[oracle@db12c-01 25434018]$

5.      Go to the top level patch folder

Go to the top level patch folder and check if the patch files has been unzipped.
[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ cd /media/sf_SharedFolder/DB12c/R1/Patch/25434018/25437695
[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ pwd
/media/sf_SharedFolder/DB12c/R1/Patch/25434018/25437695
[oracle@db12c-01 25437695]$ ls
etc  files  README.html  README.txt
[oracle@db12c-01 25437695]$
[oracle@db12c-01 25434018]$ ls
25434003  25437695  README.html
[oracle@db12c-01 25434018]$

6. Check patches conflict
Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
 [oracle@db12c-01 25437695]$ pwd
 /media/sf_SharedFolder/DB12c/R1/Patch/25434018/25437695
[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2017, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2017-05-01_19-52-44PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@db12c-01 25437695]$


7.       Stop all the services running from $ORACLE_HOME

My $ORACLE_HOME has only 1 service running i.e. database IIOCDB so I will stop this database before applying the patch. If there are any other services running from $ORACLE_HOME then all these services should be stopped.

[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ srvctl stop database -d IIOCDB
[oracle@db12c-01 25437695]$

#srvctl stop home -o /u01/app/oracle/product/12.1.0.2/db_1/ -s /home/oracle/ora_stat.txt -t IMMEDIATE

8.       Apply the patch using opatch executable

As oracle user apply the patch.

[oracle@db12c-01 25437695]$ pwd
/media/sf_SharedFolder/DB12c/R1/Patch/25434018/25437695
[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2017-05-01_20-05-09PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   25437695

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.

Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/12.1.0.2/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '25437695' to OH '/u01/app/oracle/product/12.1.0.2/db_1'
ApplySession: Optional component(s) [ oracle.sqlj, 12.1.0.2.0 ]  not present in the Oracle Home or a higher version is found.

Patching component oracle.javavm.server, 12.1.0.2.0...

Patching component oracle.javavm.server.core, 12.1.0.2.0...

Patching component oracle.rdbms.dbscripts, 12.1.0.2.0...

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.javavm.client, 12.1.0.2.0...

Patching component oracle.dbjava.jdbc, 12.1.0.2.0...

Patching component oracle.dbjava.ic, 12.1.0.2.0...
Patch 25437695 successfully applied.
Log file location: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2017-05-01_20-05-09PM_1.log

OPatch succeeded.
[oracle@db12c-01 25437695]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.8
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2017-05-01_20-06-44PM_1.log

Verifying environment and performing prerequisite checks...

The following patch(es) are duplicate patches with patches installed in the Oracle Home.
 [ 25437695]
You have already installed same patch(es) with same UPI(s) or same version(s).
These patch(es) will be skipped.


OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2017-05-01_20-06-44PM_1.log

OPatch completed with warnings.
[oracle@db12c-01 25437695]$

9.       Check for the applied patch

Use “opatch lsinventory” to check for the applied patch. The output below is from $ORACLE_HOME.

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


Oracle Home       : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version    : 12.2.0.1.8
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2017-05-01_20-10-32PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-05-01_20-10-32PM.txt

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

Installed Top-level Products (1):

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


Interim patches (3) :

Patch  25437695     : applied on Mon May 01 20:06:04 AEST 2017
Unique Patch ID:  21057393
Patch description:  "Database PSU 12.1.0.2.170418, Oracle JavaVM Component (APR2017)"
   Created on 27 Feb 2017, 10:29:56 hrs PST8PDT
   Bugs fixed:
     25437695, 25494413, 25494379, 24917972, 25067795, 24534298, 25076732
     25076756, 24315824, 21659726, 24448240, 24448282, 23177536, 22675136
     23265914, 23265965, 23727148, 22674709, 22670413, 22670385, 21188537
     22139226, 22118835, 22118851, 21555660, 21811517, 19623450, 21566993
     21566944, 19176885, 21068507, 21047803, 21047766, 20415564, 20408829
     20408866, 19877336, 19855285, 19909862, 19895362, 19895326, 19153980
     19231857, 19223010, 19245191, 19699946

Patch  25363740     : applied on Fri Apr 28 21:38:16 AEST 2017
Unique Patch ID:  20990699
Patch description:  "OCW Patch Set Update : 12.1.0.2.170418 (25363740)"
   Created on 7 Mar 2017, 23:34:43 hrs PST8PDT
   Bugs fixed:
     21339083, 18589889, 20768643, 19061429, 19133945, 19341538, 19521169
     20011424, 19361757, 19187207, 19302350, 19130141, 19530755, 21441387
     19028836, 19699720, 19620918, 19168690, 18899171, 17005215, 19244316
     19653795, 18634372, 19471722, 19536337, 19184188, 19131709, 20160490
     20995001, 21131037, 19380733, 20985167, 18943696, 20552947, 19591984
     18135723, 18461246, 20014326, 19524857, 25250824, 18890943, 19154753
     19499021, 25206628, 19046190, 20923930, 20028666, 24451580, 19051385
     19050688, 19682695, 19831611, 22891868, 21607972, 18922918, 21087799
     18956780, 19683886, 23757020, 19026993, 20110156, 21269977, 18261648
     18362971, 19558324, 22651583, 20185476, 18882642, 19478119, 19414274
     17447588, 19262534, 20752167, 19147513, 22475834, 18893463, 21242118
     19514085, 20758997, 19659885, 19319904, 18703978, 23079844, 24796183
     19700256, 19703246, 20467806, 19192901, 21527118, 19479503, 19147751
     18901356, 21232394, 18964974, 22162062, 18835366, 19013789, 19207286
     18950232, 22583325, 19148791, 19556820, 16505171, 21228405, 22261732
     22135419, 19449737, 21878613, 21646169, 19187515, 19230771, 20795241
     19453778, 19853036, 18843572, 18520351, 21430567, 19185148, 19232454
     21220597, 18541110, 18834955, 19204743, 20175174, 19140891, 18747335
     20676340, 19270660, 19325701, 20877003, 19222693, 19662663, 19684131
     19010177, 19272663, 18910576, 18907170, 19426384, 9372680, 20737462
     19700294, 20289828, 19331454, 22568500, 20278216, 20827053, 20119857
     19703199, 22456393, 20588164, 18955644, 20991879, 18508710, 19908346
     19589221, 18952857, 19537762, 21152052, 16286734, 20669114, 18762843
     18945249, 19184799, 19205086, 19351363, 20091753, 19031737, 19079087
     19148367, 18968981, 19150517, 20231741, 19217019, 18730096, 18975620
     19067804, 21259359, 19054979, 19209951, 19318983, 18747382, 19154673
     18752378, 22905714, 19150088, 19013444, 19234177, 18999857, 19075747
     19367276, 19612597, 19874047, 19677813, 23049292, 19427050, 18910443
     20033787, 19148982, 19777496, 20730170, 24362631, 18523468, 19277814
     20562133, 19071526, 21420753, 25537905, 18850051, 20433932, 20061168
     18468128, 19370739, 20822591, 19609388, 18776786, 20136892, 18989446
     19148793, 22904978, 19585454, 18317489, 19955755, 19059053, 19807548
     19124972, 22229116, 18910748, 19147509, 18849896, 19617592, 19398098
     22840085, 19076165, 19498411, 19704993, 21294273, 19459023, 20634511
     21229744, 19516572, 21474380, 21484367, 20276459, 21550724, 17208793
     19234907, 20007009, 19538714, 22867050, 22728264, 19383028, 19513969
     22195657, 23111368, 19986391, 19314048, 18834934, 19473851, 19458082
     18894342, 19522067, 23618734, 18116578, 19241857, 19076778, 19066699
     25206563, 19068003, 18937186, 20267877, 19916737, 19770543, 22863466
     19635215, 19613533, 21057239, 20783416, 19315522, 19141785, 19163887
     19885321, 25233268, 18715868, 18852058, 19701617, 19280860, 19139608
     21453435, 18946768, 19135521, 18604143, 23150001, 19627476, 20568884
     20317221, 20177779, 19266658, 19491996, 24522717, 18330979, 19027351
     21227730, 18707416, 21118157, 21113068, 19925992, 20235486, 20006646
     15922206, 18439295, 18991776, 21245437, 23170839, 19163425, 19550195
     20389257, 18849021, 18861196, 17940721, 18524834, 19287706, 19522313
     18835283, 18748932, 19184765, 21639478, 14851828, 20598625, 19226141
     19053891, 18871287, 25371730, 18998228, 18980002, 19682778, 19325604
     8934841, 18777835, 17338864, 18945906, 19513650, 19702758, 18952577
     19473088, 19178517, 18729269, 19529729, 19455563, 20877072, 23275930
     20340620, 18536826, 19292605, 22264951, 20920711, 20660273, 20011635
     17592037, 18935857, 22989069, 19029647, 19179158, 22302421, 23076471
     19140712, 20012766, 23049301, 19184276, 25206643, 20510208, 20001507
     20079414, 19680763, 19259765, 18962892, 19513888, 14661880, 21519340
     21222147, 20218012, 19551830, 21616278, 19068333, 18945435, 20775015
     19319192, 20839581, 19178629, 18774591, 21694237, 19304104, 19284357
     22594310, 20725084, 19457575, 21297657, 19069755, 19021575, 18715884
     19584688, 18798573, 19812592, 19018001, 19292272, 19270956, 21967791
     21794779, 23055224, 18700893, 21276514, 20467377, 18406774, 20607821
     21976167, 21082737, 21694632, 20115586, 20883009, 19164099, 18283792
     19155350, 19884033, 19146822, 18798432, 21123424, 24356071, 19471836
     20936562, 18750781, 19045143, 20559126, 22483804, 19146980, 19601003
     20099624, 21378016, 19537547, 19281106, 18862203, 19954372, 18235274
     19205617, 19513351, 20219458, 19150313, 18843054, 18708349, 19332386
     18953639, 21423055, 19371270, 25221056, 19203996, 20038431, 19370846
     21053036, 18998379, 20157569, 21357522, 19273577, 24709351, 25206634
     22113170, 19632437, 18990354, 19288396, 20620581, 19557558, 19127078
     22548137, 21792881, 20900588, 20053557, 22088198, 22664609, 19315567
     19444471, 19154933, 20953798, 18290252, 18813323, 19915945, 19500293
     18643483, 19134098, 23034352, 25206614, 18965694, 19226858, 19591356
     19602208, 22884308, 20069197, 18417590, 18920408, 18263259, 18636884
     22289350, 19043795, 20746507, 18260170, 18919682, 18678829, 19319357
     19273758, 18953878, 18999195, 24314323, 18759724, 20458032, 19066844
     13843841, 20290467, 22934855, 19649640, 19062675, 21924910, 18859710
     20862812, 19504641, 23101611, 19341481, 20293730, 19343245, 18304090
     19241655, 19470791, 18242738, 20649573, 18372060, 18953889, 18827679
     19140711, 19023430, 19259290, 19045388, 20186278, 25197395, 19522571
     19709663, 18875012, 18861564, 21075392, 19273760, 19225265, 15885689
     20853464, 21696068, 18819158, 21394146, 19049721, 19368917, 25206650
     21255373, 22393909, 20408163, 20579351, 18868829, 20350915, 21327402
     22024217, 23101338, 19820247, 25206585, 20363708, 19538241, 19804032

Patch  25171037     : applied on Fri Apr 28 21:36:44 AEST 2017
Unique Patch ID:  21099266
Patch description:  "Database Patch Set Update : 12.1.0.2.170418 (25171037)"
   Created on 7 Mar 2017, 12:37:23 hrs PST8PDT
Sub-patch  24732082; "Database Patch Set Update : 12.1.0.2.170117 (24732082)"
Sub-patch  24006101; "Database Patch Set Update : 12.1.0.2.161018 (24006101)"
Sub-patch  23054246; "Database Patch Set Update : 12.1.0.2.160719 (23054246)"
Sub-patch  22291127; "Database Patch Set Update : 12.1.0.2.160419 (22291127)"
Sub-patch  21948354; "Database Patch Set Update : 12.1.0.2.160119 (21948354)"
Sub-patch  21359755; "Database Patch Set Update : 12.1.0.2.5 (21359755)"
Sub-patch  20831110; "Database Patch Set Update : 12.1.0.2.4 (20831110)"
Sub-patch  20299023; "Database Patch Set Update : 12.1.0.2.3 (20299023)"
Sub-patch  19769480; "Database Patch Set Update : 12.1.0.2.2 (19769480)"
   Bugs fixed:
     19309466, 21172913, 19902195, 18250893, 25475853, 17655240, 19383839
     21266085, 19028800, 19035573, 16756406, 19366375, 18456643, 24523374
     19289642, 18845653, 19915271, 21291274, 18417036, 20475845, 22148226
     22528741, 19243521, 19658708, 21153266, 19326908, 19597583, 17414008
     20897759, 19174430, 22046677, 22243719, 24825843, 21960504, 19054077
     22657942, 20688221, 20428621, 21899588, 21387964, 13542050, 19723336
     19835133, 17532734, 19333670, 21373473, 23260854, 19687159, 14643995
     20977794, 20734332, 19012119, 19869255, 17551063, 18681056, 21977392
     23324000, 19676012, 20588502, 19520602, 19841800, 19439759, 20245930
     19303936, 19001359, 21476308, 22916353, 19393542, 23533524, 21099555
     22353346, 19141838, 19644859, 21106027, 21915719, 19908836, 21421886
     22529728, 19358317, 19134173, 19524158, 20447445, 20803014, 23025340
     21188584, 19335438, 19390567, 19058490, 18799993, 19769480, 19475971
     21097043, 21225209, 20677396, 19284031, 19450314, 19016730, 18967382
     20919320, 22075064, 20347562, 20348653, 22551446, 19896336, 24812585
     20048359, 21896069, 22496904, 19524384, 18440095, 16439813, 18354830
     20596234, 20440930, 22022760, 20936905, 19171086, 23197103, 17867700
     19791273, 18990023, 21241829, 19591608, 22296366, 20173897, 17210525
     18914624, 19571367, 21260431, 19501299, 20181030, 25056052, 20425790
     21868720, 19124589, 19402853, 19888853, 16870214, 17722075, 18202441
     18743542, 19001390, 20882568, 25546608, 19081128, 22173980, 21875360
     19178851, 19149990, 20951038, 22168163, 16777441, 25161298, 19606174
     24308635, 20848335, 20569094, 19791377, 19050649, 19382851, 20920911
     20528052, 22762046, 19189525, 19469538, 20598042, 22458049, 18988834
     19176326, 19048007, 22905130, 19238590, 20387265, 16941434, 21263635
     24397438, 20673810, 22160989, 20356733, 22380919, 18499088, 18436647
     21059919, 20825533, 18952989, 19124336, 22294260, 20794034, 19468347
     20284155, 19883092, 20657441, 17365043, 25539063, 21285458, 20952966
     25330273, 19176223, 21300341, 18288842, 19699191, 22353199, 24437510
     22083366, 21419850, 20669434, 18964978, 19577410, 21373076, 14283239
     19931709, 20368850, 21239530, 20880215, 20798891, 18122373, 20043616
     23124895, 19013183, 18856999, 21450666, 21133343, 22695831, 18893947
     21196809, 21354456, 19587324, 20464614, 24808595, 22062026, 19189317
     18307021, 21917884, 19708632, 20711718, 20134339, 22077517, 22815955
     24690216, 18973548, 22507210, 20101006, 20250147, 19197175, 23501901
     18797519, 19597439, 21387128, 19180770, 19879746, 19354335, 21785691
     19730508, 22366558, 24285405, 6599380, 21297872, 20322560, 18964939
     22520320, 21575362, 20171986, 22365117, 21542577, 22507234, 23170620
     20627866, 20124446, 16923858, 19518079, 19371175, 20466322, 18940497
     19074147, 22923409, 20842388, 17274537, 21380789, 19154375, 20474192
     19044962, 19532017, 19662635, 22374754, 20560611, 18899974, 18705806
     20471920, 19052488, 22024071, 19503821, 22809871, 20074391, 21184223
     23089357, 19157754, 21220620, 24316947, 18921743, 19865345, 19065677
     19065556, 19018447, 19018206, 19777862, 22223463, 19304354, 20878790
     21322887, 20879889, 20890311, 24350831, 19578350, 20869721, 21142837
     21756699, 20217801, 18819908, 19363645, 25483815, 21072646, 20898391
     19291380, 19593445, 20373598, 19248799, 20031873, 19155797, 19279273
     18886413, 18618122, 25490238, 20922010, 19990037, 20509482, 24739928
     18966843, 19077215, 20703000, 21526048, 20704450, 19068970, 21620471
     19023822, 20543011, 19670108, 19068610, 20267166, 21756677, 20476175
     18549238, 20328248, 18674047, 19385656, 18849537, 19684504, 20315311
     20899461, 19308965, 19143550, 21911701, 19024808, 18948177, 19468991
     20009833, 20868862, 20466628, 21756661, 20397490, 19706965, 22178855
     19604659, 16359751, 19032777, 19329654, 20862087, 19928926, 18974476
     23314180, 20212067, 20603378, 20859910, 19307662, 21847223, 21668627
     20281121, 19075256, 20877664, 19487147, 19076343, 24577566, 19430401
     19676905, 20844426, 20904530, 20925795, 20441797, 21296029, 21629064
     21442094, 23229229, 22865673, 20708701, 25079710, 19280225, 21315084
     18840932, 19213447, 18740837, 20294666, 19989009, 18191823, 21517440
     22062517, 19174942, 17319928, 21889720, 19703301, 20122715, 18411216
     20117253, 19258504, 21188532, 24386767, 17890099, 21649497, 16887946
     25264559, 18791688, 19721304, 22092979, 19490948, 19619732, 21164318
     20879709, 20165574, 19272708, 19818513, 19547370, 20139391, 24693382
     20228093, 21281532, 19978542, 22165897, 22359063, 19409212, 19805359
     19461270, 19434529, 18799063, 18990693, 20378086, 21246723, 17008068
     21422580, 21632821, 20831538, 20424899, 22351572, 20361671, 18674024
     19689979, 20235511, 23220453, 19873610, 16619249, 24411921, 20562898
     21091431, 19440586, 22757364, 18610915, 22175564, 19561643, 19399918
     19195895, 20832516, 20017509, 20907061, 21665897, 20746251, 19183343
     21787056, 23096938, 21273804, 19067244, 18043064, 21329301, 18885870
     19536415, 17835294, 25093739, 20446883, 21299490, 24413809, 21744290
     18254023, 20591183, 20413820, 19185876, 22465352, 20558005, 20402832
     19627012, 20093776, 18909599, 20618595, 16863642, 19639483, 19315691
     20331945, 19512341, 21479753, 19637186, 19174521, 19022470, 18607546
     20401975, 18306996, 18851894, 19649152, 20581111, 19201867, 20318889
     20936731, 21060755, 21294938, 20898997, 18510194, 19534363, 19188927



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

OPatch succeeded.
[oracle@db12c-01 25437695]$

10.   Start the services from the $ORACLE_HOME

Start the services which we stopped earlier.
[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ srvctl start database -d IIOCDB
[oracle@db12c-01 25437695]$

      11.   Check if the database type

Check if the database is Standalone or CDB/Multitenant. The existence if IIOPDB1 PDB confirms this database is of type CDB/multitenant.

[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ . oraenv
ORACLE_SID = [IIOCDB] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@db12c-01 25437695]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Mon May 1 20:18:43 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> SELECT NAME FROM V$PDBS;

NAME
------------------------------
PDB$SEED
IIOPDB1

SQL>

12.   Load modified SQLs into Database

Now follow steps to load modified SQLs into CDB/Multitenant database.
a.       Stop the database
[oracle@db12c-01 25437695]$ srvctl stop database -d IIOCDB

b.      Start the database in upgrade mode
Start the CDB (Container) database in UPGRADE mode.

[oracle@db12c-01 25437695]$ . oraenv
ORACLE_SID = [IIOCDB] ?
The Oracle base remains unchanged with value /u01/app/oracle
[oracle@db12c-01 25437695]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Mon May 1 20:26:46 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> STARTUP UPGRADE
ORACLE instance started.

Total System Global Area 2399141888 bytes
Fixed Size                  2927192 bytes
Variable Size            1459619240 bytes
Database Buffers          922746880 bytes
Redo Buffers               13848576 bytes
Database mounted.
Database opened.
SQL>

c.       Open all the pluggable database in upgrade mode
After the CDB is started in UPGRADE mode, open the PDBs in UPGRADE mode.

SQL>
SQL> ALTER PLUGGABLE DATABASE ALL OPEN UPGRADE;

Pluggable database altered.

SQL> SELECT NAME, OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       MIGRATE
IIOPDB1                        MIGRATE

SQL>

d.      Exit from SQL*Plus Session
SQL> EXIT
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
[oracle@db12c-01 25437695]$

e.      Go to OPatch directory

[oracle@db12c-01 25437695]$
[oracle@db12c-01 25437695]$ cd $ORACLE_HOME/OPatch
[oracle@db12c-01 OPatch]$ pwd
/u01/app/oracle/product/12.1.0.2/db_1/OPatch
[oracle@db12c-01 OPatch]$

f.        Run datapatch

[oracle@db12c-01 OPatch]$ ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Mon May  1 20:33:42 2017
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_26588_2017_05_01_20_33_42/sqlpatch_invocation.log

Connecting to database...OK
Note:  Datapatch will only apply or rollback SQL fixes for PDBs
       that are in an open state, no patches will be applied to closed PDBs.
       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
       (Doc ID 1585822.1)
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Patch 25437695 (Database PSU 12.1.0.2.170418, Oracle JavaVM Component (APR2017)):
  Installed in the binary registry only
Bundle series PSU:
  ID 170418 in the binary registry and ID 170418 in PDB CDB$ROOT, ID 170418 in PDB PDB$SEED

Adding patches to installation queue and performing prereq checks...
Installation queue:
  For the following PDBs: CDB$ROOT PDB$SEED
    Nothing to roll back
    The following patches will be applied:
      25437695 (Database PSU 12.1.0.2.170418, Oracle JavaVM Component (APR2017))
  For the following PDBs: IIOPDB1
    Nothing to roll back
    The following patches will be applied:
      25437695 (Database PSU 12.1.0.2.170418, Oracle JavaVM Component (APR2017))
      25171037 (DATABASE PATCH SET UPDATE 12.1.0.2.170418)

Installing patches...
Patch installation complete.  Total patches installed: 4

Validating logfiles...
Patch 25437695 apply (pdb CDB$ROOT): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/25437695/21057393/25437695_apply_IIOCDB_CDBROOT_2017May01_20_34_28.log (no errors)
Patch 25437695 apply (pdb PDB$SEED): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/25437695/21057393/25437695_apply_IIOCDB_PDBSEED_2017May01_20_36_18.log (no errors)
Patch 25437695 apply (pdb IIOPDB1): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/25437695/21057393/25437695_apply_IIOCDB_IIOPDB1_2017May01_20_36_55.log (no errors)
Patch 25171037 apply (pdb IIOPDB1): SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/25171037/21099266/25171037_apply_IIOCDB_IIOPDB1_2017May01_20_37_35.log (no errors)
SQL Patching tool complete on Mon May  1 20:38:30 2017
[oracle@db12c-01 OPatch]$

g.       Restart the database

[oracle@db12c-01 OPatch]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Mon May 1 20:39:45 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> SHUTDOWN IMMEDIATE
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
SQL> EXIT
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options
[oracle@db12c-01 OPatch]$
[oracle@db12c-01 OPatch]$ srvctl start database -d IIOCDB
[oracle@db12c-01 OPatch]$

h.      Open all the pluggable databases

[oracle@db12c-01 OPatch]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Mon May 1 20:42:07 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> ALTER PLUGGABLE DATABASE ALL OPEN;

Pluggable database altered.

SQL> SELECT NAME, OPEN_MODE FROM V$PDBS;

NAME                           OPEN_MODE
------------------------------ ----------
PDB$SEED                       READ ONLY
IIOPDB1                        READ WRITE

SQL>

i.         Check log files for errors

Check the following log files in $ORACLE_BASE/cfgtoollogs/sqlpatch/25437695/<unique patch ID> for errors:

25437695_apply_<database SID>_<CDB name>_<timestamp>.log

Where database SID is the database SID, CDB name is the name of the multitenant container database, and timestamp is of the form YYYYMMMDD_HH_MM_SS.

[oracle@db12c-01 OPatch]$ cd $ORACLE_BASE/cfgtoollogs/sqlpatch/25437695
[oracle@db12c-01 25437695]$ ls
21057393 >>>> unique patch id
[oracle@db12c-01 25437695]$ cd 21057393/
[oracle@db12c-01 21057393]$ ls
25437695_apply_IIOCDB_CDBROOT_2017May01_20_34_28.log  25437695_apply_IIOCDB_IIOPDB1_2017May01_20_36_55.log  25437695_apply_IIOCDB_PDBSEED_2017May01_20_36_18.log
[oracle@db12c-01 21057393]$

j.        Compile invalid packages

After installing the SQL portion of the patch, some packages could become INVALID. This will get recompiled upon access or you can run utlrp.sql to get them back into a VALID state.

[oracle@db12c-01 21057393]$
[oracle@db12c-01 21057393]$ cd $ORACLE_HOME/rdbms/admin
[oracle@db12c-01 admin]$ sqlplus '/as sysdba'

SQL*Plus: Release 12.1.0.2.0 Production on Mon May 1 20:47:16 2017

Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Advanced Analytics
and Real Application Testing options

SQL> @utlrp.sql

TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN  2017-05-01 20:47:24

DOC>   The following PL/SQL block invokes UTL_RECOMP to recompile invalid
DOC>   objects in the database. Recompilation time is proportional to the
DOC>   number of invalid objects in the database, so this command may take
DOC>   a long time to execute on a database with a large number of invalid
DOC>   objects.
DOC>
DOC>   Use the following queries to track recompilation progress:
DOC>
DOC>   1. Query returning the number of invalid objects remaining. This
DOC>      number should decrease with time.
DOC>         SELECT COUNT(*) FROM obj$ WHERE status IN (4, 5, 6);
DOC>
DOC>   2. Query returning the number of objects compiled so far. This number
DOC>      should increase with time.
DOC>         SELECT COUNT(*) FROM UTL_RECOMP_COMPILED;
DOC>
DOC>   This script automatically chooses serial or parallel recompilation
DOC>   based on the number of CPUs available (parameter cpu_count) multiplied
DOC>   by the number of threads per CPU (parameter parallel_threads_per_cpu).
DOC>   On RAC, this number is added across all RAC nodes.
DOC>
DOC>   UTL_RECOMP uses DBMS_SCHEDULER to create jobs for parallel
DOC>   recompilation. Jobs are created without instance affinity so that they
DOC>   can migrate across RAC nodes. Use the following queries to verify
DOC>   whether UTL_RECOMP jobs are being created and run correctly:
DOC>
DOC>   1. Query showing jobs created by UTL_RECOMP
DOC>         SELECT job_name FROM dba_scheduler_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>
DOC>   2. Query showing UTL_RECOMP jobs that are running
DOC>         SELECT job_name FROM dba_scheduler_running_jobs
DOC>            WHERE job_name like 'UTL_RECOMP_SLAVE_%';
DOC>#

PL/SQL procedure successfully completed.


TIMESTAMP
--------------------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_END  2017-05-01 20:47:32

DOC> The following query reports the number of objects that have compiled
DOC> with errors.
DOC>
DOC> If the number is higher than expected, please examine the error
DOC> messages reported with each object (using SHOW ERRORS) to see if they
DOC> point to system misconfiguration or resource constraints that must be
DOC> fixed before attempting to recompile these objects.
DOC>#

OBJECTS WITH ERRORS
-------------------
                  0

DOC> The following query reports the number of errors caught during
DOC> recompilation. If this number is non-zero, please query the error
DOC> messages in the table UTL_RECOMP_ERRORS to see if any of these errors
DOC> are due to misconfiguration or resource constraints that must be
DOC> fixed before objects can compile successfully.
DOC>#

ERRORS DURING RECOMPILATION
---------------------------
                          0


Function created.


PL/SQL procedure successfully completed.


Function dropped.

...Database user "SYS", database schema "APEX_040200", user# "98" 20:48:07
...Compiled 0 out of 3014 objects considered, 0 failed compilation 20:48:08
...271 packages
...263 package bodies
...452 tables
...11 functions
...16 procedures
...3 sequences
...457 triggers
...1320 indexes
...211 views
...0 libraries
...6 types
...0 type bodies
...0 operators
...0 index types
...Begin key object existence check 20:48:08
...Completed key object existence check 20:48:09
...Setting DBMS Registry 20:48:09
...Setting DBMS Registry Complete 20:48:09
...Exiting validate 20:48:09

PL/SQL procedure successfully completed.

SQL>

Hope this helps.