How to Upgrade JDK 1.6 to 1.7 in GRID and RDBMS HOME
Pre-Patching
steps:
Step 1: Change the permissions for all files located under
RDBMS and Grid Home JDK directory.
GRID and RDBMS Homes:
chmod -R 755 $ORACLE_HOME/jdk
Step 2: Check the conflicts for both GRID and RDBMS homes
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Step 3:
Verify the current version of JDK under Grid and RDBMS homes:
/u01/app/oracle/product/12.1.0.2/db_1/jdk/bin
./java -version
java version
"1.6.0_211"
Java(TM) SE Runtime Environment (build 1.6.0_211-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.211-b11, mixed
mode)
/u01/app/oracle/product/12.1.0.2/db_1/jdk/bin
> cd /u01/app/12.1.0.2/grid/jdk/
/u01/app/12.1.0.2/grid/jdk
cd bin
/u01/app/12.1.0.2/grid/jdk/bin
<dbname> > ./java
-version
java version
"1.6.0_211"
Java(TM) SE Runtime Environment (build 1.6.0_211-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.211-b11, mixed
mode)
Patching
Steps:
Login with root and apply the patch using opatchauto.
/u01/app/12.1.0.2/grid/OPatch/opatchauto apply
/lfs/dba/JULJDK_2019/29924111
Example:
[root@server ~]#
/u01/app/12.1.0.2/grid/OPatch/opatchauto apply /lfs/dba/JULJDK_2019/29924111
OPatchauto session is initiated at Mon Aug 19 05:33:53 2019
System initialization log file is
/u01/app/12.1.0.2/grid/cfgtoollogs/opatchautodb/systemconfig2019-08-19_05-33-55AM.log.
Session log file is
/u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/opatchauto2019-08-19_05-33-59AM.log
The id for this session is 7U6N
Executing OPatch prereq operations to verify patch
applicability on home /u01/app/oracle/product/12.1.0.2/db_1
Patch applicability verified successfully on home
/u01/app/oracle/product/12.1.0.2/db_1
Verifying SQL patch applicability on home
/u01/app/oracle/product/12.1.0.2/db_1
No step execution required.........
Executing OPatch prereq operations to verify patch
applicability on home /u01/app/12.1.0.2/grid
Patch applicability verified successfully on home
/u01/app/12.1.0.2/grid
Preparing to bring down database service on home
/u01/app/oracle/product/12.1.0.2/db_1
Successfully prepared home
/u01/app/oracle/product/12.1.0.2/db_1 to bring down database service
Bringing down database service on home
/u01/app/oracle/product/12.1.0.2/db_1
Following database has been stopped and will be restarted
later during the session: DBname
Database service successfully brought down on home
/u01/app/oracle/product/12.1.0.2/db_1
Bringing down CRS service on home /u01/app/12.1.0.2/grid
Prepatch operation log file location:
/u01/app/12.1.0.2/grid/cfgtoollogs/crsconfig/hapatch_2019-08-19_05-34-38AM.log
CRS service brought down successfully on home
/u01/app/12.1.0.2/grid
Start applying binary patch on home
/u01/app/oracle/product/12.1.0.2/db_1
Binary patch applied successfully on home
/u01/app/oracle/product/12.1.0.2/db_1
Start applying binary patch on home /u01/app/12.1.0.2/grid
Binary patch applied successfully on home
/u01/app/12.1.0.2/grid
Starting CRS service on home /u01/app/12.1.0.2/grid
Postpatch operation log file location:
/u01/app/12.1.0.2/grid/cfgtoollogs/crsconfig/hapatch_2019-08-19_05-36-08AM.log
CRS service started successfully on home
/u01/app/12.1.0.2/grid
Starting database service on home
/u01/app/oracle/product/12.1.0.2/db_1
Database service successfully started on home
/u01/app/oracle/product/12.1.0.2/db_1
Preparing home /u01/app/oracle/product/12.1.0.2/db_1 after
database service restarted
No step execution required.........
Trying to apply SQL patch on home /u01/app/oracle/product/12.1.0.2/db_1
No step execution required.........
OPatchAuto successful.
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary
as follows:
Host:<server>
SIDB Home:/u01/app/oracle/product/12.1.0.2/db_1
Version:12.1.0.2.0
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /lfs/dba/JULJDK_2019/29924111
Log: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2019-08-19_05-35-00AM_1.log
Host:<server>
SIHA Home:/u01/app/12.1.0.2/grid
Version:12.1.0.2.0
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /lfs/dba/JULJDK_2019/29924111
Log:
/u01/app/12.1.0.2/grid/cfgtoollogs/opatchauto/core/opatch/opatch2019-08-19_05-35-34AM_1.log
OPatchauto session completed at Mon Aug 19 05:37:38 2019
Time taken to complete the session 3 minutes, 45 seconds
Post
Patching Steps:
Step 1: Verify the
JDK version of GRID and RDBMS Homes:
/u01/app/oracle/product/12.1.0.2/db_1/jdk/bin
<dbname> > ./java
-version
java version
"1.7.0_221"
Java(TM) SE Runtime Environment (build 1.7.0_221-b08)
Java HotSpot(TM) 64-Bit Server VM (build 24.221-b08, mixed
mode)
/u01/app/oracle/product/12.1.0.2/db_1/jdk/bin
cd /u01/app/12.1.0.2/grid/jdk/bin
/u01/app/12.1.0.2/grid/jdk/bin
<db_name>> ./java
-version
java version
"1.7.0_221"
Java(TM) SE Runtime Environment (build 1.7.0_221-b08)
Step 2:
Follow the
standard procedure for upgrading JDK 1.7 u221 to latest version JDK 1.7u231
version of both GRID and RDBMS Homes. Oracle Doc Id: 2286866.1
Step 3:
Verify the DB JVM version from Database level.
select dbms_java.get_jdk_version() from dual;
We will be getting following error after upgrading to JDK 1.7
Steps to upgrade DB JVM.
1. Shutdown
all the services
+ASM> crsctl stop has/crs
Note: if it is RAC, shutdown the
services in all the nodes
2. Set the
environment to DB HOME and Run the following command to upgrade JDK version at
DB LEVEL in all the nodes
perl $ORACLE_HOME/javavm/install/update_javavm_binaries.pl 7
3. Relink the
libraries in all the nodes
cd $ORACLE_HOME/rdbms/lib
make -f ins_rdbms.mk ioracle
4. Start the
DB Services in all nodes
+ASM > crsctl start has/crs
5. Update the
JVM to latest version at DB Level
SQL>
@$ORACLE_HOME/javavm/install/update_javavm_db.sql
Note: Run this SQL in any one node
for all databases.
6. Verify the
DB JVM
SQL> select
dbms_java.get_jdk_version() from dual;
Comments
Post a Comment