Patching Oracle Database Release Updates Revision (RUR) 18.3.2.0.0 to 18.4.1.0.0

Description:-

We are going to perform Patching Oracle Database Release Update Revision 18.3.2.0.0 to 18.4.1.0.0

About Oracle Database Release Numbers:-
Oracle Database releases are released in version and version_full releases. The version is designated in the form major release numeral.0.0.0.0. The release version is the annual release designation of the database software. For example: 2018 is the release year, and the release version is 18.0.0.0.0. The version_full release is updated using numeric segments that change, based on the annual release designation of the software, the quarterly release update version (RU), and the quarterly release updates revision (RUR).
Oracle Database version_full releases are categorized by three numeric segments, which are divided by periods. The first, second, and third numerals provide information about the Oracle Database releases, starting with Oracle Database release 18c:

First numeral: Oracle Database major release number. For example: Oracle Database 18c; Oracle Database 12c. Starting with Oracle Database 18c, the first numeral indicates the initial year in which an Oracle Database version is released. For example: 2018 is the initial release year for Oracle Database 18c (18.0.0.0.0)
Second numeral: Oracle Database Release Update (Update) in Oracle Database 18c and later releases. For example: 18.3 is Release Update 3. In releases before Oracle Database 18c, the second numeral designates a maintenance release number. For example: Oracle Database 12c release 1 (12.1); Oracle 12c release 2 (12.2).
Third numeral: Oracle Database release updates revision (Revision). For example: 18.1.1.; 18.2.1, 18.3.0
Fourth numeral: Oracle Database increment version. This nomenclature can apply to updates in future releases, and it applies to all releases earlier than 18c. For example: 12.1.0.1, 12.2.0.1,
Fifth numeral: This numeral is reserved for future use.

Caution:

Oracle strongly recommends that you apply the most recent release update (Update) or bundle patch or patch set update to your source and target databases before starting an upgrade, and before starting a downgrade.

 

Check Database version :

[oracle@test ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Thu Feb 14 04:26:25 2019
Version 18.3.2.0.0

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


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.2.0.0

Check Opatch version and lsinventory :

Check the opatch version and inventory for ORACLE_HOME.

[oracle@test ~]$ export ORACLE_HOME=/u02/app/oracle/product/18.3.0/db_1
[oracle@test ~]$ export PATH=/u02/app/oracle/product/18.3.0/db_1/OPatch:$PATH
[oracle@test ~]$ opatch version
OPatch Version: 12.2.0.1.14

OPatch succeeded.

Minimum version of OPatch utility version 12.2.0.1.14 or later to apply this patch.

[oracle@test ~]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.

Oracle Home : /u02/app/oracle/product/18.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/18.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.4.0
Log file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-14_04-27-17AM_1.log

Lsinventory Output file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2019-02-14_04-27-17AM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: test.localdomain.com
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 18c 18.0.0.0.0
There are 1 products installed in this Oracle Home.

Interim patches (4) :

Patch 28790643 : applied on Sat Feb 09 02:01:58 IST 2019
Unique Patch ID: 22605424
Patch description: "Database Release Update Revision : 18.3.2.0.190115 (28790643)"
Created on 1 Dec 2018, 05:13:21 hrs PST8PDT
Bugs fixed:
25929650, 9062315, 13554903, 21547051, 21766220, 21806121, 23003564
23310101, 24489904, 24689376, 24737581, 24925863, 25035594, 25035599
25287072, 25348956, 25634405, 25726981, 25743479, 25824236, 25943740
26226953, 26336101, 26423085, 26427905, 26450454, 26476244, 26598422
26615291, 26646549, 26654411, 26731697, 26785169, 26792891, 26818960
26822620, 26843558, 26843664, 26846077, 26894737, 26898279, 26928317
26933599, 26956033, 26961415, 26966120, 26986173, 26992964, 27005278
27026401, 27028251, 27030974, 27036408, 27038986, 27041253, 27044575
27047831, 27053044, 27058530, 27060167, 27060859, 27061736, 27066451
27066519, 27073066, 27086821, 27090765, 27101527, 27101652, 27110878
27112686, 27119621, 27126666, 27128580, 27135647, 27143756, 27143882
27147979, 27153641, 27155549, 27156355, 27163928, 27169796, 27181521
27181537, 27189611, 27190851, 27193810, 27199245, 27208953, 27210038
27210872, 27214085, 27215007, 27216224, 27221900, 27222121, 27222626
27224987, 27226913, 27232983, 27233563, 27236052, 27236110, 27240246
27240570, 27241221, 27241247, 27244337, 27244785, 27249215, 27250547
27254851, 27258578, 27259386, 27259983, 27262650, 27262945, 27263276
27263996, 27270197, 27274456, 27274536, 27275136, 27275776, 27282707
27283029, 27283960, 27284499, 27285244, 27288230, 27292213, 27294480
27301308, 27301568, 27302594, 27302681, 27302695, 27302711, 27302730
27302777, 27302800, 27302960, 27304410, 27304936, 27305318, 27307868
27310092, 27313687, 27314206, 27314390, 27318869, 27321179, 27321834
27326204, 27329812, 27330158, 27330161, 27333658, 27333664, 27333693
27334316, 27334648, 27335682, 27338912, 27338946, 27339115, 27339396
27339483, 27339495, 27341036, 27345190, 27345231, 27345450, 27345498
27346329, 27346644, 27346709, 27346949, 27347126, 27348081, 27348707
27349393, 27352600, 27354783, 27356373, 27357773, 27358241, 27359178
27359368, 27360126, 27364891, 27364916, 27364947, 27365139, 27365702
27365993, 27367194, 27368850, 27372756, 27375260, 27375542, 27376871
27378103, 27379233, 27381383, 27381656, 27384222, 27389352, 27392187
27395404, 27395416, 27395794, 27396357, 27396365, 27396377, 27396624
27396666, 27396672, 27396813, 27398080, 27398660, 27401637, 27405242
27405696, 27410300, 27410595, 27412805, 27417186, 27420715, 27421101
27422874, 27423251, 27425507, 27425622, 27426363, 27427805, 27430802
27432338, 27432355, 27433870, 27434050, 27434193, 27434486, 27434974
27435537, 27439835, 27441326, 27442041, 27444727, 27445330, 27445462
27445727, 27447452, 27447687, 27448162, 27450355, 27450400, 27450783
27451049, 27451182, 27451187, 27451531, 27452760, 27453225, 27457666
27457891, 27458164, 27459909, 27460675, 27467543, 27469329, 27471876
27472969, 27473800, 27479358, 27483974, 27484556, 27486253, 27487795
27489719, 27496224, 27496308, 27497950, 27498477, 27501327, 27501413
27501465, 27502420, 27504190, 27505603, 27506774, 27508985, 27511196
27512439, 27517818, 27518227, 27518310, 27520070, 27520900, 27522245
27523368, 27523800, 27525909, 27532375, 27533819, 27534509, 27537472
27544030, 27545630, 27547732, 27550341, 27551855, 27558557, 27558559
27558861, 27560702, 27563629, 27563767, 27570318, 27577758, 27579353
27580996, 27585755, 27585800, 27586810, 27586895, 27587672, 27591842
27592466, 27593389, 27595973, 27599689, 27602091, 27602488, 27603841
27604293, 27607805, 27608669, 27610269, 27613080, 27613247, 27615608
27616657, 27617522, 27625274, 27625620, 27631506, 27634676, 27635508
27644757, 27649707, 27652302, 27663370, 27664702, 27679488, 27679664
27679806, 27679961, 27680162, 27680509, 27682151, 27688099, 27688692
27690578, 27691809, 27692215, 27693713, 27697092, 27701795, 27705761
27707544, 27709046, 27718914, 27719187, 27723002, 27726269, 27726780
27732323, 27739006, 27740844, 27744211, 27745220, 27747869, 27748954
27751006, 27753336, 27757567, 27772815, 27773602, 27774320, 27774539
27779886, 27780562, 27782339, 27783289, 27786772, 27791223, 27797290
27803665, 27807441, 27812560, 27812593, 27813267, 27815347, 27818871
27832643, 27833369, 27834984, 27840386, 27847259, 27851757, 27861909
27869339, 27873643, 27882176, 27892488, 27924147, 27926113, 27930478
27934468, 27941896, 27945870, 27950708, 27952762, 27961746, 27964051
27970265, 27971575, 27984028, 27989849, 27993289, 27994333, 27997875
27999597, 28021205, 28022847, 28033429, 28057267, 28059199, 28072130
28098865, 28106402, 28132287, 28169711, 28174827, 28174951, 28184554
28188330, 28238264, 28264172, 28320117, 28321446, 28338399, 28492362
28571483, 28580528, 28713840, 28728272, 28758090, 28785022, 28805612
28805695, 28919145

Patch 27908644 : applied on Wed Jul 18 23:14:11 IST 2018
Unique Patch ID: 22153180
Patch description: "UPDATE 18.3 DATABASE CLIENT JDK IN ORACLE HOME TO JDK8U171"
Created on 4 May 2018, 01:21:02 hrs PST8PDT
Bugs fixed:
27908644

Patch 27923415 : applied on Wed Jul 18 23:11:38 IST 2018
Unique Patch ID: 22239273
Patch description: "OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)"
Created on 15 Jul 2018, 10:33:22 hrs PST8PDT
Bugs fixed:
27304131, 27539876, 27952586, 27642235, 27636900, 27461740

Patch 28090553 : applied on Wed Jul 18 23:10:01 IST 2018
Unique Patch ID: 22256940
Patch description: "OCW RELEASE UPDATE 18.3.0.0.0 (28090553)"
Created on 11 Jul 2018, 19:20:31 hrs PST8PDT
Bugs fixed:
12816839, 18701017, 22734786, 23698980, 23840305, 25709124, 25724089
26299684, 26313403, 26433972, 26527054, 26586174, 26587652, 26647619
26827699, 26860285, 26882126, 26882316, 26943660, 26996813, 27012915
27018734, 27032726, 27034318, 27040560, 27080748, 27086406, 27092991
27098733, 27106915, 27114112, 27121566, 27133637, 27144533, 27153755
27166715, 27174938, 27174948, 27177551, 27177852, 27182006, 27182064
27184253, 27204476, 27212837, 27213140, 27220610, 27222423, 27222938
27238077, 27238258, 27249544, 27252023, 27257509, 27263677, 27265816
27267992, 27271876, 27274143, 27285557, 27299455, 27300007, 27302415
27309182, 27314512, 27315159, 27320985, 27334353, 27338838, 27346984
27358232, 27362190, 27370933, 27377219, 27378959, 27379846, 27379956
27393421, 27398223, 27399499, 27399762, 27399985, 27401618, 27403244
27404599, 27426277, 27428790, 27430219, 27430254, 27433163, 27452897
27458829, 27465480, 27475272, 27481406, 27481765, 27492916, 27496806
27503318, 27503413, 27508936, 27508984, 27513114, 27519708, 27526362
27528204, 27532009, 27534289, 27560562, 27560735, 27573154, 27573408
27574335, 27577122, 27579969, 27581484, 27593587, 27595801, 27600706
27609819, 27625010, 27625050, 27627992, 27654039, 27657467, 27657920
27668379, 27682288, 27691717, 27702244, 27703242, 27708711, 27714373
27725967, 27731346, 27734470, 27735534, 27739957, 27740854, 27747407
27748321, 27757979, 27766679, 27768034, 27778433, 27782464, 27783059
27786669, 27786699, 27801774, 27811439, 27839732, 27850736, 27862636
27864737, 27865439, 27889841, 27896388, 27897639, 27906509, 27931506
27935826, 27941514, 27957892, 27978668, 27984314, 27993298, 28023410
28025398, 28032758, 28039471, 28039953, 28045209, 28099592, 28109698
28174926, 28182503, 28204423, 28240153

-----------------------------------------------------------------------
OPatch succeeded.

Download and Unzip the Database Release Update Patch :

Release Date and Download link :

15-Jan-2019 Database Release Update Revision 18.4.1.0.0 Patch 28822587
[oracle@test u02]$ unzip p28822587_180000_Linux-x86-64.zip
Archive: p28822587_180000_Linux-x86-64.zip
creating: 28822587/
creating: 28822587/files/
creating: 28822587/files/javavm/
creating: 28822587/files/javavm/ojvmwcu/
creating: 28822587/files/javavm/ojvmwcu/lib/

Check Patch Conflict Detection and Resolution :

[oracle@test 28822587]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u02/app/oracle/product/18.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/18.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.4.0
Log file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-14_04-46-45AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Shutdown the database and listener :

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

[oracle@test ~]$ lsnrctl stop

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 09-FEB-2019 02:05:46
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.localdomain.com)(PORT=1521)))
The command completed successfully

Apply the database upgrade patch :

[oracle@test 28822587]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.


Oracle Home : /u02/app/oracle/product/18.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/18.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.4.0
Log file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-14_04-49-20AM_1.log

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

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 = '/u02/app/oracle/product/18.3.0/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '28822587' to OH '/u02/app/oracle/product/18.3.0/db_1'
ApplySession: Optional component(s) [ oracle.ons.daemon, 18.0.0.0.0 ] , [ oracle.assistants.asm, 18.0.0.0.0 ] , [ oracle.net.cman, 18.0.0.0.0 ] , [ oracle.network.cman, 18.0.0.0.0 ] , [ oracle.assistants.usm, 18.0.0.0.0 ] , [ oracle.crs, 18.0.0.0.0 ] , [ oracle.tfa, 18.0.0.0.0 ] , [ oracle.assistants.server.oui, 18.0.0.0.0 ] , [ oracle.has.crs, 18.0.0.0.0 ] not present in the Oracle Home or a higher version is found.

Patching component oracle.xdk.rsf, 18.0.0.0.0...

Patching component oracle.rdbms.rman, 18.0.0.0.0...

Patching component oracle.rdbms.util, 18.0.0.0.0...

Patching component oracle.rdbms.rsf, 18.0.0.0.0...

Patching component oracle.xdk.parser.java, 18.0.0.0.0...

Patching component oracle.oraolap.dbscripts, 18.0.0.0.0...

Patching component oracle.assistants.deconfig, 18.0.0.0.0...

Patching component oracle.rdbms.rsf.ic, 18.0.0.0.0...

Patching component oracle.network.client, 18.0.0.0.0...

Patching component oracle.nlsrtl.rsf, 18.0.0.0.0...

Patching component oracle.ons, 18.0.0.0.0...

Patching component oracle.ctx.rsf, 18.0.0.0.0...

Patching component oracle.rdbms.dbscripts, 18.0.0.0.0...

Patching component oracle.xdk, 18.0.0.0.0...

Patching component oracle.nlsrtl.rsf.core, 18.0.0.0.0...

Patching component oracle.sdo.locator, 18.0.0.0.0...

Patching component oracle.dbjava.ucp, 18.0.0.0.0...

Patching component oracle.rdbms.crs, 18.0.0.0.0...

Patching component oracle.server, 18.0.0.0.0...

Patching component oracle.dbjava.ic, 18.0.0.0.0...

Patching component oracle.rdbms, 18.0.0.0.0...

Patching component oracle.ctx.atg, 18.0.0.0.0...

Patching component oracle.dbjava.jdbc, 18.0.0.0.0...

Patching component oracle.sqlplus.ic, 18.0.0.0.0...

Patching component oracle.precomp.rsf, 18.0.0.0.0...

Patching component oracle.ctx, 18.0.0.0.0...

Patching component oracle.rdbms.oci, 18.0.0.0.0...

Patching component oracle.network.listener, 18.0.0.0.0...

Patching component oracle.sdo, 18.0.0.0.0...

Patching component oracle.sqlplus, 18.0.0.0.0...

Patching component oracle.assistants.server, 18.0.0.0.0...

Patching component oracle.rdbms.deconfig, 18.0.0.0.0...

Patching component oracle.assistants.acf, 18.0.0.0.0...

Patching component oracle.oracore.rsf, 18.0.0.0.0...

Patching component oracle.sdo.locator.jrf, 18.0.0.0.0...

Patching component oracle.install.deinstalltool, 18.0.0.0.0...

Patching component oracle.network.rsf, 18.0.0.0.0...

Patching component oracle.rdbms.install.plugins, 18.0.0.0.0...

Patching component oracle.javavm.client, 18.0.0.0.0...

Patching component oracle.ldap.owm, 18.0.0.0.0...

Patching component oracle.ldap.security.osdt, 18.0.0.0.0...

Patching component oracle.rdbms.install.common, 18.0.0.0.0...

Patching component oracle.precomp.lang, 18.0.0.0.0...

Patching component oracle.precomp.common, 18.0.0.0.0...
Patch 28822587 successfully applied.
Sub-set patch [28790643] has become inactive due to the application of a super-set patch [28822587].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-14_04-49-20AM_1.log

OPatch succeeded.

Start the listener and database :

[oracle@test 28822587]$ lsnrctl start

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 14-FEB-2019 04:54:29

Copyright (c) 1991, 2018, Oracle. All rights reserved.

Starting /u02/app/oracle/product/18.3.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /u02/app/oracle/product/18.3.0/db_1/network/admin/listener.ora
Log messages written to /u02/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.localdomain.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.localdomain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 14-FEB-2019 04:54:31
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u02/app/oracle/product/18.3.0/db_1/network/admin/listener.ora
Listener Log File /u02/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.localdomain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully


[oracle@test 28822587]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Thu Feb 14 04:54:53 2019
Version 18.4.1.0.0

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

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 2516580184 bytes
Fixed Size 8660824 bytes
Variable Size 671088640 bytes
Database Buffers 1828716544 bytes
Redo Buffers 8114176 bytes
Database mounted.
Database opened.

Loading Modified SQL Files into the Database : 

[oracle@test 28822587]$ datapatch -verbose
SQL Patching tool version 18.0.0.0.0 Production on Thu Feb 14 04:57:16 2019
Copyright (c) 2012, 2018, Oracle. All rights reserved.

Log file for this invocation: /u02/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_3312_2019_02_14_04_57_16/sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of interim SQL patches:
Interim patch 27923415 (OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)):
Binary registry: Installed
SQL registry: Applied successfully on 13-FEB-19 01.00.13.654106 AM

Current state of release update SQL patches:
Binary registry:
18.4.1.0.0 Release_Update_Revision 1811261143: Installed
SQL registry:
Applied 18.3.2.0.0 Release_Update_Revision 1811212344 successfully on 13-FEB-19 12.56.24.480442 AM

Adding patches to installation queue and performing prereq checks...done
Installation queue:
No interim patches need to be rolled back
Patch 28790643 (Database Release Update Revision : 18.3.2.0.190115 (28790643)):
Rollback from 18.3.2.0.0 Release_Update_Revision 1811212344 to 18.3.0.0.0 Release_Update 1806280943
Patch 28822587 (Database Release Update Revision : 18.4.1.0.190115 (28822587)):
Apply from 18.3.0.0.0 Release_Update 1806280943 to 18.4.1.0.0 Release_Update_Revision 1811261143
No interim patches need to be applied

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

Validating logfiles...done
Patch 28790643 rollback: SUCCESS
logfile: /u02/app/oracle/cfgtoollogs/sqlpatch/28790643/22605424/28790643_rollback_TEST18C_2019Feb14_04_57_44.log (no errors)
Patch 28822587 apply: SUCCESS
logfile: /u02/app/oracle/cfgtoollogs/sqlpatch/28822587/22600665/28822587_apply_TEST18C_2019Feb14_04_58_32.log (no errors)
SQL Patching tool complete on Thu Feb 14 04:59:23 2019

Patch 28822587 – Database Release Update Revision 18.4.1.0.0 is applied successfully and Database is upgraded from 18.3.2.0.0 to 18.4.1.0.0.

Run utlrp.sql to compile invalid objects :-

SQL> @?/rdbms/admin/utlrp

Session altered.

TIMESTAMP
-----------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2019-02-09 02:12:45

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 2019-02-09 02:12:47

DOC> The following query reports the number of invalid objects.
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 exceptions 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> Note: Typical compilation errors (due to coding errors) are not
DOC> logged into this table: they go into DBA_ERRORS instead.
DOC>#

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

Function created.

PL/SQL procedure successfully completed.

Function dropped.

PL/SQL procedure successfully completed.
SQL> select count(*) from dba_objects where status='INVALID';

COUNT(*)
----------
0

dba_registry_sqlpatch :

From Oracle 12c,we are using dba_registry_sqlpatch instead of REGISTRY$HISTORY  to check latest applied patches like RU,PSU and CPU.

SQL> select STATUS,DESCRIPTION,SOURCE_VERSION,TARGET_VERSION from dba_registry_sqlpatch;

STATUS DESCRIPTION                                      SOURCE_VERSION 
------ ----------------------------------------------   --------------
TARGET_VERSION
--------------
SUCCESS Database Release Update : 18.3.0.0.180717(28090523) 18.1.0.0.0  
18.3.0.0.0

SUCCESS OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)     18.3.0.0.0
18.3.0.0.0

SUCCESS Database Release Update Revision : 18.3.2.0.190115  18.3.0.0.0 
        (28790643) 
18.3.2.0.0

SUCCESS Database Release Update Revision 18.4.1.0.190115    18.3.0.0.0                            
        (28822587)
18.4.1.0.0

 

To check database version :

SQL> select BANNER,BANNER_FULL from v$version;

BANNER                     BANNER FULL  
-------------------------- --------------------------              
Oracle Database 18c        Oracle Database 18c        
Enterprise Edition Release Enterprise Edition Release
18.0.0.0.0 - Production    18.0.0.0.0 - Production 
                           Version 18.4.1.0.0
Catch Me On:- Hariprasath Rajaram 

Telegram:https://t.me/joinchat/I_f4DkeGfZuxgMIoJSpQZg LinkedIn:https://www.linkedin.com/in/hariprasathdba Facebook:https://www.facebook.com/HariPrasathdba                      FB Group:https://www.facebook.com/groups/894402327369506/             FB Page: https://www.facebook.com/dbahariprasath/?               Twitter: https://twitter.com/hariprasathdba

 

 

 

Patching Oracle Database Release Updates Revision (RUR) 18.3.0.0.0 to 18.3.2.0.0

Description:-

We are going to perform Patching Oracle Database Release Update Revision 18.3.0.0.0 to 18.3.2.0.0

About Oracle Database Release Numbers:-
Oracle Database releases are released in version and version_full releases. The version is designated in the form major release numeral.0.0.0.0. The release version is the annual release designation of the database software. For example: 2018 is the release year, and the release version is 18.0.0.0.0. The version_full release is updated using numeric segments that change, based on the annual release designation of the software, the quarterly release update version (RU), and the quarterly release updates revision (RUR).
Oracle Database version_full releases are categorized by three numeric segments, which are divided by periods. The first, second, and third numerals provide information about the Oracle Database releases, starting with Oracle Database release 18c:

First numeral: Oracle Database major release number. For example: Oracle Database 18c; Oracle Database 12c. Starting with Oracle Database 18c, the first numeral indicates the initial year in which an Oracle Database version is released. For example: 2018 is the initial release year for Oracle Database 18c (18.0.0.0.0)
Second numeral: Oracle Database Release Update (Update) in Oracle Database 18c and later releases. For example: 18.3 is Release Update 3. In releases before Oracle Database 18c, the second numeral designates a maintenance release number. For example: Oracle Database 12c release 1 (12.1); Oracle 12c release 2 (12.2).
Third numeral: Oracle Database release updates revision (Revision). For example: 18.1.1.; 18.2.1, 18.3.0
Fourth numeral: Oracle Database increment version. This nomenclature can apply to updates in future releases, and it applies to all releases earlier than 18c. For example: 12.1.0.1, 12.2.0.1,
Fifth numeral: This numeral is reserved for future use.

Caution:

Oracle strongly recommends that you apply the most recent release update (Update) or bundle patch or patch set update to your source and target databases before starting an upgrade, and before starting a downgrade.

 

Check Database version :

[oracle@test admin]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Sat Feb 9 01:15:22 2019
Version 18.3.0.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.

Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

Check Opatch version and lsinventory :

Check the opatch version and inventory for ORACLE_HOME.

[oracle@test ~]$ export ORACLE_HOME=/u02/app/oracle/product/18.3.0/db_1
[oracle@test ~]$ export PATH=/u02/app/oracle/product/18.3.0/db_1/OPatch:$PATH
[oracle@test ~]$ opatch version
OPatch Version: 12.2.0.1.14

OPatch succeeded.

Minimum version of OPatch utility version 12.2.0.1.14 or later to apply this patch.

[oracle@test ~]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.

Oracle Home : /u02/app/oracle/product/18.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/18.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.4.0
Log file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-09_01-43-56AM_1.log
Lsinventory Output file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2019-02-09_01-43-56AM.txt

-----------------------------------------------------------------------
Local Machine Information::
Hostname: test.localdomain.com
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):
Oracle Database 18c 18.0.0.0.0
There are 1 products installed in this Oracle Home.
Interim patches (4) :
Patch 27908644 : applied on Wed Jul 18 23:14:11 IST 2018
Unique Patch ID: 22153180
Patch description: "UPDATE 18.3 DATABASE CLIENT JDK IN ORACLE HOME TO JDK8U171"
Created on 4 May 2018, 01:21:02 hrs PST8PDT
Bugs fixed:
27908644
Patch 27923415 : applied on Wed Jul 18 23:11:38 IST 2018
Unique Patch ID: 22239273
Patch description: "OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)"
Created on 15 Jul 2018, 10:33:22 hrs PST8PDT
Bugs fixed:
27304131, 27539876, 27952586, 27642235, 27636900, 27461740
Patch 28090553 : applied on Wed Jul 18 23:10:01 IST 2018
Unique Patch ID: 22256940
Patch description: "OCW RELEASE UPDATE 18.3.0.0.0 (28090553)"
Created on 11 Jul 2018, 19:20:31 hrs PST8PDT
Bugs fixed:
12816839, 18701017, 22734786, 23698980, 23840305, 25709124, 25724089
26299684, 26313403, 26433972, 26527054, 26586174, 26587652, 26647619
26827699, 26860285, 26882126, 26882316, 26943660, 26996813, 27012915
27018734, 27032726, 27034318, 27040560, 27080748, 27086406, 27092991
27098733, 27106915, 27114112, 27121566, 27133637, 27144533, 27153755
27166715, 27174938, 27174948, 27177551, 27177852, 27182006, 27182064
27184253, 27204476, 27212837, 27213140, 27220610, 27222423, 27222938
27238077, 27238258, 27249544, 27252023, 27257509, 27263677, 27265816
27267992, 27271876, 27274143, 27285557, 27299455, 27300007, 27302415
27309182, 27314512, 27315159, 27320985, 27334353, 27338838, 27346984
27358232, 27362190, 27370933, 27377219, 27378959, 27379846, 27379956
27393421, 27398223, 27399499, 27399762, 27399985, 27401618, 27403244
27404599, 27426277, 27428790, 27430219, 27430254, 27433163, 27452897
27458829, 27465480, 27475272, 27481406, 27481765, 27492916, 27496806
27503318, 27503413, 27508936, 27508984, 27513114, 27519708, 27526362
27528204, 27532009, 27534289, 27560562, 27560735, 27573154, 27573408
27574335, 27577122, 27579969, 27581484, 27593587, 27595801, 27600706
27609819, 27625010, 27625050, 27627992, 27654039, 27657467, 27657920
27668379, 27682288, 27691717, 27702244, 27703242, 27708711, 27714373
27725967, 27731346, 27734470, 27735534, 27739957, 27740854, 27747407
27748321, 27757979, 27766679, 27768034, 27778433, 27782464, 27783059
27786669, 27786699, 27801774, 27811439, 27839732, 27850736, 27862636
27864737, 27865439, 27889841, 27896388, 27897639, 27906509, 27931506
27935826, 27941514, 27957892, 27978668, 27984314, 27993298, 28023410
28025398, 28032758, 28039471, 28039953, 28045209, 28099592, 28109698
28174926, 28182503, 28204423, 28240153
Patch 28090523 : applied on Wed Jul 18 23:09:24 IST 2018
Unique Patch ID: 22329768
Patch description: "Database Release Update : 18.3.0.0.180717 (28090523)"
Created on 14 Jul 2018, 00:03:50 hrs PST8PDT
Bugs fixed:
9062315, 13554903, 21547051, 21766220, 21806121, 23003564, 23310101
24489904, 24689376, 24737581, 24925863, 25035594, 25035599, 25287072
25348956, 25634405, 25726981, 25743479, 25824236, 25943740, 26226953
26336101, 26423085, 26427905, 26450454, 26476244, 26598422, 26615291
26646549, 26654411, 26731697, 26785169, 26792891, 26818960, 26822620
26843558, 26843664, 26846077, 26894737, 26898279, 26928317, 26933599
26956033, 26961415, 26966120, 26986173, 26992964, 27005278, 27026401
27028251, 27030974, 27036408, 27038986, 27041253, 27044575, 27047831
27053044, 27058530, 27060167, 27060859, 27061736, 27066451, 27066519
27073066, 27086821, 27090765, 27101527, 27101652, 27110878, 27112686
27119621, 27126666, 27128580, 27135647, 27143756, 27143882, 27147979
27153641, 27155549, 27156355, 27163928, 27169796, 27181521, 27181537
27189611, 27190851, 27193810, 27199245, 27208953, 27210038, 27210872
27214085, 27215007, 27216224, 27221900, 27222121, 27222626, 27224987
27226913, 27232983, 27233563, 27236052, 27236110, 27240246, 27240570
27241221, 27241247, 27244337, 27244785, 27249215, 27250547, 27254851
27258578, 27259386, 27259983, 27262650, 27262945, 27263276, 27263996
27270197, 27274456, 27274536, 27275136, 27275776, 27282707, 27283029
27283960, 27284499, 27285244, 27288230, 27292213, 27294480, 27301308
27301568, 27302594, 27302681, 27302695, 27302711, 27302730, 27302777
27302800, 27302960, 27304410, 27304936, 27305318, 27307868, 27310092
27313687, 27314206, 27314390, 27318869, 27321179, 27321834, 27326204
27329812, 27330158, 27330161, 27333658, 27333664, 27333693, 27334316
27334648, 27335682, 27338912, 27338946, 27339115, 27339396, 27339483
27339495, 27341036, 27345190, 27345231, 27345450, 27345498, 27346329
27346644, 27346709, 27346949, 27347126, 27348081, 27348707, 27349393
27352600, 27354783, 27356373, 27357773, 27358241, 27359178, 27359368
27360126, 27364891, 27364916, 27364947, 27365139, 27365702, 27365993
27367194, 27368850, 27372756, 27375260, 27375542, 27376871, 27378103
27379233, 27381383, 27381656, 27384222, 27389352, 27392187, 27395404
27395416, 27395794, 27396357, 27396365, 27396377, 27396624, 27396666
27396672, 27396813, 27398080, 27398660, 27401637, 27405242, 27405696
27410300, 27410595, 27412805, 27417186, 27420715, 27421101, 27422874
27423251, 27425507, 27425622, 27426363, 27427805, 27430802, 27432338
27432355, 27433870, 27434050, 27434193, 27434486, 27434974, 27435537
27439835, 27441326, 27442041, 27444727, 27445330, 27445462, 27447452
27447687, 27448162, 27450355, 27450400, 27450783, 27451049, 27451182
27451187, 27451531, 27452760, 27453225, 27457666, 27457891, 27458164
27459909, 27460675, 27467543, 27469329, 27471876, 27472969, 27473800
27479358, 27483974, 27484556, 27486253, 27487795, 27489719, 27496224
27496308, 27497950, 27498477, 27501327, 27501413, 27501465, 27502420
27504190, 27505603, 27506774, 27508985, 27511196, 27512439, 27517818
27518227, 27518310, 27520070, 27520900, 27522245, 27523368, 27523800
27525909, 27532375, 27533819, 27534509, 27537472, 27544030, 27545630
27547732, 27550341, 27551855, 27558557, 27558559, 27558861, 27560702
27563629, 27563767, 27570318, 27577758, 27579353, 27580996, 27585755
27585800, 27586810, 27586895, 27587672, 27591842, 27592466, 27593389
27595973, 27599689, 27602091, 27602488, 27603841, 27604293, 27607805
27608669, 27610269, 27613080, 27613247, 27615608, 27616657, 27617522
27625274, 27625620, 27631506, 27634676, 27635508, 27644757, 27649707
27652302, 27663370, 27664702, 27679488, 27679664, 27679806, 27679961
27680162, 27680509, 27682151, 27688099, 27688692, 27690578, 27691809
27692215, 27693713, 27697092, 27701795, 27705761, 27707544, 27709046
27718914, 27719187, 27723002, 27726269, 27726780, 27732323, 27739006
27740844, 27744211, 27745220, 27747869, 27748954, 27751006, 27753336
27757567, 27772815, 27773602, 27774320, 27774539, 27779886, 27780562
27782339, 27783289, 27786772, 27791223, 27797290, 27803665, 27807441
27812560, 27812593, 27813267, 27815347, 27818871, 27832643, 27833369
27834984, 27840386, 27847259, 27851757, 27861909, 27869339, 27873643
27882176, 27892488, 27924147, 27926113, 27930478, 27934468, 27941896
27945870, 27950708, 27952762, 27961746, 27964051, 27970265, 27971575
27984028, 27989849, 27993289, 27994333, 27997875, 27999597, 28021205
28022847, 28033429, 28057267, 28059199, 28072130, 28098865, 28106402
28132287, 28169711, 28174827, 28184554, 28188330, 25929650, 28264172

-----------------------------------------------------------------------
OPatch succeeded.

Download and Unzip the Database Release Update Patch :

Release Date and Download link :

15-Jan-2019 Database Release Update Revision 18.3.2.0.0 Patch 28790643
[oracle@test u02]$ unzip p28790643_180000_Linux-x86-64.zip
Archive: p28790643_180000_Linux-x86-64.zip
creating: 28790643/
creating: 28790643/files/
[oracle@test u02]$ ls -lrt
total 553308
drwxr-xr-x 4 oracle oinstall 4096 Dec 1 18:43 28790643

Check Patch Conflict Detection and Resolution :

[oracle@test 28790643]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u02/app/oracle/product/18.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/18.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.4.0
Log file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-09_01-53-22AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

Shutdown the database and listener :

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.

[oracle@test ~]$ lsnrctl stop

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 09-FEB-2019 02:05:46
Copyright (c) 1991, 2018, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.localdomain.com)(PORT=1521)))
The command completed successfully

Apply the database upgrade patch :

[oracle@test 28790643]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2019, Oracle Corporation. All rights reserved.

Oracle Home : /u02/app/oracle/product/18.3.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u02/app/oracle/product/18.3.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.4.0
Log file location : /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-09_01-59-16AM_1.log

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

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 = '/u02/app/oracle/product/18.3.0/db_1')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '28790643' to OH '/u02/app/oracle/product/18.3.0/db_1'
ApplySession: Optional component(s) [ oracle.network.cman, 18.0.0.0.0 ] , [ oracle.net.cman, 18.0.0.0.0 ] , [ oracle.assistants.asm, 18.0.0.0.0 ] , [ oracle.ons.daemon, 18.0.0.0.0 ] , [ oracle.crs, 18.0.0.0.0 ] , [ oracle.assistants.usm, 18.0.0.0.0 ] , [ oracle.tfa, 18.0.0.0.0 ] , [ oracle.assistants.server.oui, 18.0.0.0.0 ] , [ oracle.has.crs, 18.0.0.0.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.ctx.rsf, 18.0.0.0.0...
Patching component oracle.ons, 18.0.0.0.0...
Patching component oracle.nlsrtl.rsf, 18.0.0.0.0...
Patching component oracle.dbjava.ucp, 18.0.0.0.0...
Patching component oracle.sdo.locator, 18.0.0.0.0...
Patching component oracle.nlsrtl.rsf.core, 18.0.0.0.0...
Patching component oracle.xdk, 18.0.0.0.0...
Patching component oracle.rdbms.dbscripts, 18.0.0.0.0...
Patching component oracle.rdbms.rsf, 18.0.0.0.0...
Patching component oracle.rdbms.util, 18.0.0.0.0...
Patching component oracle.rdbms.rman, 18.0.0.0.0...
Patching component oracle.xdk.rsf, 18.0.0.0.0...
Patching component oracle.network.client, 18.0.0.0.0...
Patching component oracle.rdbms.rsf.ic, 18.0.0.0.0...
Patching component oracle.assistants.deconfig, 18.0.0.0.0...
Patching component oracle.oraolap.dbscripts, 18.0.0.0.0...
Patching component oracle.xdk.parser.java, 18.0.0.0.0...
Patching component oracle.rdbms.deconfig, 18.0.0.0.0...
Patching component oracle.assistants.server, 18.0.0.0.0...
Patching component oracle.rdbms.install.plugins, 18.0.0.0.0...
Patching component oracle.network.rsf, 18.0.0.0.0...
Patching component oracle.install.deinstalltool, 18.0.0.0.0...
Patching component oracle.sdo.locator.jrf, 18.0.0.0.0...
Patching component oracle.oracore.rsf, 18.0.0.0.0...
Patching component oracle.assistants.acf, 18.0.0.0.0...
Patching component oracle.ctx.atg, 18.0.0.0.0...
Patching component oracle.dbjava.jdbc, 18.0.0.0.0...
Patching component oracle.rdbms, 18.0.0.0.0...
Patching component oracle.dbjava.ic, 18.0.0.0.0...
Patching component oracle.server, 18.0.0.0.0...
Patching component oracle.rdbms.crs, 18.0.0.0.0...
Patching component oracle.sqlplus, 18.0.0.0.0...
Patching component oracle.sdo, 18.0.0.0.0...
Patching component oracle.network.listener, 18.0.0.0.0...
Patching component oracle.rdbms.oci, 18.0.0.0.0...
Patching component oracle.ctx, 18.0.0.0.0...
Patching component oracle.precomp.rsf, 18.0.0.0.0...
Patching component oracle.sqlplus.ic, 18.0.0.0.0...
Patching component oracle.javavm.client, 18.0.0.0.0...
Patching component oracle.ldap.owm, 18.0.0.0.0...
Patching component oracle.ldap.security.osdt, 18.0.0.0.0...
Patching component oracle.precomp.lang, 18.0.0.0.0...
Patching component oracle.precomp.common, 18.0.0.0.0...
Patch 28790643 successfully applied.
Sub-set patch [28090523] has become inactive due to the application of a super-set patch [28790643].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u02/app/oracle/product/18.3.0/db_1/cfgtoollogs/opatch/opatch2019-02-09_01-59-16AM_1.log

OPatch succeeded.

Start the listener and database :

[oracle@test ~]$ lsnrctl start

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 09-FEB-2019 02:04:49

Copyright (c) 1991, 2018, Oracle. All rights reserved.

Starting /u02/app/oracle/product/18.3.0/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 18.0.0.0.0 - Production
System parameter file is /u02/app/oracle/product/18.3.0/db_1/network/admin/listener.ora
Log messages written to /u02/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.localdomain.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.localdomain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 09-FEB-2019 02:04:51
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u02/app/oracle/product/18.3.0/db_1/network/admin/listener.ora
Listener Log File /u02/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.localdomain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

[oracle@test ~]$ lsnrctl status

LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 09-FEB-2019 02:05:05

Copyright (c) 1991, 2018, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=test.localdomain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 09-FEB-2019 02:04:51
Uptime 0 days 0 hr. 0 min. 13 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u02/app/oracle/product/18.3.0/db_1/network/admin/listener.ora
Listener Log File /u02/app/oracle/diag/tnslsnr/test/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=test.localdomain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=test.localdomain.com)(PORT=5500))(Presentation=HTTP)(Session=RAW))
Services Summary...
Service "dbwr.localdomain.com" has 1 instance(s).
Instance "dbwr", status READY, has 1 handler(s) for this service...
Service "dbwrXDB.localdomain.com" has 1 instance(s).
Instance "dbwr", status READY, has 1 handler(s) for this service...
The command completed successfully.
[oracle@test ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Sat Feb 9 02:04:20 2019
Version 18.3.2.0.0
Copyright (c) 1982, 2018, Oracle. All rights reserved.
Connected to an idle instance.

SQL> startup
ORACLE instance started.
Total System Global Area 1660943808 bytes
Fixed Size 8658368 bytes
Variable Size 1040187392 bytes
Database Buffers 603979776 bytes
Redo Buffers 8118272 bytes
Database mounted.
Database opened.

Loading Modified SQL Files into the Database : 

[oracle@test OPatch]$ ./datapatch -verbose

SQL Patching tool version 18.0.0.0.0 Production on Sat Feb 9 02:09:25 2019
Copyright (c) 2012, 2018, Oracle. All rights reserved.

Log file for this invocation: /u02/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_7208_2019_02_09_02_09_25/sqlpatch_invocation.log

Connecting to database...OK
Gathering database info...done
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of interim SQL patches:
Interim patch 27923415 (OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)):
Binary registry: Installed
SQL registry: Applied successfully on 09-JAN-19 02.47.25.515405 AM

Current state of release update SQL patches:
Binary registry:
18.3.2.0.0 Release_Update_Revision 1811212344: Installed
SQL registry:
Applied 18.3.0.0.0 Release_Update 1806280943 successfully on 09-JAN-19 02.46.23.143918 AM

Adding patches to installation queue and performing prereq checks...done
Installation queue:
No interim patches need to be rolled back
Patch 28790643 (Database Release Update Revision : 18.3.2.0.190115 (28790643)):
Apply from 18.3.0.0.0 Release_Update 1806280943 to 18.3.2.0.0 Release_Update_Revision 1811212344
No interim patches need to be applied

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

Validating logfiles...done
Patch 28790643 apply: SUCCESS
logfile: /u02/app/oracle/cfgtoollogs/sqlpatch/28790643/22605424/28790643_apply_DBWR_2019Feb09_02_10_00.log (no errors)
SQL Patching tool complete on Sat Feb 9 02:11:05 2019

Patch 28790643 – Database Release Update Revision 18.3.2.0.190115 is applied successfully and Database is upgraded from 18.3.0.0.0 to 18.3.2.0.0.

Reference : Patch README file

Run utlrp.sql to compile invalid objects :-

SQL> @?/rdbms/admin/utlrp

Session altered.

TIMESTAMP
-----------------------------------------------------------------------
COMP_TIMESTAMP UTLRP_BGN 2019-02-09 02:12:45

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 2019-02-09 02:12:47

DOC> The following query reports the number of invalid objects.
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 exceptions 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> Note: Typical compilation errors (due to coding errors) are not
DOC> logged into this table: they go into DBA_ERRORS instead.
DOC>#

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

Function created.

PL/SQL procedure successfully completed.

Function dropped.

PL/SQL procedure successfully completed.
SQL> select count(*) from dba_objects where status='INVALID';

COUNT(*)
----------
0

dba_registry_sqlpatch :

From Oracle 12c,we are using dba_registry_sqlpatch instead of REGISTRY$HISTORY  to check latest applied patches like RU,PSU and CPU.

SQL> select STATUS,DESCRIPTION,SOURCE_VERSION,TARGET_VERSION from dba_registry_sqlpatch;

STATUS DESCRIPTION                                      SOURCE_VERSION 
------ ----------------------------------------------   --------------
TARGET_VERSION
--------------
SUCCESS Database Release Update : 18.3.0.0.180717(28090523) 18.1.0.0.0  
18.3.0.0.0

SUCCESS OJVM RELEASE UPDATE: 18.3.0.0.180717 (27923415)     18.3.0.0.0
18.3.0.0.0

SUCCESS Database Release Update Revision : 18.3.2.0.190115  18.3.0.0.0 
        (28790643) 
18.3.2.0.0

To check database version :

SQL> select BANNER,BANNER_FULL from v$version

BANNER                     BANNER FULL  
-------------------------- --------------------------              
Oracle Database 18c        Oracle Database 18c        
Enterprise Edition Release Enterprise Edition Release
18.0.0.0.0 - Production    18.0.0.0.0 - Production 
                           Version 18.3.2.0.0

 

Catch Me On:- Hariprasath Rajaram

Telegram:https://t.me/joinchat/I_f4DkeGfZuxgMIoJSpQZg LinkedIn:https://www.linkedin.com/in/hariprasathdba Facebook:https://www.facebook.com/HariPrasathdba                        FB Group:https://www.facebook.com/groups/894402327369506/              FB Page:https://www.facebook.com/dbahariprasath/?                      Twitter:https://twitter.com/hariprasathdba

Step-by-Step Applying PSU Patch in Oracle 12c For Single-Instance

Description:-

In this article we are going to see Oracle12c-Step-by-Step Applying PSU Patch in Oracle 12c For Single-Instance

High Level steps for applying the Patch 

  • Check current version of Opatch Tool
  • Upgrade the Opatch utility
  • Take the backup of ORACLE_HOME
  • Shutdown the Database and Listener
  • Apply PSU patch on ORACLE_HOME
  • Execute Post installation Scripts (datapatch)
  • Startup the Database and Listener
  • Check the dba_registry_sqlpatch .

Let’s Start the Demo:-

Step 1:- Current version of Opatch Tool in our environment 

[oracle@orcl:~ orcldemo] export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@orcl:~ orcldemo] $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.2.0.1.6

OPatch succeeded.

From the above output,the opatch version is 12.2.0.1.6.You must use the OPatch utility version 12.2.0.1.12 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 12.2, which is available for download from My Oracle Support patch 6880880 by selecting the 12.2.0.1.0 release.

Upgrade Opatch utility :-

Step 2:- Backup the existing Opatch folder

[oracle@orcl:~ orcldemo] cd $ORACLE_HOME
[oracle@orcl:db_1 orcldemo] mv OPatch/ OPatch_bkp

[oracle@orcl:~ orcldemo] ls -lrt
-rwxrw-rw- 1 oracle oinstall 271289497 Sep 21 18:52 p28163133_122010_Linux-x86-64.zip
-rwxrw-rw- 1 oracle oinstall 99183505 Sep 22 00:51 p6880880_122010_Linux-x86-64.zip

Step 3:- Unzip 6880880 patch

[oracle@orcl:~ orcldemo] unzip p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME
Archive: p6880880_122010_Linux-x86-64.zip
creating: /oradb/app/oracle/product/12.2.0.1/db_1/OPatch/

Step 4:- Check the opatch lsinventory

[oracle@orcl:~ orcldemo] $ORACLE_HOME/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /oradb/app/oracle/product/12.2.0.1/db_1
Central Inventory : /oradb/app/oraInventory
from : /oradb/app/oracle/product/12.2.0.1/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.1.4
Log file location : /oradb/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-09-22_00-58-49AM_1.log

Lsinventory Output file location : /oradb/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-09-22_00-58-49AM.txt
-----------------------------------------------------------------------
Local Machine Information::
Hostname: orcl.localdomain.com
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

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

There are no Interim patches installed in this Oracle Home.
----------------------------------------------------------------------
OPatch succeeded.

Step 5:- Take Backup of ORACLE_HOME (Rollback plan)

[oracle@orcl:~ orcldemo]$ tar -cvf oracle_home_Sep22_2018.tar $ORACLE_HOME

Step 6:- Shutdown Standby Database and Listener

[oracle@orcl:~ orcldemo]  export ORACLE_SID=orcldemo

[oracle@orcl:~ orcldemo] sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Sat Sep 22 01:17:15 2018
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
[oracle@orcl:~ orcldemo] lsnrctl status

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 22-SEP-2018 01:20:00

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.localdomain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 22-SEP-2018 01:19:45
Uptime 0 days 0 hr. 0 min. 14 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oradb/app/oracle/product/12.2.0.1/db_1/network/admin/listener.ora
Listener Log File /oradb/app/oracle/diag/tnslsnr/orcl/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.localdomain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DG4SQL" has 1 instance(s).
Instance "DG4SQL", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully

Step 7 :- Apply PSU patch on ORACLE_HOME.

[oracle@orcl:~ orcldemo] unzip p28163133_122010_Linux-x86-64.zip

[oracle@orcl:28163133 orcldemo] ls -lrt
total 88
drwxr-x--- 13 oracle oinstall  4096 Jul  6 20:35 files
drwxr-x---  3 oracle oinstall  4096 Jul  6 20:35 etc
-rw-r--r--  1 oracle oinstall    21 Jul  6 20:35 README.txt
-rw-rw-r--  1 oracle oinstall 74345 Jul 16 07:46 README.html
[oracle@orcl:28163133 orcldemo] export PATH=/oradb/app/oracle/product/12.2.0.1/db_1/OPatch:$PATH

[oracle@orcl:28163133 orcldemo] opatch apply
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /oradb/app/oracle/product/12.2.0.1/db_1
Central Inventory : /oradb/app/oraInventory
from : /oradb/app/oracle/product/12.2.0.1/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.1.4
Log file location : /oradb/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-09-22_01-26-15AM_1.log

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

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 = '/oradb/app/oracle/product/12.2.0.1/db_1')

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '28163133' to OH '/oradb/app/oracle/product/12.2.0.1/db_1'
ApplySession: Optional component(s) [ oracle.oid.client, 12.2.0.1.0 ] , [ oracle.has.crs, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.precomp.common, 12.2.0.1.0...
Patching component oracle.has.deconfig, 12.2.0.1.0...
Patching component oracle.tfa, 12.2.0.1.0...
Patching component oracle.assistants.server, 12.2.0.1.0...
Patching component oracle.rdbms.rman, 12.2.0.1.0...
Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
Patching component oracle.rdbms, 12.2.0.1.0...
Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
Patching component oracle.rdbms.util, 12.2.0.1.0...
Patching component oracle.ldap.rsf, 12.2.0.1.0...
Patching component oracle.ctx, 12.2.0.1.0...
Patching component oracle.rdbms.rsf, 12.2.0.1.0...
Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.dv, 12.2.0.1.0...
Patching component oracle.rdbms.lbac, 12.2.0.1.0...
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
Patching component oracle.oracore.rsf, 12.2.0.1.0...
Patching component oracle.xdk.rsf, 12.2.0.1.0...
Patching component oracle.rdbms.oci, 12.2.0.1.0...
Patching component oracle.ctx.rsf, 12.2.0.1.0...
Patching component oracle.ldap.client, 12.2.0.1.0...
Patching component oracle.ons, 12.2.0.1.0...
Patching component oracle.xdk, 12.2.0.1.0...
Patching component oracle.xdk.parser.java, 12.2.0.1.0...
Patching component oracle.rdbms.crs, 12.2.0.1.0...
Patching component oracle.precomp.lang, 12.2.0.1.0...
Patching component oracle.network.rsf, 12.2.0.1.0...
Patching component oracle.ldap.rsf.ic, 12.2.0.1.0...
Patching component oracle.sdo, 12.2.0.1.0...
Patch 28163133 successfully applied.
Log file location: /oradb/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-09-22_01-26-15AM_1.log

OPatch succeeded.

Step 8:- Startup the Database and Listener

[oracle@orcl:28163133 orcldemo] sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Sat Sep 22 01:33:17 2018

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

Connected to an idle instance.

SQL> startup;
ORACLE instance started.

Total System Global Area 1610612736 bytes
Fixed Size 8621232 bytes
Variable Size 1006633808 bytes
Database Buffers 587202560 bytes
Redo Buffers 8155136 bytes
Database mounted.
Database opened.
[oracle@orcl:28163133 orcldemo] lsnrctl start

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 22-SEP-2018 01:34:20

Copyright (c) 1991, 2016, Oracle. All rights reserved.

Starting /oradb/app/oracle/product/12.2.0.1/db_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /oradb/app/oracle/product/12.2.0.1/db_1/network/admin/listener.ora
Log messages written to /oradb/app/oracle/diag/tnslsnr/orcl/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.localdomain.com)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))


Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=orcl.localdomain.com)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 22-SEP-2018 01:34:21
Uptime 0 days 0 hr. 13 min. 0 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /oradb/app/oracle/product/12.2.0.1/db_1/network/admin/listener.ora
Listener Log File /oradb/app/oracle/diag/tnslsnr/orcl/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=orcl.localdomain.com)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
Services Summary...
Service "DG4SQL" has 1 instance(s).
Instance "DG4SQL", status UNKNOWN, has 1 handler(s) for this service...
Service "orcldemo.localdomain.com" has 1 instance(s).
Instance "orcldemo", status READY, has 1 handler(s) for this service...
Service "orcldemoXDB.localdomain.com" has 1 instance(s).
Instance "orcldemo", status READY, has 1 handler(s) for this service...
The command completed successfully

Step 9:- Execute post patch steps and run datapatch command

[oracle@orcl:OPatch orcldemo] ./datapatch -verbose
SQL Patching tool version 12.2.0.1.0 Production on Sat Sep 22 01:38:48 2018
Copyright (c) 2012, 2018, Oracle. All rights reserved.

Log file for this invocation: /oradb/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_21552_2018_09_22_01_38_48/sqlpatch_invocation.log

Connecting to database...OK
Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of SQL patches:
Bundle series DBRU:
ID 180717 in the binary registry and not installed in the SQL registry

Adding patches to installation queue and performing prereq checks...
Installation queue:
Nothing to roll back
The following patches will be applied:
28163133 (DATABASE JUL 2018 RELEASE UPDATE 12.2.0.1.180717)

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

Validating logfiles...
Patch 28163133 apply: SUCCESS
logfile: /oradb/app/oracle/cfgtoollogs/sqlpatch/28163133/22313390/28163133_apply_ORCLDEMO_2018Sep22_01_39_13.log (no errors)
SQL Patching tool complete on Sat Sep 22 01:41:53 2018

Step 10 :- After applying PSU patch,Check the DBA_REGISTRY_SQLPATCH

Step 11:- Check opatch lsinventory  and list of patches applied in ORACLE_HOME

[oracle@orcl:OPatch orcldemo] /oradb/app/oracle/product/12.2.0.1/db_1/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.14
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /oradb/app/oracle/product/12.2.0.1/db_1
Central Inventory : /oradb/app/oraInventory
from : /oradb/app/oracle/product/12.2.0.1/db_1/oraInst.loc
OPatch version : 12.2.0.1.14
OUI version : 12.2.0.1.4
Log file location : /oradb/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-09-22_01-50-06AM_1.log

Lsinventory Output file location : /oradb/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-09-22_01-50-06AM.txt

-----------------------------------------------------------------------
Local Machine Information::
Hostname: orcl.localdomain.com
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

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

Interim patches (1) :

Patch 28163133 : applied on Sat Sep 22 01:30:43 IST 2018
Unique Patch ID: 22313390
Patch description: "Database Jul 2018 Release Update : 12.2.0.1.180717 (28163133)"
Created on 6 Jul 2018, 08:05:03 hrs PST8PDT
Bugs fixed:
8480838, 13554903, 14690846, 15931756, 16002385, 16727454, 16942578
17027695, 17533661, 17947871, 18308268, 18521691, 18594510, 18774543
19072655, 19211433, 19285025, 19327292, 19526548, 19614243, 19647894
19649997, 19721304, 20003668, 20087519, 20118035, 20324049, 20532077
20591151, 20620169, 20736227, 20756305, 20866970, 20976443, 21143725
21147908, 21159907, 21178363, 21186167, 21216226, 21320338, 21433452
21479706, 21520266, 21547051, 21981529, 21985256, 22007324, 22070853
22072543, 22087683, 22104866, 22179537, 22347493, 22364044, 22367053
22379010, 22446455, 22495673, 22503283, 22503297, 22504793, 22564336
22568728, 22581771, 22594071, 22599050, 22628825, 22645009, 22654475
22700845, 22729345, 22826067, 22843979, 22845846, 22864303, 22898198
22950945, 22970869, 22981722, 23019710, 23026585, 23035249, 23055900
23061453, 23065002, 23066146, 23080557, 23105538, 23125560, 23126545
23127945, 23151677, 23179662, 23184263, 23197730, 23234232, 23249829
23271203, 23300142, 23310101, 23312077, 23481673, 23491861, 23499160
23521523, 23527363, 23548817, 23572982, 23581777, 23588722, 23599216
23600861, 23602213, 23645516, 23665623, 23709062, 23715460, 23730961
23733981, 23735292, 23741944, 23746128, 23749454, 24010030, 24289874
24294174, 24303148, 24307571, 24308349, 24326444, 24326846, 24332831
24334708, 24336249, 24337882, 24341675, 24343905, 24345420, 24346821
24348685, 24350620, 24368004, 24373756, 24374976, 24376875, 24376878
24385983, 24401351, 24403922, 24415926, 24421668, 24423416, 24425056
24425998, 24435982, 24437162, 24443539, 24457597, 24461826, 24468470
24470606, 24473736, 24485034, 24485161, 24485174, 24486059, 24486237
24509056, 24534401, 24554533, 24555417, 24556967, 24560906, 24563422
24570598, 24573817, 24578718, 24578797, 24589081, 24589590, 24593740
24595699, 24600330, 24609592, 24609996, 24616637, 24617969, 24623975
24624166, 24642495, 24654629, 24655717, 24664211, 24668398, 24674197
24674955, 24676172, 24677696, 24680959, 24689376, 24692973, 24693290
24699619, 24710696, 24713381, 24714096, 24717183, 24717859, 24719799
24735430, 24737064, 24737403, 24737581, 24744383, 24744686, 24757934
24759556, 24760407, 24766309, 24786669, 24792678, 24793511, 24796092
24797119, 24800423, 24801152, 24802934, 24811725, 24812047, 24827228
24827654, 24831514, 24835919, 24843188, 24844549, 24845157, 24848746
24848923, 24850622, 24907917, 24908321, 24911709, 24912588, 24922704
24923080, 24923215, 24923338, 24923790, 24929210, 24938784, 24940060
24942749, 24953434, 24960044, 24966788, 24968162, 24976007, 24978100
25027852, 25029022, 25029423, 25034396, 25036474, 25044977, 25045228
25050160, 25051628, 25057811, 25058080, 25062592, 25063971, 25065563
25072986, 25078611, 25086233, 25087436, 25093872, 25098160, 25099339
25099497, 25099758, 25100063, 25100579, 25103996, 25107662, 25110233
25120284, 25121089, 25123585, 25124363, 25129925, 25140197, 25145163
25145215, 25150925, 25159176, 25162645, 25164293, 25166187, 25171084
25175723, 25176408, 25178032, 25178101, 25178179, 25179774, 25182817
25184555, 25186079, 25191872, 25192044, 25192729, 25199585, 25201454
25202355, 25203656, 25206864, 25207410, 25209912, 25210268, 25210499
25211628, 25223839, 25224242, 25225795, 25226665, 25227381, 25230945
25237577, 25240590, 25241448, 25241625, 25244807, 25248384, 25251648
25257085, 25259611, 25262869, 25263960, 25265499, 25287072, 25296876
25299227, 25305405, 25307368, 25313154, 25313411, 25316758, 25317989
25320555, 25328518, 25329664, 25335249, 25335360, 25335790, 25337332
25337640, 25348956, 25353983, 25357142, 25382812, 25383204, 25384462
25386748, 25388896, 25392535, 25395696, 25397936, 25405813, 25410017
25410180, 25410802, 25410877, 25411036, 25417050, 25417056, 25417958
25425451, 25425760, 25427662, 25429959, 25430120, 25433696, 25437699
25440818, 25444961, 25451531, 25455795, 25457409, 25459958, 25462714
25463844, 25472112, 25476149, 25478885, 25489342, 25489367, 25489607
25492379, 25498930, 25498994, 25516250, 25524955, 25528838, 25530080
25530814, 25536819, 25537470, 25539063, 25540738, 25546580, 25546608
25547901, 25551676, 25553616, 25554787, 25555252, 25557886, 25558986
25561296, 25569149, 25570929, 25575348, 25575628, 25579458, 25579761
25594901, 25597525, 25598473, 25600342, 25600421, 25602488, 25603923
25606091, 25607726, 25612095, 25614866, 25616268, 25616359, 25616417
25616645, 25631933, 25633101, 25634317, 25634348, 25635149, 25638456
25639019, 25643818, 25643931, 25646373, 25647325, 25648731, 25653109
25654459, 25654936, 25655390, 25655966, 25659655, 25660847, 25661819
25662088, 25662101, 25662524, 25669791, 25672640, 25674386, 25680221
25685152, 25687460, 25691904, 25694206, 25695903, 25700654, 25710420
25715167, 25717371, 25722055, 25722608, 25722720, 25728085, 25729507
25736747, 25739065, 25754606, 25757748, 25760195, 25764020, 25766822
25768681, 25772669, 25774077, 25775213, 25784002, 25785331, 25785441
25788879, 25789041, 25789277, 25789579, 25790353, 25797092, 25797124
25803545, 25807997, 25813931, 25822410, 25823754, 25825910, 25826740
25830492, 25832935, 25834581, 25838361, 25852885, 25856821, 25858672
25861398, 25865785, 25870579, 25871177, 25871639, 25871753, 25872127
25874050, 25874678, 25885148, 25888073, 25890056, 25895224, 25897615
25904273, 25904490, 25906117, 25911724, 25914276, 25919622, 25932524
25941836, 25943271, 25945130, 25947799, 25953857, 25954022, 25954054
25957038, 25963024, 25964954, 25967544, 25967985, 25970731, 25973152
25975723, 25977302, 25980605, 25980770, 25981498, 25982666, 25990907
25995938, 26006257, 26019148, 26024732, 26025681, 26029780, 26032573
26036748, 26037215, 26038086, 26039623, 26040483, 26045732, 26078437
26080410, 26083298, 26088426, 26088836, 26090767, 26091640, 26091786
26095327, 26095405, 26096382, 26108080, 26110632, 26111842, 26121990
26138085, 26149904, 26153977, 26169341, 26169345, 26170715, 26176002
26187943, 26189861, 26198757, 26198926, 26201113, 26223039, 26237431
26237773, 26242031, 26243698, 26244115, 26245237, 26249718, 26256131
26259265, 26261327, 26263328, 26263721, 26271001, 26308650, 26324769
26327624, 26330994, 26331743, 26333141, 26351334, 26353617, 26358670
26362821, 26366517, 26367012, 26374791, 26375250, 26380097, 26385189
26388538, 26396790, 26399626, 26412540, 26418088, 26420561, 26421667
26426526, 26430737, 26434999, 26435073, 26436168, 26438612, 26440749
26442308, 26444601, 26444887, 26446098, 26452606, 26475419, 26476244
26478970, 26479173, 26486365, 26492866, 26493289, 26498354, 26513709
26522439, 26523432, 26526726, 26537307, 26542135, 26544823, 26545688
26546070, 26546664, 26546754, 26548363, 26556014, 26569225, 26575788
26582460, 26584641, 26597140, 26599395, 26608137, 26609942, 26615291
26615690, 26623652, 26626879, 26629381, 26633355, 26635897, 26637273
26637824, 26639167, 26641610, 26650226, 26658759, 26659182, 26680105
26712331, 26714910, 26729494, 26729611, 26740700, 26744595, 26751106
26751171, 26758193, 26764561, 26765212, 26775602, 26784509, 26794786
26797591, 26802503, 26820076, 26822620, 26840654, 26849779, 26875822
26896659, 26898563, 26907327, 26908788, 26909100, 26911000, 26939314
26944190, 26967713, 26969321, 26970717, 26981902, 26983259, 26992964
27009164, 27034890, 27044297, 27052607, 27060167, 27060859, 27073314
27079140, 27087426, 27090765, 27110878, 27117822, 27119621, 27124624
27125872, 27133662, 27135993, 27138325, 27142373, 27153641, 27161071
27162405, 27163928, 27165231, 27169796, 27181537, 27199245, 27207110
27213224, 27229389, 27244337, 27250547, 27274536, 27285244, 27292213
27304410, 27305039, 27314206, 27314390, 27329612, 27333106, 27334316
27338912, 27338946, 27345231, 27346709, 27348081, 27349393, 27367194
27370965, 27375542, 27394703, 27395416, 27396624, 27396813, 27400598
27434193, 27439835, 27441326, 27442041, 27501373, 27501413, 27502420
27504770, 27508985, 27510959, 27534509, 27544973, 27548131, 27558861
27560602, 27595973, 27611612, 27613080, 27687880, 27688036, 27688692
27709046, 27748954, 27799032, 27847259, 27882176, 27959048, 27997875
28033429, 28040776, 28099662, 28140658, 28184554, 28188330, 28174827
-----------------------------------------------------------------------
OPatch succeeded.

 

Catch Me On:- Hariprasath Rajaram

Telegram:https://t.me/joinchat/I_f4DhGF_Zifr9YZvvMkRg
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba

 

Step by Step Applying PSU Patch in Oracle 11gR2 in Windows Environment

Description:

In this article we will see how to apply the PSU patch in Oracle database 11gR2 in Windows Server.

High Level steps for applying the Patch in Windows:
1) Prerequisites to Apply Patch
2) Shutdown Database Services and Listener
3) Apply PSU patch on ORACLE_HOME in Windows Environment
4) Execute Post installation Scripts (datapatch)

1) Prerequisites to Apply Patch:-
Check the database platform:
SQL> select * from v$version;Now we are going to apply April 2017 PSU patch in oracle database version 11.2.0.4(25632525). So, once the patch is downloaded, check the read me file for the minimum required opatch utility version. As per “Read me” of patch 25632525, the minimum required opatch utility version is 11.2.0.3.5 or later to apply this patch. Download the latest OPatch tool for 11.2.0.4 database and apply the patch: 6880880 from support.oracle.com or from https://updates.oracle.com/download/6880880.html

Check the current version of Opatch Tool in our environment:
$ set PATH=%ORACLE_HOME%\OPatch;%PATH%
$ opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.

Take a backup of older version of OPatch utility under $ORACLE_HOME and unzip the downloaded file:

$ cd %ORACLE_HOME%
$ move OPatch OPatch_bkp.07.04.18
$ copy <Patch_location>\p6880880_112000_MSWIN-x86-64.zip %ORACLE_HOME%
$ unzip p6880880_112000_MSWIN-x86-64.zip
$ cd OPatch
$ opatch version
OPatch Version: 11.2.0.3.19
OPatch succeeded.

Check the applied patches by below command:

$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.19
Copyright (c) 2018, Oracle Corporation. All rights reserved.
Oracle Home : D:\app\oracle\product\11.2.0.4\db_1
Central Inventory : C:\Program Files\Oracle\Inventory
from :
OPatch version : 11.2.0.3.19
OUI version : 11.2.0.4.0
Log file location : D:\app\oracle\product\11.2.0.4\db_1\cfgtoollogs\opatch\opatch2018-07-05_11-54-32AM_1.log
Lsinventory Output file location : D:\app\oracle\product\11.2.0.4\db_1\cfgtoollogs\opatch\lsinv\lsinventory2018-07-05_11-54-32AM.txt

-----------------------------------------------------------------
Local Machine Information::
Hostname: dw20ora01
ARU platform id: 233
ARU platform description:: Microsoft Windows (64-bit AMD)
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 24591648 : applied on Wed Jul 04 16:55:24 PDT 2018
Unique Patch ID: 20718137
Patch description: "WINDOWS DB BUNDLE PATCH 11.2.0.4.161028:(24591648)"
Created on 27 Oct 2016, 10:17:04 hrs
Bugs fixed:
16382883, 17545847, 18096714, 16543190, 23530402, 17618819, 20368850
18098207, 19867671, 17006570, 14764840, 14458319, 19359219, 14543350
19168690, 16878635, 17820195, 17215306, 18441944, 13955826, 19188927
19500064, 18084625, 17201159, 17001914, 17311728, 18262334, 16194160
20995001, 22100902, 14046443, 16434236, 17927204, 14354737, 24316947
16903536, 19126146, 19532017, 17238511, 17602269, 20014326, 19181525
17080436, 17359610, 17838476, 21330264, 19957298, 20853852, 22609902
16399083, 18966843, 17853355, 16065166, 17493764, 19220183, 18092127
20038451, 16187992, 17156148, 16279409, 18689530, 19558324, 20245930
10231702, 20527770, 18882642, 14285317, 17484712, 19949371, 13949321
22568797, 21191575, 17896495, 10052729, 20771003, 20194181, 16870214
18633374, 17332343, 16863422, 18134680, 21517440, 16613232, 18673304
17799759, 17325413, 16832076, 19479503, 17258083, 21343838, 17764053
17202639, 17089344, 21232394, 13991403, 18766012, 22198405, 17159489
20294666, 18893947, 14761365, 18084873, 21377051, 16545319, 17174582
16994839, 16043574, 20795241, 18199185, 17865671, 21982225, 18520351
20074391, 18232462, 17570606, 17877323, 20613398, 17231779, 17086446
17484731, 22624682, 17238586, 16633319, 16956380, 17769597, 16470836
17824637, 20175174, 18328509, 12905058, 21424824, 18331850, 18663316
17898325, 17640316, 18765602, 16343493, 17551261, 17501491, 18277454
19272663, 17775506, 13542050, 19174639, 17296856, 14255128, 16249829
17164243, 17947785, 20400092, 18235390, 14320415, 22243719, 14657740
16657901, 17430165, 21152052, 16410570, 17622427, 22757355, 18409441
17210525, 18472224, 19896336, 21321429, 18868646, 22507234, 17896018
19051460, 12897813, 24345602, 21184223, 17336889, 21343897, 17721778
17798953, 12646133, 22728402, 19469538, 17031322, 12928592, 22894949
18325460, 21787056, 18024745, 16246352, 18456514, 20804108, 16360112
19784663, 16422541, 20502905, 18272135, 21453153, 12611721, 17242746
14525998, 21419850, 18999857, 20532070, 17781991, 18846036, 18886413
19201866, 20560611, 19540182, 20331945, 17982832, 17068448, 19245018
20730170, 20954292, 16296213, 14275161, 12771236, 17393683, 16069901
19601228, 17449815, 17655240, 16477664, 20105012, 18352846, 18316692
19730653, 18317531, 17649265, 19152705, 17232014, 16818892, 19955755
13823394, 19559495, 16988311, 17883081, 18604692, 19703301, 17284817
17040527, 17059927, 16989407, 22657942, 18414137, 17390160, 18296772
14690825, 21091431, 19234907, 20857267, 19438874, 16668584, 16613964
16837528, 18231837, 18348155, 18024089, 17785870, 20412068, 17811789
13744436, 14692762, 17546973, 17452841, 14503359, 13077335, 21275952
20544696, 18685209, 17993995, 19565533, 18691080, 18641451, 18273830
17767676, 16076412, 16524926, 18888066, 14368995, 16941434, 15993436
21614112, 20724902, 17892268, 17890099, 18051556, 18961101, 19915271
16285691, 19269405, 18264060, 21515534, 21885595, 20393340, 16075609
20043415, 18724012, 21634629, 18241710, 17551674, 16268425, 17518652
17922254, 20317221, 17634921, 22507210, 17546761, 18053580, 17435488
17852463, 17040764, 14010183, 16837842, 17588480, 17042658, 17805316
20235486, 19445860, 18641419, 22241601, 21245437, 22064588, 17577218
18730542, 17570240, 17352230, 20114174, 19441649, 17306264, 16698971
19488514, 6599380, 18120545, 17621643, 17483479, 17945983, 20558005
16199543, 17402822, 18417036, 17308789, 19128723, 18673325, 22296366
20925795, 11733603, 18339044, 21492036, 13651346, 14054676, 18665660
18135678, 17376318, 17088068, 18280356, 23558745, 13550783, 16692232
13514665, 19689979, 14580303, 18223971, 18260550, 18508861, 21286665
17443671, 19727057, 21387964, 12933243, 18296644, 15990359, 18373054
21343775, 21099502, 17816865, 17617807, 17365043, 18856999, 19543439
17205719, 19361710, 18180390, 21028698, 17267114, 20596234, 13511170
14176370, 18962892, 18154779, 22073360, 13645875, 21222147, 18146463
18384537, 18304693, 17184721, 16943711, 17375354, 19197175, 24939974
16980342, 16825679, 17571306, 17477958, 19472320, 19205169, 14084247
19601468, 19524384, 17019345, 12578873, 18614717, 14565184, 18226143
17614227, 19873377, 18018515, 20398963, 17405302, 18228645, 18263924
17583959, 17270418, 20004087, 16306373, 18493178, 18762750, 21091518
18336452, 17288409, 18747196, 18155762, 21369858, 17984331, 17571039
14338435, 17011832, 15955387, 17346091, 16992075, 17927970, 13724904
19013183, 19291380, 16392068, 18619917, 15894143, 21503053, 19165892
20882568, 13866822, 19309466, 22348452, 14671408, 17886392, 13070166
19790972, 17721717, 16777840, 18326617, 14373152, 20219458, 16804061
17036973, 16619152, 4189542, 14852021, 18614015, 19713693, 17476624
18723434, 18620694, 19879144, 17343514, 16284825, 19258504, 20010162
17255538, 19780701, 17224314, 18485835, 19032867, 21469106, 17632286
17598201, 20856290, 18293054, 16876500, 18783224, 17853456, 17332800
13498243, 18674024, 17853498, 17292250, 17376015, 14843189, 20124997
17897511, 16867761, 12816846, 17274537, 18516384, 18558952, 16902031
14458214, 17691313, 21235427, 21983325, 17468141, 20824222, 17273003
17250794, 18590877, 17079301, 18867023, 16976121, 17484762, 19888492
17235750, 16819962, 18418934, 16359751, 19146626, 18744838, 17478145
21373076, 17891946, 16454223, 16247011, 22331786, 17360606, 18356166
17209410, 18973907, 21868720, 19384686, 19835133, 14076173, 18073821
16596890, 17672719, 19699191, 16317771, 18940497, 16220077, 17016369
18115594, 18876528, 17027426, 16346413, 17818075, 19359787, 17381384
17297939, 17348614, 17716305, 16809786, 18246045, 18125929, 17835048
16042673, 21691487, 22666802, 17258090, 17214497, 17610798, 16954950
19358317, 14800956, 22272439, 21668627, 21526048, 16731148, 23076397
17973301, 18191542, 16798862, 16571443, 17842825, 17336871, 16685417
18729166, 16494615, 18182018, 11883252, 18282562, 21904072, 20551654
20552947, 18842982, 17936109, 22177861, 20127071, 17912217, 17265217
19455741, 17925209, 18419770, 18331812, 13498382, 18034737, 18091059
14146298, 13537901, 9670413, 17987366, 19393542, 20951527, 17336898
20110156, 17313525, 18464784, 16281493, 17401353, 18199537, 15832129
20032370, 14146268, 17344412, 20332422, 15986647, 16384983, 18681683
14034426, 8632432, 17013634, 20825533, 18111216, 16206997, 17394950
17956707, 17785632, 20898997, 17397545, 17186905, 21306422, 21756699
18029658, 22162062, 16542886, 24591646, 16901385, 18284763, 17564992
18191164, 17754782, 19606562, 18160822, 16579084, 18641461, 18306996
17162771, 14378120, 18604144, 20476175, 17752995, 19191702, 12608451
16594015, 13829543, 17587063, 17019086, 18261183, 17651484, 19690653
16770590, 18767554, 17921190, 16943198, 16198143, 12758971, 18554871
18189036, 18143836, 14693336, 17591148, 12799826, 16875449, 16863642
17614134, 21351877, 17155238, 16317020, 19211724, 18244962, 18508710
17082983, 18674465, 20583364, 14602788, 18914624, 15913355, 17282229
18428146, 21530704, 17165204, 14044260, 17501296, 20438706, 17172091
16315398, 18000422, 14678924, 13949610, 19501696, 20091753, 18399991
14133975, 16683112, 21168487, 24591648, 18841764, 16538760, 18241194
19478594, 17532816, 13609098, 15861775, 21813400, 18362222, 17851160
18709496, 17046460, 18384391, 17694209, 16833527, 17227277, 17050798
18964939, 8886629, 14085520, 17510275, 17357979, 19685412, 18819257
7533808, 17783588, 16456761, 12747740, 17405605, 17389192, 17786518
19403858, 18673342, 18334586, 17889549, 21884157, 16882070, 17843489
20898010, 16721594, 17722664, 18088509, 17387214, 17274465, 18353141
18850278, 16314254, 17572525, 14769643, 20949558, 20777150, 16989630
16702217, 19012893, 17936349, 18193833, 18430495, 19289642, 21307096
14015842, 18967645, 18424939, 20094984, 19879746, 17908541, 18436647
23342087, 19241857, 17889583, 14106803, 21285458, 23211005, 19006849
17799716, 17363999, 17025461, 16394467, 20440643, 18708921, 18405517
17465741, 14280240, 19885321, 17391726, 17037130, 16299727, 16833845
16837274, 17489922, 16188701, 17446237, 19720346, 18946768, 18436307
17336884, 16450169, 17726838, 17684143, 17441661, 20315294, 9756271
20195148, 17237521, 16228604, 18202441, 17346671, 12416600, 15986311
18247991, 19791273, 15917869, 17848897, 18828868, 19192715, 17208934
16919631, 17736165, 17648596, 18890385, 18346135, 17299889, 18554763
18482502, 14764829, 17655634, 17611362, 19000463, 16206882, 14851828
22839608, 16934803, 20657441, 18704244, 17551699, 22092979, 19614585
17279227, 19461687, 20246071, 21080143, 16344544, 19835650, 20844426
22522880, 16618694, 17006183, 17741995, 18952577, 21050285, 22310544
17644091, 21821802, 18695733, 16491477, 21059919, 17617815, 19267095
17049773, 18061914, 20141091, 18779636, 18685892, 16850630, 18471685
20340620, 17483407, 18068871, 16345970, 14392595, 17957017, 19615136
16759171, 16403344, 18006980, 14231204, 22496904, 16595641, 17592037
13364795, 18009564, 20067212, 16472716, 18948524, 13944971, 22120238
22640754, 21833220, 20012766, 17291347, 13853126, 18315328, 17531342
16849620, 18440047, 20073979, 19023822, 17951124, 13984192, 17082359
18700935, 17019356, 19000876, 14000767, 17787259, 20218012, 20194732
20448824, 17612828, 17393915, 16667538, 17955615, 17374271, 18230522
18674047, 18280813, 20963783, 18080511, 18159249, 17389314, 17279525
18094246, 21756661, 17762296, 17159968, 21694632, 19049453, 20887355
16180763, 20228093, 22380919, 17070158, 17597748, 19625472, 18317074
20936905, 18053631, 20121313, 22024071, 19507904, 17982555, 20334344
17761775, 14460384, 12716670, 20263424, 16305657, 17050888, 13073613
17481314, 19576559, 14497275, 19721304, 18628388, 22740499, 20140148
17197081, 17951233, 19680952, 16810361, 17600719, 18416368, 17071721
16929165, 18187553, 19550902, 20627866, 14777968, 20307317, 17273020
21201481, 18265482, 16785708, 18510194, 17209968, 12982566, 17797700
17831758, 19152115, 17891943, 19442102, 17705023, 21756677, 22272976
19827973, 17341326, 20539715, 22228324, 19730508, 18075666, 18996843
17827250, 20531190, 18904062, 14245531, 19487147, 18069285, 19827030
19613828, 17973658, 18229901, 17586955, 10136473, 17551063, 18069723
20004021, 21067387, 16820228, 14492911, 18035463, 19319357, 16855292
17239687, 17217593, 17030189, 20355502, 19651773, 16091637, 12364061
17835627, 17596908, 18718696, 20365005, 18607546, 22148226, 17500165
18187697, 13960236, 13951456, 16237657, 14500654, 20186278, 20017509
18875012, 13558557, 18759589, 12928658, 18352845, 18034871, 17385178
16912439, 21847223, 21255373, 17215560, 17786278, 21297872, 20408163
17901041, 21327402, 15979965, 14823704, 19616601, 17752121, 14829250
17056988, 20551790, 17590813, 20833831, 13837378, 20513382, 17390431
17323222
-------------------------------------------------------------------
OPatch succeeded.

Shutdown all the services and take backup of ORACLE_HOME(Rollback plan) and copy the patch a location in the server:

$ copy <Patch_location>\p25632525_112040_MSWIN-x86-64.zip $ORACLE_HOME\OPatch

2) Shutdown Database Services and Listener:-

$ set ORACLE_SID=PROD
$ sqlplus '/as sysdba'
SQL> shut immediate
SQL> exit
$ lsnrctl stop
LSNRCTL for 64-bit Windows: Version 11.2.0.4.0 - Production on 05-JUL-2018 12:07:41
Copyright (c) 1991, 2013, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.113)(PORT=1624)))
The command completed successfully

Make sure all the oracle services has been stopped3) Apply PSU patch on ORACLE_HOME in Windows Environment:-

$ cd %ORACLE_HOME%\OPatch
$ unzip p25632525_112040_MSWIN-x86-64.zip
$ cd 25632525
$ opatch apply

Oracle Interim Patch Installer version 11.2.0.3.19
Copyright (c) 2018, Oracle Corporation. All rights reserved.
Oracle Home : D:\app\oracle\product\11.2.0.4\db_1
Central Inventory : C:\Program Files\Oracle\Inventory
from :
OPatch version : 11.2.0.3.19
OUI version : 11.2.0.4.0
Log file location : D:\app\oracle\product\11.2.0.4\db_1\cfgtoollogs\opatch\opatch2018-07-05_12-18-47PM_1.log
Verifying environment and performing prerequisite checks...
OPatch continues with these patches: 25632525
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
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
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = 'D:\app\oracle\product\11.2.0.4\db_1')
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '25632525' to OH 'D:\app\oracle\product\11.2.0.4\db_1'
ApplySession: Optional component(s) [ oracle.rdbms.tg4msql, 11.2.0.4.0 ] , [ oracle.rdbms.tg4sybs, 11.2.0.4.0 ] , [ oracle.rdbms.tg4tera, 11.2.0.4.0 ] , [ oracle.rdbms.tg4ifmx, 11.2.0.4.0 ] , [ oracle
.rdbms.tg4db2, 11.2.0.4.0 ] , [ oracle.rdbms.ic, 11.2.0.4.0 ] , [ oracle.has.cfs, 11.2.0.4.0 ] , [ oracle.has.crs, 11.2.0.4.0 ] , [ oracle.has.cvu, 11.2.0.4.0 ] , [ oracle.usm, 11.2.0.4.0 ] not prese
nt in the Oracle Home or a higher version is found.
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.ovm, 11.2.0.4.0...
Patching component oracle.rdbms.oci, 11.2.0.4.0...
Patching component oracle.sysman.plugin.db.main.agent, 11.2.0.4.0...
Patching component oracle.sqlplus.ic, 11.2.0.4.0...
Patching component oracle.sqlplus, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rsf.ic, 11.2.0.4.0...
Patching component oracle.ldap.owm, 11.2.0.4.0...
Patching component oracle.rdbms.plsql, 11.2.0.4.0...
Patching component oracle.owb.rsf, 11.2.0.4.0...
Patching component oracle.xdk.parser.java, 11.2.0.4.0...
Patching component oracle.xdk.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.sdo, 11.2.0.4.0...
Patching component oracle.sdo.locator, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.sysman.agent, 10.2.0.4.5...
Patching component oracle.rdbms.hsodbc, 11.2.0.4.0...
Patching component oracle.nlsrtl.rsf, 11.2.0.4.0...
Patching component oracle.xdk, 11.2.0.4.0...
Patching component oracle.ctx, 11.2.0.4.0...
Patching component oracle.precomp.common, 11.2.0.4.0...
Patching component oracle.oraolap, 11.2.0.4.0...
Patching component oracle.oraolap.dbscripts, 11.2.0.4.0...
Patching component oracle.oraolap.api, 11.2.0.4.0...
Patching component oracle.odbc.ic, 11.2.0.4.0...
Patching component oracle.ldap.rsf.ic, 11.2.0.4.0...
Patching component oracle.rdbms.util, 11.2.0.4.0...
Patching component oracle.rdbms.dv, 11.2.0.4.0...
Patching component oracle.network.rsf, 11.2.0.4.0...
Patching component oracle.network.aso, 11.2.0.4.0...
Patching component oracle.ntoledb, 11.2.0.4.0...
Patching component oracle.ntoledb.odp_net_2, 11.2.0.4.0...
Patching component oracle.ordim.client, 11.2.0.4.0...
Patching component oracle.ordim.jai, 11.2.0.4.0...
Patching component oracle.ordim.server, 11.2.0.4.0...
Patching component oracle.sysman.console.db, 11.2.0.4.0...
Patching component oracle.has.common.cvu, 11.2.0.4.0...
Patching component oracle.has.common, 11.2.0.4.0...
Patching component oracle.has.db, 11.2.0.4.0...
Patching component oracle.has.deconfig, 11.2.0.4.0...
Patching component oracle.has.rsf, 11.2.0.4.0...
Patch 25632525 successfully applied.
Sub-set patch [24591648] has become inactive due to the application of a super-set patch [25632525].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: D:\app\oracle\product\11.2.0.4\db_1\cfgtoollogs\opatch\opatch2018-07-05_12-18-47PM_1.log

OPatch succeeded.

Check the applied patch by lsinventory:

$ opatch lsinventory
D:\app\oracle\product\11.2.0.4\db_1\OPatch\25632525>opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.19
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : D:\app\oracle\product\11.2.0.4\db_1
Central Inventory : C:\Program Files\Oracle\Inventory
from :
OPatch version : 11.2.0.3.19
OUI version : 11.2.0.4.0
Log file location : D:\app\oracle\product\11.2.0.4\db_1\cfgtoollogs\opatch\opatch2018-07-05_12-29-34PM_1.log
Lsinventory Output file location : D:\app\oracle\product\11.2.0.4\db_1\cfgtoollogs\opatch\lsinv\lsinventory2018-07-05_12-29-34PM.txt
-----------------------------------------------------------------------
Local Machine Information::
Hostname: dw20ora01
ARU platform id: 233
ARU platform description:: Microsoft Windows (64-bit AMD)
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
Interim patches (1) :
Patch 25632525 : applied on Thu Jul 05 12:20:16 PDT 2018
Unique Patch ID: 21192220
Patch description: "WINDOWS DB BUNDLE PATCH 11.2.0.4.170418:(25632525)"
Created on 12 Apr 2017, 01:31:16 hrs
Bugs fixed:
16382883, 17545847, 18096714, 16543190, 23530402, 17618819, 20368850
18098207, 19867671, 17006570, 14764840, 14458319, 19359219, 14543350
19168690, 16878635, 17820195, 17215306, 18441944, 13955826, 19188927
19500064, 18084625, 17201159, 17001914, 17311728, 18262334, 12763598
16194160, 20995001, 22100902, 14046443, 16434236, 17927204, 14354737
24316947, 16903536, 19126146, 19532017, 17238511, 17172673, 17602269
20014326, 19181525, 17080436, 24739928, 17359610, 17838476, 21330264
19957298, 20853852, 22609902, 16399083, 18966843, 17853355, 16065166
17493764, 19220183, 18092127, 20038451, 16187992, 17156148, 16279409
18689530, 19558324, 20245930, 10231702, 20527770, 18882642, 14285317
20801452, 17484712, 19949371, 13949321, 22568797, 21191575, 17896495
10052729, 20771003, 20194181, 16870214, 18633374, 17332343, 16863422
18134680, 23084142, 21517440, 16613232, 18673304, 17799759, 17325413
16832076, 19479503, 17258083, 21343838, 17764053, 17202639, 17089344
21232394, 13991403, 18766012, 22198405, 17159489, 20294666, 18893947
14761365, 18084873, 21377051, 16545319, 17174582, 16994839, 16043574
20795241, 16856594, 18199185, 17865671, 21982225, 18520351, 20074391
18232462, 17570606, 17877323, 20613398, 17231779, 17086446, 17484731
22624682, 17238586, 24922870, 16633319, 16956380, 17769597, 16470836
17824637, 20175174, 18328509, 12905058, 21424824, 18331850, 18663316
17898325, 17640316, 18765602, 12910197, 16343493, 18549238, 17551261
17501491, 18277454, 19272663, 17775506, 13542050, 19174639, 17296856
14255128, 16249829, 23102649, 17164243, 17947785, 20400092, 18235390
14320415, 22243719, 14657740, 16657901, 17430165, 21152052, 16410570
17622427, 22757355, 18409441, 17210525, 18472224, 19896336, 21321429
18868646, 22507234, 23327988, 17896018, 19051460, 12897813, 24345602
21184223, 17336889, 21343897, 17721778, 17798953, 12646133, 22728402
19469538, 17031322, 12928592, 24522687, 22894949, 18325460, 21787056
18024745, 16246352, 18456514, 25259798, 20804108, 16360112, 19784663
16422541, 20502905, 18272135, 21453153, 12611721, 17242746, 14525998
21419850, 18999857, 20532070, 17781991, 18846036, 18886413, 19201866
20560611, 19540182, 20331945, 17982832, 20144308, 17068448, 23645516
19245018, 20730170, 20954292, 16296213, 14275161, 12771236, 17393683
16069901, 19601228, 17449815, 17655240, 16477664, 20105012, 18352846
18316692, 19730653, 18317531, 17649265, 19152705, 17232014, 16818892
19955755, 13823394, 19559495, 16988311, 17883081, 18604692, 19703301
17284817, 17040527, 17059927, 16989407, 22657942, 18414137, 17390160
18296772, 21091431, 14690825, 19234907, 20857267, 19438874, 16668584
16613964, 16837528, 22168163, 18231837, 18348155, 18024089, 17785870
20412068, 17457995, 17811789, 13744436, 14692762, 17546973, 17452841
14503359, 13077335, 21275952, 20544696, 18685209, 17993995, 19565533
18691080, 18641451, 18273830, 17767676, 16342156, 16076412, 16524926
18888066, 14368995, 16941434, 15993436, 21614112, 20724902, 17892268
17890099, 18051556, 18961101, 19915271, 16285691, 19269405, 18264060
21515534, 21885595, 20393340, 16075609, 20043415, 18724012, 18241710
21634629, 17551674, 16268425, 17518652, 17922254, 20317221, 17634921
22507210, 17546761, 18053580, 17435488, 17852463, 17040764, 14010183
16837842, 17588480, 24326444, 17042658, 17805316, 20235486, 19445860
18641419, 21157342, 22241601, 21245437, 22064588, 25093656, 17577218
18730542, 17570240, 17352230, 20114174, 19441649, 17306264, 16698971
19488514, 6599380, 22842151, 18120545, 17621643, 18383135, 17483479
17945983, 20558005, 16199543, 17402822, 18417036, 17308789, 19128723
18673325, 22296366, 20925795, 11733603, 18339044, 21492036, 13651346
14054676, 18665660, 18135678, 17376318, 17088068, 18280356, 23558745
13550783, 16692232, 13514665, 19689979, 14580303, 18223971, 18508861
18260550, 21286665, 17443671, 19727057, 21387964, 12933243, 18296644
15990359, 23253589, 18373054, 25508742, 21343775, 21099502, 17816865
17617807, 17365043, 18856999, 12940206, 19543439, 17205719, 19361710
18180390, 21028698, 17267114, 13511170, 20596234, 14176370, 18962892
18154779, 22073360, 13645875, 21222147, 18146463, 18384537, 18304693
17184721, 16943711, 21292730, 17375354, 19197175, 24939974, 16980342
16825679, 17571306, 17477958, 19472320, 19205169, 14084247, 19601468
19524384, 17019345, 12578873, 18614717, 14565184, 23326243, 18226143
17614227, 19873377, 18018515, 20398963, 17405302, 18228645, 18263924
17583959, 17270418, 20004087, 16306373, 18493178, 18762750, 19611459
21091518, 17570819, 18336452, 17288409, 18747196, 18155762, 21369858
17984331, 17571039, 14338435, 17011832, 15955387, 17346091, 22072543
16992075, 17927970, 13724904, 19013183, 19291380, 16392068, 18619917
15894143, 21503053, 19165892, 20882568, 13866822, 19309466, 22348452
14671408, 17886392, 13070166, 19790972, 17721717, 16777840, 18326617
14373152, 20219458, 16804061, 17036973, 16619152, 4189542, 14852021
18614015, 19713693, 23632545, 18723434, 17476624, 18620694, 19879144
17343514, 16284825, 19258504, 20010162, 21648165, 17254374, 17255538
19780701, 19134095, 17224314, 18485835, 19032867, 21469106, 17632286
17598201, 20856290, 18293054, 16876500, 18783224, 17853456, 17332800
13498243, 18674024, 17853498, 17292250, 17376015, 14843189, 20124997
17897511, 16867761, 12816846, 17274537, 18516384, 18558952, 16902031
14458214, 17691313, 21235427, 21983325, 17468141, 20824222, 17273003
17250794, 18590877, 17079301, 18867023, 16976121, 17484762, 19888492
17235750, 16819962, 18418934, 16359751, 19146626, 18744838, 17478145
21373076, 22918523, 24554533, 17891946, 16454223, 16247011, 22331786
17360606, 18356166, 17209410, 18973907, 21868720, 19384686, 19835133
14076173, 18073821, 16596890, 17672719, 19699191, 16317771, 18940497
16220077, 17016369, 18115594, 18876528, 17027426, 16346413, 17818075
19359787, 17381384, 14380605, 17297939, 16809786, 17716305, 17348614
18246045, 18125929, 17835048, 16042673, 21691487, 22666802, 17258090
17214497, 17610798, 16954950, 19358317, 14800956, 22272439, 21668627
21526048, 16731148, 23076397, 25037926, 17973301, 18191542, 16798862
16571443, 17842825, 17336871, 16685417, 18729166, 16494615, 18182018
11883252, 18282562, 24560906, 21904072, 20551654, 20552947, 18842982
17936109, 22177861, 17265217, 20127071, 17912217, 19455741, 17925209
18419770, 18331812, 13498382, 18034737, 18091059, 14146298, 13537901
9670413, 17987366, 19393542, 20951527, 17336898, 20110156, 17313525
20054583, 18464784, 16281493, 16344610, 17401353, 18199537, 15832129
20032370, 17344412, 14146268, 20332422, 15986647, 16384983, 18681683
14034426, 25632525, 8632432, 17013634, 14582843, 20825533, 18111216
16206997, 17394950, 17956707, 17785632, 20898997, 17397545, 17186905
23310310, 21306422, 21756699, 18029658, 22162062, 16542886, 24591646
16901385, 17564992, 18284763, 17754782, 18191164, 19606562, 18160822
16579084, 18641461, 18306996, 17162771, 14378120, 18604144, 20476175
17752995, 19191702, 12608451, 16594015, 13829543, 17587063, 17567110
17019086, 18261183, 17651484, 19690653, 16770590, 18767554, 17921190
16943198, 20133369, 16198143, 12758971, 18554871, 18189036, 18143836
14693336, 17591148, 12799826, 16875449, 16863642, 17614134, 20951038
21351877, 17155238, 16317020, 19211724, 18244962, 18508710, 17082983
21752827, 18674465, 14602788, 24842886, 20583364, 18914624, 15913355
17282229, 18428146, 23104413, 21530704, 17165204, 14044260, 17501296
20438706, 17172091, 16315398, 18000422, 14678924, 13949610, 16571172
19501696, 20091753, 18399991, 16683112, 14133975, 21168487, 24591648
18841764, 25115969, 16538760, 18241194, 24385983, 19478594, 17532816
13609098, 15861775, 21813400, 18362222, 17851160, 18709496, 17046460
18384391, 16619249, 17694209, 16833527, 16229527, 17227277, 17050798
19813787, 18964939, 8886629, 14085520, 17510275, 17357979, 19685412
18819257, 7533808, 17783588, 16456761, 12747740, 17405605, 17389192
17786518, 19403858, 18673342, 18334586, 17889549, 21884157, 16882070
17843489, 20898010, 16721594, 17722664, 18088509, 17387214, 17274465
18353141, 18850278, 16314254, 17572525, 14769643, 20949558, 20777150
16989630, 16702217, 19012893, 17936349, 18193833, 18430495, 19289642
21307096, 14015842, 18424939, 18967645, 13787015, 20094984, 19879746
17908541, 18436647, 23342087, 19241857, 17889583, 14106803, 21285458
23211005, 19006849, 17799716, 17363999, 17025461, 16394467, 20440643
18708921, 18405517, 17465741, 14280240, 19885321, 17391726, 17037130
16299727, 16833845, 16837274, 17489922, 24411921, 16188701, 22905130
17446237, 19720346, 18946768, 18436307, 17336884, 16450169, 17726838
17441661, 17684143, 20315294, 16060722, 9756271, 20195148, 17237521
16228604, 18202441, 17346671, 12416600, 15986311, 18247991, 19791273
15917869, 17848897, 18828868, 19192715, 17208934, 16919631, 17736165
17648596, 18890385, 18346135, 17299889, 18554763, 18482502, 14764829
17655634, 17611362, 19000463, 16206882, 14851828, 22839608, 16934803
20657441, 18704244, 17551699, 22092979, 19614585, 23665623, 17279227
19461687, 20246071, 21080143, 16344544, 19835650, 17806696, 20844426
22522880, 16618694, 17006183, 17741995, 18952577, 21050285, 22310544
17644091, 21821802, 18695733, 16491477, 21059919, 17617815, 19267095
17049773, 18061914, 20141091, 18685892, 18779636, 16850630, 18471685
20340620, 17483407, 18068871, 16345970, 14392595, 17957017, 19615136
16759171, 16403344, 14231204, 18006980, 22496904, 16595641, 17592037
13364795, 18009564, 20067212, 16472716, 18948524, 13944971, 22120238
22640754, 21833220, 20012766, 13853126, 17291347, 18315328, 17531342
16849620, 20073979, 19023822, 18440047, 17951124, 13984192, 17082359
18700935, 17019356, 19000876, 14000767, 17787259, 20218012, 20194732
20448824, 17612828, 17393915, 16667538, 16307352, 17955615, 17374271
18230522, 18674047, 18280813, 20963783, 18080511, 18159249, 17389314
17279525, 18094246, 21756661, 17762296, 17159968, 21694632, 19049453
20887355, 16180763, 20228093, 17070158, 25381935, 22380919, 17597748
19625472, 18317074, 20936905, 18053631, 20121313, 22024071, 19507904
25182199, 17982555, 17761775, 20334344, 14460384, 12716670, 20263424
16305657, 17050888, 13073613, 17481314, 19576559, 14497275, 19721304
18628388, 17405075, 22740499, 20140148, 17197081, 17951233, 19680952
16810361, 17600719, 18416368, 17071721, 16929165, 18187553, 19550902
20627866, 14777968, 20307317, 17273020, 21201481, 18265482, 16785708
17209968, 18510194, 12982566, 17797700, 17831758, 18440095, 19152115
17891943, 19442102, 17705023, 21756677, 22272976, 19827973, 17341326
20539715, 22228324, 18075666, 19730508, 18996843, 17827250, 20531190
18904062, 14245531, 18069285, 19487147, 19827030, 19613828, 17973658
18229901, 17586955, 10136473, 17551063, 18069723, 20004021, 21067387
14492911, 16820228, 18035463, 19319357, 16855292, 17239687, 17217593
17030189, 20355502, 19651773, 16091637, 12364061, 17835627, 17596908
18718696, 20365005, 18607546, 22148226, 17500165, 18187697, 13960236
13951456, 19487518, 16237657, 14500654, 20186278, 20017509, 18875012
13558557, 18759589, 12928658, 18352845, 18034871, 16912439, 17385178
21847223, 21255373, 17215560, 17786278, 21297872, 20408163, 17901041
21327402, 15979965, 14823704, 19616601, 12963364, 17752121, 14829250
20551790, 17056988, 17590813, 20833831, 17390431, 13837378, 20513382
17323222
-----------------------------------------------------------------------
OPatch succeeded.

4) Execute Post installation Scripts:-

$ cd %ORACLE_HOME%\rdbms\admin
$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql PSU apply

PL/SQL procedure successfully completed.
Function created.
Function created.
PL/SQL procedure successfully completed.
PL/SQL procedure successfully completed.
Generating apply and rollback scripts...
Check the following file for errors:
D:\app\oracle\cfgtoollogs\catbundle\catbundle_PSU_PROD_GENERATE_2018Jul05_12_36_56.log
.
SQL> ALTER SESSION SET current_schema = SYS;

Session altered.

SQL> PROMPT Updating registry...
Updating registry...
SQL> INSERT INTO registry$history
2 (action_time, action,
3 namespace, version, id,
4 bundle_series, comments)
5 VALUES
6 (SYSTIMESTAMP, 'APPLY',
7 SYS_CONTEXT('REGISTRY$CTX','NAMESPACE'),
8 '11.2.0.4',
9 170418,
10 'PSU',
11 'WinBundle 11.2.0.4.170418');
1 row created.

SQL> COMMIT;

Commit complete.

SQL> SPOOL off
SQL> SET echo off
Check the following log file for errors:
D:\app\oracle\cfgtoollogs\catbundle\catbundle_PSU_PROD_APPLY_2018Jul05_12_37_04.log
SQL> QUIT

Check the applied patch in dba_registry_history:

SQL> select * from dba_registry_history;

Catch Me On:- Hariprasath Rajaram

LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter:  https://twitter.com/hariprasathdba

Step by step apply 12c Grid and DB April 2018 PSU to Oracle 12cR1 2 node RAC

Step by step Apply 12c Grid and DB April 2018 PSU to Oracle 12cR1 2 node RACDescription:- 

In this article we are going to see Step by step Apply 12c Grid and DB April 2018 PSU to Oracle 12cR1 2 node RAC

Let start the Demo:-

Download the latest the PSU patch for GRID and ORACLE_HOME :-

Patch 27468957 – Oracle Grid Infrastructure Patch Set Update 12.1.0.2.180417.

The patch 27468957 was the super seeded patch of database PSU patch

Patch 27338041 -Database Patch Set Update 12.1.0.2.180417

Steps to Upgrade the OPATCH UTILITY:-

Step 1:- Check the opatch version and inventory for ORACLE_HOME on both nodes

export ORACLE_SID=prod1
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH

opatch version

opatch lsinventory

Check the opatch version for node 2,

export ORACLE_SID=prod2
export ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH

Step 2:-Check the opatch version and inventory for GRID HOME on both nodes

export ORACLE_SID=+ASM1
export ORACLE_HOME=/u01/app/12.1.02/grid
export PATH=/u01/app/12.1.02/grid/OPatch:$PATH

opatch version

opatch lsinventory

Step 3:- Update the opatch utility

Take the backup of OPatch directory from GRID and ORACLE_HOME on both nodes

Unzip the OPatch downloaded zip into GRID and ORACLE_HOME directory

For Grid home:

$ unzip p6880880_121010_LINUX.zip -d /u01/app/oracle/12.1.0.2/grid

$ /u01/app/oracle/12.1.0.2/grid/OPatch/opatch lsinventory

For Database home:

$ unzip  p6880880_121010_Linux-x86-64.zip -d /u01/app/oracle/product/12.1.0.2/db_1

opatch lsinventory

NODE 1 (rac1) :-

Copy patch p6880880_121010_Linux-x86-64.zip to the node 2(rac2) or Copy the unzipped OPatch folder to the node 2(rac2).

NODE 2 (rac2) :-

Check the new OPatch version in both GRID and ORACLE_HOME on node 2,

After upgrade the OPatch utility on both nodes apply the GRID and ORACLE_HOME PSU patches.

Step 4:- Validation of Oracle Inventory 

opatch lsinventory -detail -oh /u01/app/12.1.0.2/grid

To check the GRID HOME inventory :-

Before beginning patch application, check the consistency of inventory information for GI home and each database home to be patched

To check the ORACLE_HOME inventory :-

Step 5:- Download and Unzip the April 18 PSU Patch

Step 6:- Check Patch Conflict Detection and Resolution :-

For GRID HOME,

When using OPatch 12.2.0.1.5 or later, the following Opatch Option -ocmrf <ocm response file> does not need to be provided.

Now our current OPatch version for GRID and ORACLE_HOME  is 12.2.0.1.13.

export PATH=/u01/app/12.1.0.2/grid/OPatch:$PATH

/u01/app/12.1.0.2/grid/OPatch/opatchauto apply /u01/27468957 -oh /u01/app/12.1.0.2/grid -analyze

For ORACLE HOME,

export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH

/u01/app/oracle/product/12.1.0.2/db_1/OPatch/opatchauto apply /u01/27468957 -oh /u01/app/oracle/product/12.1.0.2/db_1 -analyze

Step 7:- Apply the patch using Opatchauto

opatchauto :-

OPatchauto automatically patch the typical Grid Infrastructure (GI) and RAC home directories with minimal intervention.

In general, when we invoke opatchauto will patch both the GI stack and the database software stack. Since we have mentioned the -oh it will apply the PSU to the specified home.

The main advantage of opatchauto utility was automatically down the CRS and database services and restart the services after apply patching.

To apply a patch using opatchauto,we need to run as a root user.

To patch the GI home and all Oracle RAC database homes of the same version:

# opatchauto apply /u01/27468957

Here,we are going to apply a patch separately for both GRID and ORACLE_HOME in both nodes.

opatchauto for GRID HOME on Node1 :-

export PATH=/u01/app/12.1.0.2/grid/OPatch:$PATH

# /u01/app/12.1.0.2/grid/OPatch/opatchauto apply /u01/27468957 -oh /u01/app/12.1.0.2/grid

opatchauto for ORACLE_HOME on Node 1 :-

export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH

# /u01/app/oracle/product/12.1.0.2/db_1/OPatch/opatchauto apply /u01/27468957 -oh /u01/app/oracle/product/12.1.0.2/db_1

opatchauto for GRID HOME on Node2 :-

export PATH=/u01/app/12.1.0.2/grid/OPatch:$PATH

# /u01/app/12.1.0.2/grid/OPatch/opatchauto apply /u01/27468957 -oh /u01/app/12.1.0.2/grid

opatchauto for ORACLE_HOME on Node 2 :-

export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH

# /u01/app/oracle/product/12.1.0.2/db_1/OPatch/opatchauto apply /u01/27468957 -oh /u01/app/oracle/product/12.1.0.2/db_1

After  the April 2018 PSU patch is applied on both GRID and ORACLE_HOME successfully.

Check the DBA_REGISTRY_SQLPATCH :-

select BUNDLE_SERIES,PATCH_UID,PATCH_ID,
VERSION,ACTION,STATUS,ACTION_TIME ,DESCRIPTION
from dba_registry_sqlpatch;

Catch Me On:- Hariprasath Rajaram

LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter:  https://twitter.com/hariprasathdba

Oracle12c-Step by step How To Applying PSU Patch on Oracle Dataguard Environment

Description:-

In this article we are going to see Oracle12c-Step by step How To Applying PSU Patch on Oracle Dataguard Environment

High Level steps for applying the Patch 

  • Primary site disable the log shipping to the standby database and Stop MRP on standby site
  • Shutdown Standby Database and Listener
  • Apply PSU patch on Standby site
  • Shutdown Primary database and Listener.
  • Apply PSU Patch on Primary Site
  • Enable Log shipping on Primary
  • execute Post installation Scripts (datapatch)
  • Monitor the redo apply from Primary to Standby

Environment Details:-Primary Database Details:
prime> select status,instance_name,database_role,open_mode from v$database,v$Instance;

STATUS INSTANCE_NAME DATABASE_ROLE OPEN_MODE
———— —————- —————- ———–
OPEN            prime                       PRIMARY                   READ WRITE

Standby Database Details:
Stand> select status,instance_name,database_role,open_mode from v$database,v$Instance;

STATUS INSTANCE_NAME DATABASE_ROLE OPEN_MODE
———— —————- —————- ———–
OPEN           stand       PHYSICAL STANDBY          READ ONLY WITH APPLY

Let’s Start the Demo:-

Opatch Version

Oracle recommends that you use the latest released OPatch 12.1 tool      which is available to download and apply the  patch: 6880880 from support.oracle.com or from https://updates.oracle.com/download/6880880.html

Current version of Opatch Tool in our environment 

export PATH=$ORACLE_HOME/OPatch:$PATH

[oracle@primary ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@primary ~]$ opatch version
OPatch Version: 12.1.0.1.3
OPatch succeeded.

Pre-steps:-

install Opatch utility (both Primary & Standby Side)

1. Download the latest Opatch utility from oracle support
[oracle@primary u01]$ ls -lrt
total 424836
drwxrwxr-x. 2 oracle oinstall 16384 Jun 11 23:28 lost+found
drwxrwxr-x. 4 oracle oinstall 4096 Jun 12 01:32 app
-rwxr-xr-x. 1 oracle oinstall 337586889 Jun 15 13:40 p25755742_121020_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle oinstall 97422646 Jun 15 13:40 p6880880_121010_Linux-x86-64.zip

2. Take a backup of older version of OPatch utility under $ORACLE_HOME and unzip the downloaded file
[oracle@primary ~]$ cd $ORACLE_HOME
[oracle@primary db_1]$ mv OPatch OPatch.bkp.15.06.18
[oracle@primary db_1]$ unzip p6880880_121010_Linux-x86-64.zip
cd OPatch
oracle@primary OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.13
OPatch succeeded.

3. Include OPatch in PATH .bash_profile
export PATH=$ORACLE_HOME/OPatch:$PATH

[oracle@primary db_1]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@primary db_1]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, 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.13
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_14-29-03PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-06-15_14-29-03PM.txt
——————————————————————————–
Local Machine Information::
Hostname: primary
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.
There are no Interim patches installed in this Oracle Home.
——————————————————————————–
OPatch succeeded.

Take Backup of ORACLE_HOME (both primary & Standby side) (Rollback plan)

[oracle@primary u01]$ tar -cvf oracle_home_jun1518.tar $ORACLE_HOME

Step1:-Primary site disable the log shipping to the standby database and Stop MRP on standby site

DGMGRL> show configuration
Configuration – hari
Protection Mode: MaxPerformance
Members:
prime – Primary database
stand – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 13 seconds ago)

DGMGRL> edit database prime set state=’LOG-TRANSPORT-OFF’;
Succeeded.

prime> show parameter log_archive_dest_state_2

NAME                                                          TYPE             VALUE
———————— ———– ——-
log_archive_dest_state_2                string         RESE

stand> alter database recover managed standby database cancel;
Database altered.

Step2:-Shutdown Standby Database and Listener

[oracle@standby ~]$ export ORACLE_SID=stand
[oracle@standby ~]$ sqlplus ‘/as sysdba’
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 15 16:39:06 2018
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, OLAP, Advanced Analytics and Real Application Testing options
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@standby ~]$ lsnrctl stop
LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 15-JUN-2018 16:39:44
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.25)(PORT=1539)))
The command completed successfully

Step3:-Apply PSU patch on Standby site

[oracle@standby u01]$ unzip p25755742_121020_Linux-x86-64.zip

[oracle@standby u01]$ ls -lrt
total 424936
drwxrwxr-x. 13 oracle oinstall 4096 Jun 29 2017 25755742
-rw-rw-r–. 1 oracle oinstall 96270 Aug 7 2017 PatchSearch.xml
drwxrwxr-x. 2 oracle oinstall 16384 Jun 11 23:28 lost+found
drwxrwxr-x. 4 oracle oinstall 4096 Jun 12 01:32 app
-rwxr-xr-x. 1 oracle oinstall 337586889 Jun 15 13:41 p25755742_121020_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle oinstall 97422646 Jun 15 13:41 p6880880_121010_Linux-x86-64.zip

[oracle@standby u01]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@standby u01]$ cd 25755742/
[oracle@standby 25755742]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, 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.13
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_16-50-22PM_1.log
Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 19769480 20299023 20831110 21359755 21948354 22291127 23054246 24006101 24732082 25171037 25755742
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 sub-patch ‘19769480’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.util, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20299023’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf.ic, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20831110’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘21359755’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.assistants.server, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Applying sub-patch ‘21948354’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Applying sub-patch ‘22291127’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘23054246’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.install.deinstalltool, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.ctx, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.nlsrtl.rsf, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.ctx.atg, 12.1.0.2.0…
Applying sub-patch ‘24006101’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘24732082’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘25171037’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.jai, 12.1.0.2.0…
Patching component oracle.ordim.server, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.javavm.containers, 12.1.0.2.0…
Applying sub-patch ‘25755742’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] , [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Composite patch 25755742 successfully applied.
Log file location: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_16-50-22PM_1.log
OPatch succeeded.

Step4:-Shutdown Primary database and Listener.

[oracle@primary ~]$ export ORACLE_SID=prime
[oracle@primary ~]$ sqlplus ‘/as sysdba’
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 15 17:02:39 2018
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, OLAP, Advanced Analytics and Real Application Testing options
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@primary ~]$ lsnrctl stop
LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 15-JUN-2018 17:03:26
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.24)(PORT=1539)))
The command completed successfully

Step5:-Apply PSU Patch on Primary Site

[oracle@primary ~]$ cd /u01/25755742/
[oracle@primary 25755742]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@primary 25755742]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, 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.13
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_17-06-26PM_1.log
Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 19769480 20299023 20831110 21359755 21948354 22291127 23054246 24006101 24732082 25171037 25755742
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 sub-patch ‘19769480’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.util, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20299023’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf.ic, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20831110’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘21359755’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.assistants.server, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Applying sub-patch ‘21948354’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Applying sub-patch ‘22291127’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘23054246’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.install.deinstalltool, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.ctx, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.nlsrtl.rsf, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.ctx.atg, 12.1.0.2.0…
Applying sub-patch ‘24006101’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘24732082’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘25171037’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.jai, 12.1.0.2.0…
Patching component oracle.ordim.server, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.javavm.containers, 12.1.0.2.0…
Applying sub-patch ‘25755742’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] , [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Composite patch 25755742 successfully applied.
Log file location: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_17-06-26PM_1.log
OPatch succeeded.

Step6:-Enable Log shipping on Primary

Start the database and listener both side

DGMGRL> edit database prime set state=’ONLINE’;
Succeeded.

Step7:-execute Post installation Scripts (datapatch)

[oracle@primary OPatch]$ ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Fri Jun 15 18:27:13 2018
Copyright (c) 2012, 2016, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_10585_2018_06_15_18_27_13/sqlpatch_invocation.log
Connecting to database…OK
Bootstrapping registry and package to current versions…done
Determining current state…done
Current state of SQL patches:
Bundle series PSU:
ID 170718 in the binary registry and not installed in the SQL registry
Adding patches to installation queue and performing prereq checks…
Installation queue:
Nothing to roll back
The following patches will be applied:
25755742 (DATABASE PATCH SET UPDATE 12.1.0.2.170718)
Installing patches…
Patch installation complete. Total patches installed: 1
Validating logfiles…
Patch 25755742 apply: SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/25755742/21385018/25755742_apply_PRIME_2018Jun15_18_27_37.log (no errors)
SQL Patching tool complete on Fri Jun 15 18:28:34 2018

Step8:-Monitor the redo apply from Primary to Standby

SQL> SELECT ARCH.THREAD# “Thread”, ARCH.SEQUENCE# “Last Sequence Received”,
APPL.SEQUENCE# “Last Sequence Applied”, (ARCH.SEQUENCE# – APPL.SEQUENCE#) “Difference”
FROM
(SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN
(SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
(SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN
(SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE
ARCH.THREAD# = APPL.THREAD#
ORDER BY 1; 2 3 4 5 6 7 8 9 10

Thread Last Sequence Received Last Sequence Applied Difference
———- ———————- ——————— ———-
1                                    18                           18                                            0

Step9:-Opatch Status 

[oracle@primary ~]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@primary ~]$ opatch lsinventory|grep 25755742
Patch 25755742 : applied on Fri Jun 15 17:11:29 IST 2018
Patch description: “Database Patch Set Update : 12.1.0.2.170718 (25755742)”

[oracle@standby 25755742]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@standby 25755742]$ opatch lsinventory|grep 25755742
Patch 25755742 : applied on Fri Jun 15 16:55:37 IST 2018
Patch description: “Database Patch Set Update : 12.1.0.2.170718 (25755742)”

SQL> select PATCH_ID,ACTION_TIME,STATUS,DESCRIPTION from registry$sqlpatch;

PATCH_ID     ACTION_TIME                          STATUS            DESCRIPTION
———- —————————— ————— —
25755742  15-JUN-18 06.28.34.330133 PM SUCCESS DATABASE PATCH SET UPDATE 12.1.0.2.170718

Successfully applied PSU Patch on Dataguard Environment

Catch Me On:- Hariprasath Rajaram

LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter:  https://twitter.com/hariprasathdba

Patching Oracle 18c Database Cloud Service (DBaas) instance

Description:-

  • This article is realted to patching a DBaaS service on the Oracle 18c Cloud Database.
  • We are going to applying patch using dbaascli Tool.
  • it is very easy day-to-day maintenance using automation and tooling

High Level Steps

  • Viewing Available Patches
  • Check Prerequisites.
  • Apply Patch.
  • Rollback Patch.

Log into your Oracle Cloud service account and navigate to the Oracle Database Cloud Service console.


Step1:-Viewing Available Patches

Step2:-Check Prerequisites

select the “Precheck” option.

  • Precheck process is running…


  • Precheck failed due to dbaascli Tool lower version.

  • Login in to root user and check the DBaas Tool Version.

[root@dev18c ~]# rpm -qa|grep -i dbaastools
dbaastools-1.0-1+18.1.4.0.0_180123.1336.x86_64

dbaascli dbpatchm –run -list_tools

  • Using the below command to upgrade the DBaascli Tool.(check the                previous output last line Patchid number we need pass here)
    dbaascli dbpatchm –run -toolsinst -rpmversion=18.1.4.1.0_180523.0000

  • After the upgrade the DBaascli tool and rerun the Precheck menu Button

Step3:-Apply Patch

  • Applying the patch using Patch menu item and start .

  • Patching  process is started & the database service is placed in maintenance mode.

  • Checking Patch logfile from the backend.
    Patch Logfile Location /var/opt/oracle/log/dbpatchm

Step4:-Successfully Applied the Patch.

$ORACLE_HOME/OPatch/opatch lsinventory | grep applied

  • Check from Front-end GUI Mode

  • Check from Database Level.

Reference:-

https://docs.oracle.com/en/cloud/paas/database-dbaas-cloud/csdbi/patch.html

Catch Me On:- Hariprasath Rajaram

LinkedIn:    https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:   https://www.facebook.com/HariPrasathdba
FB Group:   https://www.facebook.com/groups/894402327369506/
FB Page:      https://www.facebook.com/dbahariprasath/?
Twitter:       https://twitter.com/hariprasathdba