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

Patching OEM 13c Release 2 PSU for OMS and Agent

Description:-

In this article we are going to see the patching of OEM Server.

Patching OMS 13c Release 2 (13.2.0.0.181016) System PSU Patch :-

Check OMS server status :

[oracle@oem13c ~]$ cd /u01/app/oracle/middleware/bin
[oracle@oem13c bin]$ ./emctl status oms
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up
BI Publisher Server is Down
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command

Check EM repository database and listener status :

SQL> select name,open_mode from v$database;

NAME      OPEN_MODE
--------- --------------------
EMREPDB   READ WRITE


[oracle@oem13c ~]$ lsnrctl status

LSNRCTL for Linux: Version 12.1.0.2.0 - Production on 12-DEC-2018 23:35:52

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

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.1.0.2.0 - Production
Start Date 05-DEC-2018 20:27:14
Uptime 7 days 3 hr. 8 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/12.1.0.2/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/diag/tnslsnr/oem13c/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oem13c.localdomain.com)(PORT=1521)))
Services Summary...
Service "emrepdb" has 1 instance(s).
Instance "emrepdb", status READY, has 1 handler(s) for this service...
Service "emrepdbXDB" has 1 instance(s).
Instance "emrepdb", status READY, has 1 handler(s) for this service...
The command completed successfully

Check Opatch and OMSPatcher version :

[oracle@oem13c]$ export ORACLE_HOME=/u01/app/oracle/middleware

[oracle@oem13c OPatch]$ cd /u01/app/oracle/middleware/OPatch

[oracle@oem13c OPatch]$ ./opatch version
OPatch Version: 13.8.0.0.0
OPatch succeeded.

[oracle@oem13c]$ /u01/app/oracle/middleware/OMSPatcher/omspatcher version
OMSPatcher Version: 13.8.0.0.0
OPlan Version: 12.1.0.2.2
OsysModel build: Mon Dec 21 18:31:52 PST 2015

OMSPatcher succeeded.

Upgrade to latest Opatch version :

Download Link : OPatch version 13.9.3.3.0 for EMCC 13.x customers Only (not for FMW 12c) (Patch)

[oracle@oem13c ~]$ cd $ORACLE_HOME

[oracle@oem13c middleware]$ mv OPatch/ OPatch_bkp

[oracle@oem13c u01]$ unzip p6880880_139000_Generic.zip
Archive: p6880880_139000_Generic.zip
creating: 6880880/
inflating: 6880880/README.txt
inflating: 6880880/opatch_generic.jar
inflating: 6880880/version.txt

OPatch 13.9 in EM13c required the latest version of JDK. So download the latest JDK and install on my OMS Server.Copy & Paste of an OPatch directory is no more possible anymore.

Install JDK software:

Check Java version,

[oracle@oem13c u01]$ java -version
java version "1.7.0_09-icedtea"
OpenJDK Runtime Environment (rhel-2.3.4.1.0.1.el6_3-x86_64)
OpenJDK 64-Bit Server VM (build 23.2-b09, mixed mode)

Update JDK version,

Download latest  Java(TM) SE Runtime Environment 1.8 

[root@oem13c u01]# rpm -ivh jdk-8u181-linux-x64.rpm
Preparing... ########################################### [100%]
1:jdk1.8 ########################################### [100%]
Unpacking JAR files...
tools.jar...
plugin.jar...
javaws.jar...
deploy.jar...
rt.jar...
jsse.jar...
charsets.jar...
localedata.jar...

[root@oem13c u01]# java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Install latest Opatch 13.9.3.3.0 :

[oracle@oem13c ~]$ java -jar /u01/6880880/opatch_generic.jar -silent oracle_home=$ORACLE_HOME
Launcher log file is /tmp/OraInstall2018-12-13_04-10-52AM/launcher2018-12-13_04-10-52AM.log.
Extracting the installer . . . . Done
Checking if CPU speed is above 300 MHz. Actual 3192.679 MHz Passed
Checking swap space: must be greater than 512 MB. Actual 5999 MB Passed
Checking if this platform requires a 64-bit JVM. Actual 64 Passed (64-bit not required)
Checking temp space: must be greater than 300 MB. Actual 8017 MB Passed
Preparing to launch the Oracle Universal Installer from /tmp/OraInstall2018-12-13_04-10-52AM
Installation Summary

Disk Space : Required 36 MB, Available 14,557 MB
Feature Sets to Install:
Next Generation Install Core 13.9.1.0.3
Next Generation Install Component Stager 13.9.1.0.3
Oracle XDK JRF XMLParser 12.1.3.0.0
OPatch 13.9.3.3.0
OPatch Auto OPlan 13.9.1.0.4
Session log file is /tmp/OraInstall2018-12-13_04-10-52AM/install2018-12-13_04-10-52AM.log

Loading products list. Please wait.
1%
40%

Loading products. Please wait...

Check latest opatch version :

[oracle@oem13c ~]$ export ORACLE_HOME=/u01/app/oracle/middleware/
[oracle@oem13c ~]$ cd /u01/app/oracle/middleware/OPatch
[oracle@oem13c OPatch]$ ./opatch version
OPatch Version: 13.9.3.3.0

OPatch succeeded.

Upgrade to latest OMSPatcher version :

Download Link : OMSPatcher patch of version 13.8.0.0.3 for Enterprise Manager Cloud Control 13.2.0.0.0 (Patch)

[oracle@oem13c ~]$ cd $ORACLE_HOME
[oracle@oem13c middleware]$ mv OMSPatcher/ OMSPatcher_bkp
[oracle@oem13c middleware]$ unzip /u01/p19999993_132000_Generic.zip -d $ORACLE_HOME
Archive: /u01/p19999993_132000_Generic.zip
creating: /u01/app/oracle/middleware/OMSPatcher/
inflating: /u01/app/oracle/middleware/OMSPatcher/omspatcher.bat
creating: /u01/app/oracle/middleware/OMSPatcher/jlib/
inflating: /u01/app/oracle/middleware/OMSPatcher/jlib/omspatcher.jar
inflating: /u01/app/oracle/middleware/OMSPatcher/jlib/oracle.omspatcher.classpath.jar
inflating: /u01/app/oracle/middleware/OMSPatcher/jlib/oracle.omspatcher.classpath.unix.jar
inflating: /u01/app/oracle/middleware/OMSPatcher/jlib/oracle.omspatcher.classpath.windows.jar
creating: /u01/app/oracle/middleware/OMSPatcher/scripts/
creating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/
creating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/oms_child_scripts/
inflating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_jvm_discovery
inflating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_jvm_discovery.bat
inflating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_wls
inflating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/oms_child_scripts/omspatcher_wls.bat
inflating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/omspatcher
inflating: /u01/app/oracle/middleware/OMSPatcher/scripts/oms/omspatcher.bat
creating: /u01/app/oracle/middleware/OMSPatcher/wlskeys/
inflating: /u01/app/oracle/middleware/OMSPatcher/wlskeys/createkeys.cmd
inflating: /u01/app/oracle/middleware/OMSPatcher/wlskeys/createkeys.sh
creating: /u01/app/oracle/middleware/OMSPatcher/oms/
inflating: /u01/app/oracle/middleware/OMSPatcher/oms/generateMultiOMSPatchingScripts.pl
inflating: /u01/app/oracle/middleware/OMSPatcher/omspatcher
inflating: /u01/app/oracle/middleware/readme.txt
inflating: /u01/app/oracle/middleware/PatchSearch.xml

[oracle@oem13c OMSPatcher]$ /u01/app/oracle/middleware/OMSPatcher/omspatcher version
OMSPatcher Version: 13.8.0.0.3
OPlan Version: 12.1.0.2.2
OsysModel build: Mon Dec 21 18:31:52 PST 2015

OMSPatcher succeeded.

Download OMS System patch :

Download Link : Patch 28717501: EMBP Patch Set Update 13.2.0.0.181016

Move the downloaded system PSU patch to OMS server.

[oracle@oem13c hgfs]$ cd /u01/
[oracle@oem13c u01]$ ls -lrt
total 40744
drwxr-xr-x 7 oracle oinstall 4096 Jul 11 2014 database
drwxrwxr-x. 2 oracle oinstall 16384 Jul 13 01:20 lost+found
drwxrwxr-x. 5 oracle oinstall 4096 Aug 29 20:51 app
-rwxrw-rw- 1 oracle oinstall 41694955 Dec 13 00:20 p28717501_132000_Generic.zip
[oracle@oem13c u01]$ unzip p28717501_132000_Generic.zip


[oracle@oem13c u01]$ cd 28717501/
[oracle@oem13c 28717501]$ ls -lrt
total 60
drwxr-x--- 2 oracle oinstall 4096 Oct 1 15:20 automation
drwxr-x--- 4 oracle oinstall 4096 Oct 1 16:02 28717501
-rw-rw-r-- 1 oracle oinstall 1198 Oct 1 17:57 bundle.xml
-rw-rw-r-- 1 oracle oinstall 24 Oct 16 12:01 README.txt
-rw-rw-r-- 1 oracle oinstall 43441 Oct 16 12:01 README.html

Create Property File :

[oracle@oem13c ~]$ /u01/app/oracle/middleware/OMSPatcher/wlskeys/createkeys.sh –oh /u01/app/oracle/middleware/bin -location /u01/
Please enter weblogic admin server username: weblogic
Please enter weblogic admin server password:
Warning: weblogic.Admin is deprecated and will be removed in a future release. WLST should be used instead of weblogic.Admin.
Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Creating new key...

Trying to get configuration and key files for the given inputs...
This operation will take some time. Please wait for updates...
User configuration file created: /u01/config
User key file created: /u01/key
'createkeys' succeeded.

[oracle@oem13c ~]$ cd /u01/
[oracle@oem13c u01]$ ls -lrt
total 40780
drwxr-xr-x 7 oracle oinstall 4096 Jul 11 2014 database
drwxrwxr-x. 2 oracle oinstall 16384 Jul 13 01:20 lost+found
drwxrwxr-x. 5 oracle oinstall 4096 Aug 29 20:51 app
drwxr-x--- 4 oracle oinstall 4096 Oct 1 15:20 28717501
-rw-rw-r-- 1 oracle oinstall 23484 Oct 16 15:22 PatchSearch.xml
-rwxrw-rw- 1 oracle oinstall 41694955 Dec 13 00:20 p28717501_132000_Generic.zip
-rw-r--r-- 1 oracle oinstall 64 Dec 13 01:06 key
-rw-r--r-- 1 oracle oinstall 227 Dec 13 01:06 config

[oracle@oem13c u01]$ more config
#WebLogic User Configuration File; 2
#Thu Dec 13 01:06:56 IST 2018
weblogic.management.username={AES}4AV4pbWy6lnveCW0AVBu0vvIsBJl8vuhmLkdufvRHgA\=
weblogic.management.password={AES}/k7I8g7RuDHcSWYz90mJkml8ohQ+fLVrA1ZeV+/3934\=

Get Admin Server URL,

[oracle@oem13c]$ export ORACLE_HOME=/u01/app/oracle/middleware
[oracle@oem13c bi]$ cd /u01/app/oracle/middleware/bin/
[oracle@oem13c bin]$ emctl status oms -details
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Enter Enterprise Manager Root (SYSMAN) Password :
Console Server Host : oem13c.localdomain.com
HTTP Console Port : 7788
HTTPS Console Port : 7802
HTTP Upload Port : 4889
HTTPS Upload Port : 4903
EM Instance Home : /u01/app/oracle/gc_inst/em/EMGC_OMS1
OMS Log Directory Location : /u01/app/oracle/gc_inst/em/EMGC_OMS1/sysman/log
OMS is not configured with SLB or virtual hostname
Agent Upload is locked.
OMS Console is locked.
Active CA ID: 1
Console URL: https://oem13c.localdomain.com:7802/em
Upload URL: https://oem13c.localdomain.com:4903/empbs/upload

WLS Domain Information
Domain Name : GCDomain
Admin Server Host : oem13c.localdomain.com
Admin Server HTTPS Port: 7102
Admin Server is RUNNING

Oracle Management Server Information
Managed Server Instance Name: EMGC_OMS1
Oracle Management Server Instance Host: oem13c.localdomain.com
WebTier is Up
Oracle Management Server is Up
JVMD Engine is Up

BI Publisher Server Information
BI Publisher Managed Server Name: BIP
BI Publisher Server is Down
BI Publisher is disabled, to enable BI Publisher on this host, use the 'emctl config oms -enable_bip' command

Create the property file with the following entries:

Syntax :

AdminServerURL=t3s://<host address from where admin server is running>:<port of the admin server>
AdminConfigFile=<'config' file location>
AdminKeyFile=<'key' file location>

Example :

[oracle@oem13c u01]$ vi propertyfile
AdminServerURL=t3s://oem13c.localdomain.com:7102
AdminConfigFile=/u01/config
AdminKeyFile=/u01/key

Analyze OMS System patch :

[oracle@oem13c 28717501]$ /u01/app/oracle/middleware/OMSPatcher/omspatcher apply -analyze -property_file /u01/propertyfile

OMSPatcher Automation Tool
Copyright (c) 2017, Oracle Corporation. All rights reserved.

OMSPatcher version : 13.8.0.0.3
OUI version : 13.9.1.0.0
Running from : /u01/app/oracle/middleware
Log file location : /u01/app/oracle/middleware/cfgtoollogs/omspatcher/opatch2018-12-13_04-58-11AM_1.log

OMSPatcher log file: /u01/app/oracle/middleware/cfgtoollogs/omspatcher/28717501/omspatcher_2018-12-13_04-58-24AM_analyze.log

Configuration Validation: Success

Running apply prerequisite checks for sub-patch(es) "28717501" and Oracle Home "/u01/app/oracle/middleware"...
Sub-patch(es) "28717501" are successfully analyzed for Oracle Home "/u01/app/oracle/middleware"

Complete Summary
================

All log file names referenced below can be accessed from the directory "/u01/app/oracle/middleware/cfgtoollogs/omspatcher/2018-12-13_04-58-11AM_SystemPatch_28717501_1"

Prerequisites analysis summary:
-------------------------------

The following sub-patch(es) are applicable:

Featureset Sub-patches Log file
---------- ----------- --------
oracle.sysman.top.oms 28717501 28717501_opatch2018-12-13_04-58-23AM_1.log

Log file location: /u01/app/oracle/middleware/cfgtoollogs/omspatcher/28717501/omspatcher_2018-12-13_04-58-24AM_analyze.log

OMSPatcher succeeded.

Take backup of your OEM environment before you begin OMS patching.

Shut down OMS services :

[oracle@oem13c ~]$ cd /u01/app/oracle/middleware/bin/
[oracle@oem13c bin]$ ./emctl stop oms
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
JVMD Engine is Down

Apply OMS System Patch to OMS 13cR2 :

[oracle@oem13c 28717501]$ /u01/app/oracle/middleware/OMSPatcher/omspatcher apply -property_file /u01/propertyfile 

OMSPatcher Automation Tool
Copyright (c) 2017, Oracle Corporation. All rights reserved.

OMSPatcher version : 13.8.0.0.3
OUI version : 13.9.1.0.0
Running from : /u01/app/oracle/middleware
Log file location : /u01/app/oracle/middleware/cfgtoollogs/omspatcher/opatch2018-12-13_05-11-14AM_1.log

OMSPatcher log file: /u01/app/oracle/middleware/cfgtoollogs/omspatcher/28717501/omspatcher_2018-12-13_05-11-26AM_deploy.log

Configuration Validation: Success

Running apply prerequisite checks for sub-patch(es) "28717501" and Oracle Home "/u01/app/oracle/middleware"...
Sub-patch(es) "28717501" are successfully analyzed for Oracle Home "/u01/app/oracle/middleware"

To continue, OMSPatcher will do the following:
[Patch and deploy artifacts] : Apply sub-patch(es) [ 28717501 ]
Apply RCU artifact with patch "/u01/app/oracle/middleware/.omspatcher_storage/28717501_Oct_1_2018_02_47_12/original_patch";
Register MRS artifact "targetType";
Register MRS artifact "storeTargetType";
Register MRS artifact "default_collection";
Register MRS artifact "swlib";
Register MRS artifact "jobTypes"

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

Applying sub-patch(es) "28717501"
.
.
.

Complete Summary
================

All log file names referenced below can be accessed from the directory "/u01/app/oracle/middleware/cfgtoollogs/omspatcher/2018-12-13_05-11-14AM_SystemPatch_28717501_1"

Patching summary:
-----------------

Binaries of the following sub-patch(es) have been applied successfully:

                        Featureset   Sub-patches                                     Log file
                        ----------   -----------                                     --------
  oracle.sysman.top.oms_13.2.0.0.0      28717501   28717501_opatch2018-12-13_05-11-25AM_1.log

Deployment summary:
-------------------

The following artifact(s) have been successfully deployed:

               Artifacts                                                      Log file
               ---------                                                      --------
                     SQL       rcu_applypatch_original_patch_2018-12-13_05-18-16AM.log
          MRS-targetType           emctl_register_targetType_2018-12-13_05-21-13AM.log
          MRS-targetType           emctl_register_targetType_2018-12-13_05-21-29AM.log
     MRS-storeTargetType      emctl_register_storeTargetType_2018-12-13_05-21-39AM.log
     MRS-storeTargetType      emctl_register_storeTargetType_2018-12-13_05-21-51AM.log
  MRS-default_collection   emctl_register_default_collection_2018-12-13_05-22-02AM.log
  MRS-default_collection   emctl_register_default_collection_2018-12-13_05-22-10AM.log
               MRS-swlib                emctl_register_swlib_2018-12-13_05-22-17AM.log
               MRS-swlib                emctl_register_swlib_2018-12-13_05-22-31AM.log
               MRS-swlib                emctl_register_swlib_2018-12-13_05-22-41AM.log
            MRS-jobTypes             emctl_register_jobTypes_2018-12-13_05-23-01AM.log
            MRS-jobTypes             emctl_register_jobTypes_2018-12-13_05-23-09AM.log
            MRS-jobTypes             emctl_register_jobTypes_2018-12-13_05-23-17AM.log
            MRS-jobTypes             emctl_register_jobTypes_2018-12-13_05-23-30AM.log


Log file location: /u01/app/oracle/middleware/cfgtoollogs/omspatcher/28717501/omspatcher_2018-12-13_05-11-26AM_deploy.log

OMSPatcher succeeded.

Start OMS services :

[oracle@oem13c bin]$ ./emctl start oms
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Starting Oracle Management Server...
WebTier Successfully Started
Oracle Management Server Successfully Started
Oracle Management Server is Up
JVMD Engine is Up

 

Apply Oracle® Management Agent 13c Release 2 (13.2.0.0.0)  Patch :-

Download Agent patch from oracle support :

Oracle® Management Agent 13c Release 2 patch 28947175 

Check latest opatch version :

[oracle@oem13c ~]$ cd /u01/app/oracle/agent/agent_13.2.0.0.0/OPatch
[oracle@oem13c OPatch]$ ./opatch version
OPatch Version: 13.9.3.3.0

OPatch succeeded.

Verify the Oracle Inventory :

[oracle@oem13c ~]$ cd /u01/app/oracle/agent/agent_13.2.0.0.0/OPatch
[oracle@oem13c OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 13.9.3.3.0
Copyright (c) 2018, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/agent/agent_13.2.0.0.0
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/agent/agent_13.2.0.0.0/oraInst.loc
OPatch version    : 13.9.3.3.0
OUI version       : 13.8.0.0.0
Log file location : /u01/app/oracle/agent/agent_13.2.0.0.0/cfgtoollogs/opatch/opatch2018-12-19_01-04-23AM_1.log

OPatch detects the Middleware Home as "/u01/app/oracle/agent"

Lsinventory Output file location : /u01/app/oracle/agent/agent_13.2.0.0.0/cfgtoollogs/opatch/lsinv/lsinventory2018-12-19_01-04-23AM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: oem13c.localdomain.com
ARU platform id: 226
ARU platform description:: Linux_AMD64Interim patches (1) :

Patch  24470104     : applied on Wed Aug 29 23:42:54 IST 2018
Unique Patch ID:  -1471524899
   Created on 18 Aug 2016, 05:54:59 hrs PST8PDT
   Bugs fixed:
     24011099, 19030178
-----------------------------------------------------------
OPatch succeeded.

Stop the EM agent :-

[oracle@oem13c ~]$ cd /u01/app/oracle/agent/agent_inst/bin/
[oracle@oem13c bin]$ emctl stop agent
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Stopping agent ... stopped.

Unzip the patch zip file :-

[oracle@oem13c u01]$ unzip p28947175_132200_Generic.zip
Archive: p28947175_132200_Generic.zip
creating: 28947175/
creating: 28947175/files/
creating: 28947175/files/oracle.sysman.db.agent.plugin/
.
.

Apply agent patch :

[oracle@oem13c 28947175]$ /u01/app/oracle/agent/agent_13.2.0.0.0/OPatch/opatch napply
Oracle Interim Patch Installer version 13.9.3.3.0
Copyright (c) 2018, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/agent/agent_13.2.0.0.0
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/agent/agent_13.2.0.0.0/oraInst.loc
OPatch version : 13.9.3.3.0
OUI version : 13.8.0.0.0
Log file location : /u01/app/oracle/agent/agent_13.2.0.0.0/cfgtoollogs/opatch/opatch2018-12-19_02-08-29AM_1.log

OPatch detects the Middleware Home as "/u01/app/oracle/agent"

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

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Backing up files...
Applying interim patch '28947175' to OH '/u01/app/oracle/agent/agent_13.2.0.0.0'

Patching component oracle.sysman.agent.ic, 13.2.0.0.0...
Applying interim patch '28947175' to OH '/u01/app/oracle/agent/agent_13.2.0.0.0'

Patching component oracle.sysman.top.agent, 13.2.0.0.0...
Applying interim patch '27160866' to OH '/u01/app/oracle/agent/agent_13.2.0.0.0'

Patching component oracle.sysman.top.agent, 13.2.0.0.0...
Patches 25610702,27160866 successfully applied.
Log file location: /u01/app/oracle/agent/agent_13.2.0.0.0/cfgtoollogs/opatch/opatch2018-12-19_12-35-50PM_1.log

OPatch succeeded.

Start the agent :

[oracle@oem13c bin]$ emctl start agent
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
Starting agent ............................................. started.

[oracle@oem13c bin]$ emctl status agent
Oracle Enterprise Manager Cloud Control 13c Release 2
Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 13.2.0.0.0
OMS Version : 13.2.0.0.0
Protocol Version : 12.1.0.1.0
Agent Home : /u01/app/oracle/agent/agent_inst
Agent Log Directory : /u01/app/oracle/agent/agent_inst/sysman/log
Agent Binaries : /u01/app/oracle/agent/agent_13.2.0.0.0
Core JAR Location : /u01/app/oracle/agent/agent_13.2.0.0.0/jlib
Agent Process ID : 49584
Parent Process ID : 49202
Agent URL : https://oem13c.localdomain.com:3872/emd/main/
Local Agent URL in NAT : https://oem13c.localdomain.com:3872/emd/main/
Repository URL : https://oem13c.localdomain.com:4903/empbs/upload
Started at : 2018-12-19 18:48:51
Started by user : oracle
Operating System : Linux version 2.6.39-400.17.1.el6uek.x86_64 (amd64)
Number of Targets : 28
Last Reload : (none)
Last successful upload : 2018-12-19 18:49:46
Last attempted upload : 2018-12-19 18:49:46
Total Megabytes of XML files uploaded so far : 0.02
Number of XML files pending upload : 0
Size of XML files pending upload(MB) : 0
Available disk space on upload filesystem : 27.24%
Collection Status : Collections enabled
Heartbeat Status : Ok
Last attempted heartbeat to OMS : 2018-12-19 18:49:16
Last successful heartbeat to OMS : 2018-12-19 18:49:16
Next scheduled heartbeat to OMS : 2018-12-19 18:50:20

Verify the patch installation :

[oracle@oem13c 28831903]$ opatch lspatches
28947175;EM-AGENT Patch 13.2.0.0.181016
28831903

 

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 Apply Rolling PSU Patch In Oracle Database 12c RAC Environment

Rolling upgrade patch :-

  • The rolling upgrade refers to upgrading different databases or different instances of the same database (in a Real Application Clusters environment) one at a time, without stopping the database.
  • The advantage of a RAC rolling upgrade is that it enables at least some instances of the RAC installation to be available during the scheduled outage required for patch upgrades. Only the RAC instance that is currently being patched needs to be brought down. The other instances can continue to remain available. This means that the impact on the application downtime required for such scheduled outages is further minimized. Oracle’s opatch utility enables the user to apply the patch successively to the different instances of the RAC installation.
  • Rolling upgrade of patches is currently available for one-off patches and PSU patches.
  • Rolling patch upgrades are not available for deployments where the Oracle Database software is shared across the different nodes.
  • Before Opatchauto utility, we need to manually down the instance and cluster related services(prepatch.sh) before applying rolling patch.
  • The GI System patch includes updates for both the Clusterware home and Database home that can be applied in a rolling fashion.
  • This patch is Oracle RAC Rolling Installable has to be mentioned in README.html.

Step by step apply Rolling PSU Patch in Oracle Database 12c RAC environment :-

Description:- 

In this article we are going to see Step by step Apply Rolling PSU Patch in Oracle Database 12c RAC environment

Let start the Demo:-

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

Patch 28349311 –  GRID INFRASTRUCTURE PATCH SET UPDATE 12.1.0.2.181016

The patch 28349311 was the super seeded patch of database PSU patch.

The above PSU patch is rolling applicable and so involves minimal downtime.

Database Env :-

For Node 1,

prod()
{
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export ORACLE_HOME
ORACLE_BASE=/oracle/app/oracle
export ORACLE_BASE
ORACLE_SID=prod1
export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:.
export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
export LIBPATH
TNS_ADMIN=${ORACLE_HOME}/network/admin
export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH:.
export PATH
}

For Node 2,

prod()
{
ORACLE_HOME=/u01/app/oracle/product/12.1.0.2/db_1
export ORACLE_HOME
ORACLE_BASE=/oracle/app/oracle
export ORACLE_BASE
ORACLE_SID=prod2
export ORACLE_SID
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib:.
export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib32:$ORACLE_HOME/lib:/usr/lib:/lib
export LIBPATH
TNS_ADMIN=${ORACLE_HOME}/network/admin
export TNS_ADMIN
PATH=$ORACLE_HOME/bin:$PATH:.
export PATH
}

Grid Env :-

For Node 1,

grid()
{
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/12.1.0.2/grid; export ORACLE_HOME
export ORACLE_SID=+ASM1
ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
SQLPATH=/u01/app/oracle/scripts/sql:/u01/app/12.1.0.2/grid/rdbms/admin:/u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin; export SQLPATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
}

For Node 2,

grid()
{
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/12.1.0.2/grid; export ORACLE_HOME
export ORACLE_SID=+ASM2
ORACLE_TERM=xterm; export ORACLE_TERM
BASE_PATH=/usr/sbin:$PATH; export BASE_PATH
SQLPATH=/u01/app/oracle/scripts/sql:/u01/app/12.1.0.2/grid/rdbms/admin:/u01/app/oracle/product/12.1.0.2/db_1/rdbms/admin; export SQLPATH
PATH=$ORACLE_HOME/bin:$BASE_PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
}

Steps to Upgrade the OPATCH UTILITY:-

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

For Node 1,

opatch version

opatch lsinventory

For Node 2,

opatch version

opatch lsinventory

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

For Node 1,

opatch version

opatch lsinventory

For Node 2,

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:

For Database home:

For Node 1,

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

For Node 2,

After copying to Node 2,check the new OPatch version in both GRID and ORACLE_HOME,

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

Step 4:- Validation of Oracle Inventory 

To check the GRID HOME inventory :-

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

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 :-

opatch lsinventory -detail -oh $ORACLE_HOME

Step 5:- Download and Unzip the Oct 18 PSU Rolling 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.16.

As root user,

/u01/app/12.1.0.2/grid/OPatch/opatchauto apply /mnt/hgfs/E/roll_patch/28349311 -analyze -oh /u01/app/12.1.0.2/grid

For ORACLE HOME,

Step 7:- Apply the patch using 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/28349311

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

opatchauto for GRID HOME on Node1 :-

/u01/app/12.1.0.2/grid/OPatch/opatchauto apply /mnt/hgfs/E/roll_patch/28349311 -oh /u01/app/12.1.0.2/grid

opatchauto for ORACLE_HOME on Node 1 :-

/u01/app/oracle/product/12.1.0.2/db_1/OPatch/opatchauto apply /mnt/hgfs/E/roll_patch/27468957 -oh/u01/app/oracle/product/12.1.0.2/db_1

Follow the same Step 7 for applying patch using opatchauto for GRID HOME and ORACLE_HOME  in Node 2.

Rolling PSU patch (Oct 2018)  is applied on both GRID and ORACLE_HOME successfully.

DATAPATCH :-

  •  Datapatch is the new tool that enables automation of post-patch SQL actions for RDBMS patches. So, In 12c you don’t use carbundle psu apply now this is all done using datapatch.
  • OPatchAuto calls datapatch to complete post patch actions upon installation of the binary patch and restart of the database.

Step 8:- To check the Oct PSU 2018 applied to your database using the following SQL statement,

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

 

Step-by-Step One Node Rac Applying Psu Patch on 12c Grid and DB Home

Description:-

As we already seen how to configure Oracle One node RAC in 12cR1 and the relocation of the instance from one node to another node. In this article, let us apply the July’18 PSU patch to the same environment.

For Oracle One Node RAC configuration, please click here. Below is the configuration of the environment.

High Level steps for applying the Patch:-

  • Current OPatch Version
  • Upgrade Opatch utility
  • Prepare for Patching
  • Applying Patch
  • Patch Verification

Current OPatch Version:-

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

$ export PATH=$ORACLE_HOME/OPatch:$PATH
$ $ORACLE_HOME/OPatch/opatch version
OPatch Version: 12.1.0.1.3

OPatch succeeded.

From the above output,the opatch version is 12.1.0.1.3. But as per our README document, the minimum OPatch utility version shoul be 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

Backup the OPatch directory as root user for GRID_HOME and oracle user for ORACLE_HOME(Database) in both the nodes of the cluster. Otherwise, if we try to backup as oracle user in GRID_HOME, we will receive permission issues.

GRID_HOME:
$ su - root
$ cd /oradb/app/12.1.0.2/grid/
$ mv OPatch/ OPatch_bkp
$ unzip <PATH_TO_PATCH>/p6880880_122010_Linux-x86-64.zip -d .
$ chown -R oracle:oinstall OPatch
$ chmod -R 755 OPatch

ORACLE_HOME:
$ su - oracle
$ cd /oradb/app/oracle/product/12.1.0.2/db_1
$ mv OPatch/ OPatch_bkp
$ unzip <PATH_TO_PATCH>/p6880880_122010_Linux-x86-64.zip -d .
$ chmod -R 755 OPatch

Now, as oracle user verify the OPatch utility version.

GRID_HOME:-(Both Nodes)

$ export ORACLE_HOME=/oradb/app/12.1.0.2/grid
$ export PATH=$ORACLE_HOME/OPatch:$PATH
$ opatch version
OPatch Version: 12.2.0.1.14

OPatch succeeded.

ORACLE_HOME:-(Both Nodes)

$ export ORACLE_HOME=/oradb/app/oracle/product/12.1.0.2/db_1
$ export PATH=$ORACLE_HOME/OPatch:$PATH
$ opatch version
OPatch Version: 12.2.0.1.14

OPatch succeeded.

Prepare for Patching:-

Step 3:- Preparing Node 1 to apply the PSU Patch

Now, login as root user and set the environmental variables

Applying Patch:-

Step 4:- Navigate to the patch location and follow the below steps to apply the patch.

$ cd <PATH_TO_PATCH>
$ unzip p27967747_121020_Linux-x86-64.zip
$ cd 27967747
$ $ORACLE_HOME/OPatch/opatchauto apply ./

OPatchauto session is initiated at Wed Sep 26 02:39:52 2018

System initialization log file is /oradb/app/12.1.0.2/grid/cfgtoollogs/opatchautodb/systemconfig2018-09-26_02-40-10AM.log.

Session log file is /oradb/app/12.1.0.2/grid/cfgtoollogs/opatchauto/opatchauto2018-09-26_02-41-29AM.log
The id for this session is WYWB

Executing OPatch prereq operations to verify patch applicability on home /oradb/app/12.1.0.2/grid

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

Patch applicability verified successfully on home /oradb/app/12.1.0.2/grid

Verifying SQL patch applicability on home /oradb/app/oracle/product/12.1.0.2/db_1
SQL patch applicability verified successfully on home /oradb/app/oracle/product/12.1.0.2/db_1

Preparing to bring down database service on home /oradb/app/oracle/product/12.1.0.2/db_1

WARNING: The service ORCL.oracledbwr.com configured on orcl will not be switched as it is not configured to run on any other node(s).
Successfully prepared home /oradb/app/oracle/product/12.1.0.2/db_1 to bring down database service

Relocating RACOne home before patching on home /oradb/app/oracle/product/12.1.0.2/db_1
Relocated RACOne home before patching on home /oradb/app/oracle/product/12.1.0.2/db_1

Bringing down CRS service on home /oradb/app/12.1.0.2/grid
Prepatch operation log file location: /oradb/app/12.1.0.2/grid/cfgtoollogs/crsconfig/crspatch_prodrac101_2018-09-26_02-49-04AM.log
CRS service brought down successfully on home /oradb/app/12.1.0.2/grid

Performing prepatch operation on home /oradb/app/oracle/product/12.1.0.2/db_1
Perpatch operation completed successfully on home /oradb/app/oracle/product/12.1.0.2/db_1

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

Performing postpatch operation on home /oradb/app/oracle/product/12.1.0.2/db_1
Postpatch operation completed successfully on home /oradb/app/oracle/product/12.1.0.2/db_1


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

Starting CRS service on home /oradb/app/12.1.0.2/grid
Postpatch operation log file location: /oradb/app/12.1.0.2/grid/cfgtoollogs/crsconfig/crspatch_prodrac101_2018-09-26_03-42-46AM.log
CRS service started successfully on home /oradb/app/12.1.0.2/grid

Relocating back RACOne to home /oradb/app/oracle/product/12.1.0.2/db_1
Relocated back RACOne home successfully to home /oradb/app/oracle/product/12.1.0.2/db_1


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


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

OPatchAuto successful.

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

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

Host:prodrac101
RAC Home:/oradb/app/oracle/product/12.1.0.2/db_1
Version:12.1.0.2.0
Summary:

==Following patches were SKIPPED:

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/26983807
Reason: This patch is not applicable to this specified target type - "rac_database"

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762277
Reason: This patch is not applicable to this specified target type - "rac_database"


==Following patches were SUCCESSFULLY applied:

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27547329
Log: /oradb/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_02-55-50AM_1.log

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762253
Log: /oradb/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_02-55-50AM_1.log


Host:prodrac101
CRS Home:/oradb/app/12.1.0.2/grid
Version:12.1.0.2.0
Summary:

==Following patches were SUCCESSFULLY applied:

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/26983807
Log: /oradb/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27547329
Log: /oradb/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762253
Log: /oradb/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log

Patch: /mnt/hgfs/shared/soft/12102/July18_PSU/27967747/27762277
Log: /oradb/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-09-26_03-08-36AM_1.log

OPatchauto session completed at Wed Sep 26 04:03:09 2018
Time taken to complete the session 83 minutes, 17 seconds

Patch Verification:-

Step 5:- Once the patch has been applied successfully, verify it in the database like below.

$ sqlplus / as sysdba
SQL> set serveroutput on
SQL> exec dbms_qopatch.get_sqlpatch_status;

Patch Id : 27547329
Action : APPLY
Action Time : 26-SEP-2018 04:03:06
Description : DATABASE PATCH SET UPDATE 12.1.0.2.180717
Logfile :
/oradb/app/oracle/cfgtoollogs/sqlpatch/27547329/22280349/27547329_apply_ORCL_201
8Sep26_04_00_51.log
Status : SUCCESS

PL/SQL procedure successfully completed.

Similarly, follow the same steps to apply the patch in Node 2.

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 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 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

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