Database 18c Patch

As of the Release date (17-Apr-2018), the only Oracle Database 18 software that is available is 18.1.0 for on-premise Exadata. Therefore, the following patches for Oracle Database 18 are only for on-premise Exadata systems that are running Oracle Database 18.1.0.

More Info: Database 18 Proactive Patch Information (Doc ID 2369376.1)

OPatch Utility Information

You must use the OPatch utility version 12.2.0.1.13 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.

[oracle@rac1 ~]$ export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
[oracle@rac1 ~]$ opatch version
OPatch Version: 12.2.0.1.13

OPatch succeeded.
[oracle@rac1 ~]$ opatchauto version
Oracle OPatchAuto Version 13.9.3.0.0
Copyright (c) 2016, Oracle Corporation. All rights reserved.

1. OPatchAuto version 13.9.3.0.0
2. OpatchautoDB version 12.2.0.1.13

[oracle@rac1 ~]$

Patch Information

Grid Infrastructure Apr 2018 Release Update 18.2.0.0.180417 patches are cumulative. That is, the content of all previous Database bundles is included in the latest Database bundle patch.

To install the Grid Infrastructure Apr 2018 Release Update 18.2.0.0.180417 patch, the Grid home must have the 18.1 Database installed.

Checking the Production Version

[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 Production on Wed Apr 25 01:16:42 2018
Version 18.1.0.0.0

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

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

SQL> select instance_name,version from v$instance;

INSTANCE_NAME VERSION
---------------- -----------------
+ASM1 18.0.0.0.0

SQL>

Run OPatch Conflict Check for Grid Infrastructure Home:
Syntax

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u02/sw/27681568/27676517
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u02/sw/27681568/27678276
opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u02/sw/27681568/27678271

Example

[oracle@rac1 ~]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u02/sw/27681568/27676517
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/18.0.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/18.0.0/grid/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.2.0.4.0
Log file location : /u01/app/18.0.0/grid/cfgtoollogs/opatch/opatch2018-04-25_01-18-52AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@rac1 ~]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u02/sw/27681568/27678276
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/18.0.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/18.0.0/grid/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.2.0.4.0
Log file location : /u01/app/18.0.0/grid/cfgtoollogs/opatch/opatch2018-04-25_01-19-07AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@rac1 ~]$ opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u02/sw/27681568/27678271
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/18.0.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/18.0.0/grid/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.2.0.4.0
Log file location : /u01/app/18.0.0/grid/cfgtoollogs/opatch/opatch2018-04-25_01-19-18AM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@rac1 ~]$

Run OPatch SystemSpace Check
Syntax

opatch prereq CheckSystemSpace -phBaseDir /u02/sw/27681568/27676517
opatch prereq CheckSystemSpace -phBaseDir /u02/sw/27681568/27678276
opatch prereq CheckSystemSpace -phBaseDir /u02/sw/27681568/27678271

Example

[oracle@rac1 ~]$ opatch prereq CheckSystemSpace -phBaseDir /u02/sw/27681568/27676517
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/18.0.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/18.0.0/grid/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.2.0.4.0
Log file location : /u01/app/18.0.0/grid/cfgtoollogs/opatch/opatch2018-04-25_01-22-02AM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[oracle@rac1 ~]$ opatch prereq CheckSystemSpace -phBaseDir /u02/sw/27681568/27678276
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/18.0.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/18.0.0/grid/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.2.0.4.0
Log file location : /u01/app/18.0.0/grid/cfgtoollogs/opatch/opatch2018-04-25_01-22-12AM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[oracle@rac1 ~]$ opatch prereq CheckSystemSpace -phBaseDir /u02/sw/27681568/27678271
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/18.0.0/grid
Central Inventory : /u01/app/oraInventory
from : /u01/app/18.0.0/grid/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.2.0.4.0
Log file location : /u01/app/18.0.0/grid/cfgtoollogs/opatch/opatch2018-04-25_01-22-19AM_1.log

Invoking prereq "checksystemspace"

Prereq "checkSystemSpace" passed.

OPatch succeeded.
[oracle@rac1 ~]$

One-off Patch Conflict Detection and Resolution

#opatchauto apply /u02/sw/27681568 -analyze

[root@rac1 ~]# opatchauto apply /u02/sw/27681568 -analyze

OPatchauto session is initiated at Wed Apr 25 01:24:56 2018

System initialization log file is /u01/app/18.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2018-04-25_01-25-04AM.log.

Session log file is /u01/app/18.0.0/grid/cfgtoollogs/opatchauto/opatchauto2018-04-25_01-25-11AM.log
The id for this session is 22LR

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

OPatchAuto successful.

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

Analysis for applying patches has completed successfully:

Host:rac1
CRS Home:/u01/app/18.0.0/grid
Version:18.0.0.0.0

==Following patches were SUCCESSFULLY analyzed to be applied:

Patch: /u02/sw/27681568/27678276
Log: /u01/app/18.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-04-25_01-25-37AM_1.log

Patch: /u02/sw/27681568/27678271
Log: /u01/app/18.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-04-25_01-25-37AM_1.log

Patch: /u02/sw/27681568/27676517
Log: /u01/app/18.0.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-04-25_01-25-37AM_1.log

OPatchauto session completed at Wed Apr 25 01:25:46 2018
Time taken to complete the session 0 minute, 51 seconds
[root@rac1 ~]#

To patch only the GI home:
Syntax

# opatchauto apply /u02/sw/27681568 -oh /u01/app/18.0.0/grid

Example

[root@rac1 ~]# opatchauto apply /u02/sw/27681568/

OPatchauto session is initiated at Wed Apr 25 01:28:43 2018

System initialization log file is /u01/app/18.0.0/grid/cfgtoollogs/opatchautodb/systemconfig2018-04-25_01-28-49AM.log.

Session log file is /u01/app/18.0.0/grid/cfgtoollogs/opatchauto/opatchauto2018-04-25_01-28-56AM.log
The id for this session is 7UB6
OPATCHAUTO-72141: Grid patching cannot be performed in rolling mode.
OPATCHAUTO-72141: Grid is installed only on a single node.
OPATCHAUTO-72141: Execute opatchauto in non-rolling mode.
OPatchAuto failed.

OPatchauto session completed at Wed Apr 25 01:29:12 2018
Time taken to complete the session 0 minute, 29 seconds

opatchauto failed with error code 42

As I am running RAC on one node, So Grid patching cannot be performed in rolling mode.

Now, I will perform non-rolling mode to apply the patch.

Step 1: Stop CRS

[root@rac1 ~]#crsctl stop crs

Step 2: Unlock the Grid Home

[root@rac1 ~]# /u01/app/18.0.0/grid/crs/install/rootcrs.sh -prepatch -nonrolling
Using configuration parameter file: /u01/app/18.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/rac1/crsconfig/crs_prepatch_rac1_2018-04-25_01-38-50AM.log
2018/04/25 01:39:06 CLSRSC-4012: Shutting down Oracle Trace File Analyzer (TFA) Collector.
2018/04/25 01:39:20 CLSRSC-4013: Successfully shut down Oracle Trace File Analyzer (TFA) Collector.
2018/04/25 01:39:20 CLSRSC-347: Successfully unlock /u01/app/18.0.0/grid
2018/04/25 01:39:25 CLSRSC-671: Pre-patch steps for patching GI home successfully completed.
[root@rac1 ~]#

Step 3: Apply all patches

[oracle@rac1 ~]$ opatch apply -oh /u01/app/18.0.0/grid -local /u02/sw/27681568/27676517
[oracle@rac1 ~]$ opatch apply -oh /u01/app/18.0.0/grid -local /u02/sw/27681568/27678276
[oracle@rac1 ~]$ opatch apply -oh /u01/app/18.0.0/grid -local /u02/sw/27681568/27678271

Step 4: Lock back the Grid Home

[root@rac1 ~]# /u01/app/18.0.0/grid/crs/install/rootcrs.sh -postpatch -nonrolling
Using configuration parameter file: /u01/app/18.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/oracle/crsdata/rac1/crsconfig/crs_postpatch_rac1_2018-04-25_01-45-07AM.log
2018/04/25 01:45:26 CLSRSC-329: Replacing Clusterware entries in file 'oracle-ohasd.service'
CRS-4123: Starting Oracle High Availability Services-managed resources
CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-2672: Attempting to start 'ora.evmd' on 'rac1'
CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-2676: Start of 'ora.evmd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'
CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.crf' on 'rac1'
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'rac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'
CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-2676: Start of 'ora.crf' on 'rac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2672: Attempting to start 'ora.ctssd' on 'rac1'
CRS-2676: Start of 'ora.ctssd' on 'rac1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'rac1'
CRS-2676: Start of 'ora.asm' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.storage' on 'rac1'
CRS-2676: Start of 'ora.storage' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.crsd' on 'rac1'
CRS-2676: Start of 'ora.crsd' on 'rac1' succeeded
CRS-6023: Starting Oracle Cluster Ready Services-managed resources
CRS-2672: Attempting to start 'ora.proxy_advm' on 'rac1'
CRS-6017: Processing resource auto-start for servers: rac1
CRS-2672: Attempting to start 'ora.scan2.vip' on 'rac1'
CRS-2672: Attempting to start 'ora.scan3.vip' on 'rac1'
CRS-2672: Attempting to start 'ora.ons' on 'rac1'
CRS-2672: Attempting to start 'ora.scan1.vip' on 'rac1'
CRS-2672: Attempting to start 'ora.rac1.vip' on 'rac1'
CRS-2672: Attempting to start 'ora.cvu' on 'rac1'
CRS-2672: Attempting to start 'ora.qosmserver' on 'rac1'
CRS-2676: Start of 'ora.scan2.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN2.lsnr' on 'rac1'
CRS-2676: Start of 'ora.scan3.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN3.lsnr' on 'rac1'
CRS-2676: Start of 'ora.scan1.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'rac1'
CRS-2676: Start of 'ora.rac1.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'rac1'
CRS-2672: Attempting to start 'ora.MGMTLSNR' on 'rac1'
CRS-2676: Start of 'ora.cvu' on 'rac1' succeeded
CRS-2676: Start of 'ora.ons' on 'rac1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN2.lsnr' on 'rac1' succeeded
CRS-2676: Start of 'ora.MGMTLSNR' on 'rac1' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'rac1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN3.lsnr' on 'rac1' succeeded
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.mgmtdb' on 'rac1'
CRS-2676: Start of 'ora.proxy_advm' on 'rac1' succeeded
CRS-2676: Start of 'ora.qosmserver' on 'rac1' succeeded
CRS-2676: Start of 'ora.mgmtdb' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.chad' on 'rac1'
CRS-2676: Start of 'ora.chad' on 'rac1' succeeded
CRS-6016: Resource auto-start has completed for server rac1
CRS-6024: Completed start of Oracle Cluster Ready Services-managed resources
CRS-4123: Oracle High Availability Services has been started.
Oracle Clusterware active version on the cluster is [18.0.0.0.0]. The cluster upgrade state is [NORMAL]. The cluster active patch level is [3087104924].
SQL Patching tool version 18.0.0.0.0 Production on Wed Apr 25 01:51:11 2018
Copyright (c) 2012, 2018, Oracle. All rights reserved.

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

Connecting to database...OK
Gathering database info...done

Note: Datapatch will only apply or rollback SQL fixes for PDBs
that are in an open state, no patches will be applied to closed PDBs.
Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
(Doc ID 1585822.1)

Bootstrapping registry and package to current versions...done
Determining current state...done

Current state of interim SQL patches:
No interim patches found

Current state of release update SQL patches:
Binary registry:
18.2.0.0.0 Release_Update 1804041635: Installed
PDB CDB$ROOT:
No release update patches installed
PDB GIMR_DSCREP_10:
No release update patches installed
PDB PDB$SEED:
No release update patches installed

Adding patches to installation queue and performing prereq checks...done
Installation queue:
For the following PDBs: CDB$ROOT PDB$SEED GIMR_DSCREP_10
No interim patches need to be rolled back
Patch 27676517 (Database Release Update : 18.2.0.0.180417 (27676517)):
Apply from 18.1.0.0.0 Feature Release to 18.2.0.0.0 Release_Update 1804041635
No interim patches need to be applied

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

Validating logfiles...done
Patch 27676517 apply (pdb CDB$ROOT): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27676517/22097537/27676517_apply__MGMTDB_CDBROOT_2018Apr25_01_56_32.log (no errors)
Patch 27676517 apply (pdb PDB$SEED): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27676517/22097537/27676517_apply__MGMTDB_PDBSEED_2018Apr25_02_00_29.log (no errors)
Patch 27676517 apply (pdb GIMR_DSCREP_10): SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/27676517/22097537/27676517_apply__MGMTDB_GIMR_DSCREP_10_2018Apr25_02_00_28.log (no errors)
SQL Patching tool complete on Wed Apr 25 02:04:58 2018
2018/04/25 02:06:31 CLSRSC-4015: Performing install or upgrade action for Oracle Trace File Analyzer (TFA) Collector.
2018/04/25 02:07:01 CLSRSC-4003: Successfully patched Oracle Trace File Analyzer (TFA) Collector.
2018/04/25 02:07:06 CLSRSC-672: Post-patch steps for patching GI home successfully completed.
[root@rac1 ~]#

Steps 5: List all patches applied.

[oracle@rac1 grid]$ opatch lspatches
27678271;ACFS RELEASE UPDATE 18.2.0.0.0 (27678271)
27678276;OCW RELEASE UPDATE 18.2.0.0.0 (27678276)
27676517;Database Release Update : 18.2.0.0.180417 (27676517)

OPatch succeeded.
[oracle@rac1 grid]$

Let’s connect to Sqlplus, as we see now version changes to 18.2.0.0.0

[oracle@rac1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Wed Apr 25 01:48:55 2018
Version 18.2.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.2.0.0.0

SQL>

So, as we see it’s very simple approach to upgrading the version by applying the patch.

Stay tuned for more articles on Oracle 18c 

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Comments

  1. Bruce

    Didn’t understand this : “To install the Grid Infrastructure Apr 2018 Release Update 18.2.0.0.180417 patch, the Grid home must have the 18.1 Database installed” !

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.