OJVM PSU Patch in Oracle 12c RAC Database


  • OJVM  include critical fixes for the Oracle JavaVM component within the Oracle Database
  • OJVM  are applicable to all database installations regardless of which patching model is used (DB Update, GI Update, DB Revision, GI Revision, DB PSU, GI PSU, Security Patch Update (SPU), Windows Bundle Patch or Database Patch for Exadata)
  • require the database home to be patched to at least October 2014 DB PSU (or equivalent)
  • include binary changes to be applied to each Database ORACLE_HOME, and "post install" steps to be execute on each database running from the ORACLE_HOME
  • You may not need to apply OJVM patch bundles to a Grid Infrastructure home


Steps to Apply OJVM PSU Patch in Oracle 12c RAC  Database

1) Run the following select in each database to check if it has Oracle JavaVM present (most databases will have JavaVM):

SELECT version, status FROM dba_registry WHERE comp_id='JAVAVM';

  • If "STATUS" is "VALID" then it is recommended to install OJVM PSU/Update for this database.
  • If no rows are returned OR "STATUS" is "REMOVED" then Oracle JavaVM is not present in the database (it is recommended to install OVJM patch on Oracle Home, you need to skip post install steps on this database.
  • Other than above two value means there is issue in  JavaVM install in the database , you need to coreect first then proceed.


2) Set Oracle Home path and Opatch Home variable 

[oracle@oraprod2 ~]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_1
[oracle@oraprod2 ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH

3) Check patch has Conflict against any other patch present on Oracle Home

[oracle@oraprod2 29774383]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.21
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2020-09-13_14-29-40PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

4) Shut down Database Services and Other services on Oracle Home and Apply patch 

[oracle@oraprod2 29774383]$ opatch apply

Oracle Interim Patch Installer version 12.2.0.1.21
Copyright (c) 2020, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version    : 12.2.0.1.21
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2020-09-13_14-30-22PM_1.log

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

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

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


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...

PS : You need to do above  steps (2,3,4) on all ORACLE_HOME across the  RAC Cluster 

5) Patch Post Install Steps 

A) Startup Database as Upgrade Mode

[oracle@oraprod1 ~]$ sqlplus /nolog

SQL*Plus: Release 12.1.0.2.0 Production on Sun Sep 13 14:41:27 2020

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

SQL> CONNECT / AS SYSDBA
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area  805306368 bytes
Fixed Size                  2929552 bytes
Variable Size             381684848 bytes
Database Buffers          415236096 bytes
Redo Buffers                5455872 bytes
Database mounted.
Database opened.
SQL> alter system set cluster_database=false scope=spfile;

System altered.

SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

[oracle@oraprod1 ~]$ $ORACLE_HOME/bin/srvctl stop database -d SHOUKIDB

[oracle@oraprod1 ~]$ sqlplus /nolog

SQL*Plus: Release 12.1.0.2.0 Production on Sun Sep 13 14:44:49 2020

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

SQL>  CONNECT / AS SYSDBA
Connected to an idle instance.
SQL> STARTUP UPGRADE
ORACLE instance started.

Total System Global Area  805306368 bytes
Fixed Size                  2929552 bytes
Variable Size             318770288 bytes
Database Buffers          478150656 bytes
Redo Buffers                5455872 bytes
Database mounted.
Database opened.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Advanced Analytics and Real Application Testing options

B) Apply datapatch

[oracle@oraprod1 ~]$ cd $ORACLE_HOME/OPatch
[oracle@oraprod1 OPatch]$ ./datapatch -verbose

SQL Patching tool version 12.1.0.2.0 Production on Sun Sep 13 14:46:49 2020
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

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

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

Current state of SQL patches:
Patch 29774383 (Database PSU 12.1.0.2.190716, Oracle JavaVM Component (JUL2019)):
  Installed in the binary registry only
Bundle series PSU:
  ID 190716 in the binary registry and ID 190716 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:
    29774383 (Database PSU 12.1.0.2.190716, Oracle JavaVM Component (JUL2019))

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

Validating logfiles...
Patch 29774383 apply: SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/29774383/22961858/29774383_apply_SHOUKIDB_2020Sep13_14_49_14.log (no errors)
SQL Patching tool complete on Sun Sep 13 14:53:34 2020
[oracle@oraprod1 OPatch]$

6) Check Database Registry 

select description, action, to_char(action_time,'DD/MM/RR HH24:MI:SS') action_date, ' ' version
from dba_registry_sqlpatch;





Comments

Popular posts from this blog

Enabling TLS 1.2 with Backward Compatibility in Oracle E-Business Suite Release 12.2 using Elliptic Curve Cryptography (ECC) certificate

Mask sensitive data in cloned (non-production) EBS 12.2 environments using EBS 12.2 Data Masking Template with EM 13C.

Enabling SSL in Oracle E-Business Suite Release 12.2