Friday 31 May 2019

PSU and OJVM PATCH on RAC 12c R1 Database not grid PART -2


Step 1:



stop database services
[root@srv1 28689146]# srvctl stop database -d rac

Step 2 :

Take backup of oracle home if not done earlier

Step 3 :

Set path

[oracle@srv1 28440711]$ export ORACLE_HOME=/u01/app/oracle/product/12.1.0/dbhome_2
[oracle@srv1 28440711]$ export PATH=$ORACLE_HOME/OPatch:$PATH:$ORACLE_HOME/bin
[oracle@srv1 28440711]$ export PATH=$ORACLE_HOME/perl/bin:$PATH


STEP 4:

[oracle@srv1 28440711]$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version    : 12.2.0.1.16
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_16-19-02PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@srv1 28440711]$

STEP 5:

[oracle@srv1 28440711]$ opatch apply  (Apply on both node1 and node 2)
Oracle Interim Patch Installer version 12.2.0.1.16
Copyright (c) 2019, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.1.0/dbhome_2
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/12.1.0/dbhome_2/oraInst.loc
OPatch version    : 12.2.0.1.16
OUI version       : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_16-20-33PM_1.log

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

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_2')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying interim patch '28440711' to OH '/u01/app/oracle/product/12.1.0/dbhome_2'
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...

Patching component oracle.dbjava.jdbc, 12.1.0.2.0...

Patching component oracle.dbjava.ic, 12.1.0.2.0...
Patch 28440711 successfully applied.
Log file location: /u01/app/oracle/product/12.1.0/dbhome_2/cfgtoollogs/opatch/opatch2019-05-31_16-20-33PM_1.log

OPatch succeeded.
[oracle@srv1 28440711]$

STEP 6:

[root@srv1 28689146]# srvctl start database -d rac


STEP 7 :

[oracle@srv1 28440711]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri May 31 16:55:49 2019

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


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

SQL> alter system set cluster_database=false scope=spfile;

System altered.


STEP 8:
[root@srv1 28689146]# srvctl  stop database -d rac


STEP 9: 

[oracle@srv1 28440711]$ sqlplus / as sysdba

SQL*Plus: Release 12.1.0.2.0 Production on Fri May 31 17:02:34 2019

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

Connected to an idle instance.

SQL> startup upgrade
ORACLE instance started.

Total System Global Area 1795162112 bytes
Fixed Size                  2925456 bytes
Variable Size             553651312 bytes
Database Buffers         1224736768 bytes
Redo Buffers               13848576 bytes
Database mounted.
Database opened.
SQL>

STEP 10 :

[oracle@srv1 28440711]$ cd $ORACLE_HOME/OPatch
[oracle@srv1 OPatch]$ ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Fri May 31 17:05:13 2019
Copyright (c) 2012, 2016, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_19179_2019_05_31_17_05_13/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 28440711 (Database PSU 12.1.0.2.181016, Oracle JavaVM Component (OCT2018)):
  Installed in the binary registry only
Bundle series PSU:
  ID 181016 in the binary registry and ID 181016 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:
    28440711 (Database PSU 12.1.0.2.181016, Oracle JavaVM Component (OCT2018))

Installing patches...



Patch installation complete.  Total patches installed: 1

Validating logfiles...
Patch 28440711 apply: SUCCESS
  logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/28440711/22440644/28440711_apply_RAC_2019May31_17_05_53.log (no errors)
SQL Patching tool complete on Fri May 31 17:13:53 2019
[oracle@srv1 OPatch]$


STEP 11:

sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> alter system set cluster_database=true scope=spfile;
SQL> SHUTDOWN
$ORACLE_HOME/bin/srvctl start database -d rac

STEP 12:

[oracle@srv2 28440711]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.2.0 Production on Fri May 31 17:34:29 2019 Copyright (c) 1982, 2014, Oracle. All rights reserved. Connected to: 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 SQL> set lines 200 SQL> select BUNDLE_SERIES,PATCH_UID,PATCH_ID,VERSION,ACTION,STATUS,ACTION_TIME ,DESCRIPTION from dba_registry_sqlpatch; BUNDLE_SERIES PATCH_UID PATCH_ID VERSION ACTION STATUS ACTION_TIME ------------------------------ ---------- ---------- -------------------- --------------- --------------- --------------------------------------------------------------------------- DESCRIPTION ---------------------------------------------------------------------------------------------------- PSU 22488632 28259833 12.1.0.2 APPLY SUCCESS 31-MAY-19 01.28.27.449554 PM DATABASE PATCH SET UPDATE 12.1.0.2.181016 22440644 28440711 12.1.0.2 APPLY SUCCESS 31-MAY-19 05.13.52.200557 PM Database PSU 12.1.0.2.181016, Oracle JavaVM Component (OCT2018) SQL>






No comments:

Post a Comment