Below are the steps for applying JVM patch in oracle 12c database.

 

Steps 1 : Download the respective patch from oracle support  and unzip it in the server.

unzip 21555660_hxuz.zip

cd 21555660

Steps 2 : check the conflict against ORACLE_HOME

 

 cd 21555660
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.1.0.1.10
Copyright (c) 2016, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /oracle/app/oracle/product/12.1.0.2/dbhome_1
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/oracle/product/12.1.0.2/dbhome_1/oraInst.loc
OPatch version    : 12.1.0.1.10
OUI version       : 12.1.0.2.0
Log file location : /oracle/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/opatch2016-02-25_13-14-48PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.

 

Step 3: Shutdown all databases and listeners running from the ORACLE_HOME,where we are applying patch.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

 

STEP 4 :  Run optach apply command
oracle@B2B-RBM-DEV-ST:/goldgate/software#cd 21555660
oracle@B2B-RBM-DEV-ST:/goldgate/software/21555660#ls -ltr
total 108
drwxr-xr-x   4 oracle     oinstall        96 Oct 19 15:37 etc
-rw-rw-r--   1 oracle     oinstall         0 Oct 19 15:37 README.txt
drwxr-xr-x   2 oracle     oinstall        96 Oct 19 15:37 custom
drwxr-xr-x   6 oracle     oinstall        96 Oct 19 15:37 files
-rw-r--r--   1 oracle     oinstall     55063 Oct 20 14:44 README.html



oracle@B2B-RBM-DEV-ST:/goldgate/software/21555660#$ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.1.0.1.10
Copyright (c) 2016, Oracle Corporation.  All rights reserved.


Oracle Home       : /oracle/app/oracle/product/12.1.0.2/dbhome_1
Central Inventory : /oracle/app/oraInventory
   from           : /oracle/app/oracle/product/12.1.0.2/dbhome_1/oraInst.loc
OPatch version    : 12.1.0.1.10
OUI version       : 12.1.0.2.0
Log file location : /oracle/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/21555660_Feb_25_2016_13_19_10/apply2016-02-25_13-19-10PM_1.log

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

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name:

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y



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


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

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

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

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

Patching component oracle.rdbms, 12.1.0.2.0...

Patching component oracle.javavm.client, 12.1.0.2.0...
chmod: invalid mode

--------------------------------------------------------------------------------
***************************************************************************************************
***************************************************************************************************
**                                ATTENTION                                                      **
**                                                                                               **
** It is critical and essential to complete the post installation (if you applying the patch) or **
** post deinstallation (if you are doing rollback of the patch) as per Readme to have a working  **
** and functional Oracle JavaVM Component.                                                       **
** Failure to follow the instructions could lead to inconsistencies in the database.             **
**                                                                                               **
***************************************************************************************************
***************************************************************************************************

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

Patch 21555660 successfully applied.
Log file location: /oracle/app/oracle/product/12.1.0.2/dbhome_1/cfgtoollogs/opatch/21555660_Feb_25_2016_13_19_10/apply2016-02-25_13-19-10PM_1.log

OPatch succeeded.

 

Step 5 : Now start the database in upgrade mode :
SQL> startup upgrade
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 6442450944 bytes
Fixed Size                  4533752 bytes
Variable Size            4244636168 bytes
Database Buffers         2181038080 bytes
Redo Buffers               12242944 bytes
Database mounted.
Database opened.
SQL> exit

 

step 6 : Run the post patch tool using the new datapatch tool .
cd $ORACLE_HOME/OPatch
./datapatch -verbose

SQL Patching tool version 12.1.0.2.0 on Thu Feb 25 13:22:37 2016
Copyright (c) 2015, Oracle.  All rights reserved.

Log file for this invocation: /oracle/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_14412_2016_02_25_13_22_37/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 21555660 (Database PSU 12.1.0.2.5, Oracle JavaVM Component (Oct2015)):
  Installed in the binary registry only
Bundle series PSU:
  ID 5 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:
    21555660 (Database PSU 12.1.0.2.5, Oracle JavaVM Component (Oct2015))
    21359755 (Database Patch Set Update : 12.1.0.2.5 (21359755))

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

Validating logfiles...
Patch 21555660 apply: SUCCESS
  logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/21555660/19469320/21555660_apply_STCTEST2_2016Feb25_13_23_21.log (no errors)
Patch 21359755 apply: SUCCESS
  logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/21359755/19483322/21359755_apply_STCTEST2_2016Feb25_13_24_44.log (no errors)
SQL Patching tool complete on Thu Feb 25 13:24:55 2016



 

Step 7 : Start the database in normal mode and check the registry.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.


SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 6442450944 bytes
Fixed Size                  4533752 bytes
Variable Size            4244636168 bytes
Database Buffers         2181038080 bytes
Redo Buffers               12242944 bytes
Database mounted.
Database opened.


SQL> select patch_id,status from dba_registry_sqlpatch;

  PATCH_ID STATUS
---------- ---------------
  21555660 SUCCESS
  21359755 SUCCESS