Description:-
In this article we are going to see Oracle12c-Step by step How To Applying PSU Patch on Oracle Dataguard Environment
High Level steps for applying the Patch
- Primary site disable the log shipping to the standby database and Stop MRP on standby site
- Shutdown Standby Database and Listener
- Apply PSU patch on Standby site
- Shutdown Primary database and Listener.
- Apply PSU Patch on Primary Site
- Enable Log shipping on Primary
- execute Post installation Scripts (datapatch)
- Monitor the redo apply from Primary to Standby
Environment Details:-Primary Database Details:
prime> select status,instance_name,database_role,open_mode from v$database,v$Instance;
STATUS INSTANCE_NAME DATABASE_ROLE OPEN_MODE
———— —————- —————- ———–
OPEN prime PRIMARY READ WRITE
Standby Database Details:
Stand> select status,instance_name,database_role,open_mode from v$database,v$Instance;
STATUS INSTANCE_NAME DATABASE_ROLE OPEN_MODE
———— —————- —————- ———–
OPEN stand PHYSICAL STANDBY READ ONLY WITH APPLY
Let’s Start the Demo:-
Opatch Version
Oracle recommends that you use the latest released OPatch 12.1 tool which is available to download and apply the patch: 6880880 from support.oracle.com or from https://updates.oracle.com/download/6880880.html
Current version of Opatch Tool in our environment
export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@primary ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@primary ~]$ opatch version
OPatch Version: 12.1.0.1.3
OPatch succeeded.
Pre-steps:-
install Opatch utility (both Primary & Standby Side)
1. Download the latest Opatch utility from oracle support
[oracle@primary u01]$ ls -lrt
total 424836
drwxrwxr-x. 2 oracle oinstall 16384 Jun 11 23:28 lost+found
drwxrwxr-x. 4 oracle oinstall 4096 Jun 12 01:32 app
-rwxr-xr-x. 1 oracle oinstall 337586889 Jun 15 13:40 p25755742_121020_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle oinstall 97422646 Jun 15 13:40 p6880880_121010_Linux-x86-64.zip
2. Take a backup of older version of OPatch utility under $ORACLE_HOME and unzip the downloaded file
[oracle@primary ~]$ cd $ORACLE_HOME
[oracle@primary db_1]$ mv OPatch OPatch.bkp.15.06.18
[oracle@primary db_1]$ unzip p6880880_121010_Linux-x86-64.zip
cd OPatch
oracle@primary OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.13
OPatch succeeded.
3. Include OPatch in PATH .bash_profile
export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@primary db_1]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@primary db_1]$ opatch lsinventory
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_14-29-03PM_1.log
Lsinventory Output file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-06-15_14-29-03PM.txt
——————————————————————————–
Local Machine Information::
Hostname: primary
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c 12.1.0.2.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
——————————————————————————–
OPatch succeeded.
Take Backup of ORACLE_HOME (both primary & Standby side) (Rollback plan)
[oracle@primary u01]$ tar -cvf oracle_home_jun1518.tar $ORACLE_HOME
Step1:-Primary site disable the log shipping to the standby database and Stop MRP on standby site
DGMGRL> show configuration
Configuration – hari
Protection Mode: MaxPerformance
Members:
prime – Primary database
stand – Physical standby database
Fast-Start Failover: DISABLED
Configuration Status:
SUCCESS (status updated 13 seconds ago)
DGMGRL> edit database prime set state=’LOG-TRANSPORT-OFF’;
Succeeded.
prime> show parameter log_archive_dest_state_2
NAME TYPE VALUE
———————— ———– ——-
log_archive_dest_state_2 string RESE
stand> alter database recover managed standby database cancel;
Database altered.
Step2:-Shutdown Standby Database and Listener
[oracle@standby ~]$ export ORACLE_SID=stand
[oracle@standby ~]$ sqlplus ‘/as sysdba’
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 15 16:39:06 2018
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, OLAP, Advanced Analytics and Real Application Testing options
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@standby ~]$ lsnrctl stop
LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 15-JUN-2018 16:39:44
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.25)(PORT=1539)))
The command completed successfully
Step3:-Apply PSU patch on Standby site
[oracle@standby u01]$ unzip p25755742_121020_Linux-x86-64.zip
[oracle@standby u01]$ ls -lrt
total 424936
drwxrwxr-x. 13 oracle oinstall 4096 Jun 29 2017 25755742
-rw-rw-r–. 1 oracle oinstall 96270 Aug 7 2017 PatchSearch.xml
drwxrwxr-x. 2 oracle oinstall 16384 Jun 11 23:28 lost+found
drwxrwxr-x. 4 oracle oinstall 4096 Jun 12 01:32 app
-rwxr-xr-x. 1 oracle oinstall 337586889 Jun 15 13:41 p25755742_121020_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle oinstall 97422646 Jun 15 13:41 p6880880_121010_Linux-x86-64.zip
[oracle@standby u01]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@standby u01]$ cd 25755742/
[oracle@standby 25755742]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_16-50-22PM_1.log
Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 19769480 20299023 20831110 21359755 21948354 22291127 23054246 24006101 24732082 25171037 25755742
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.2/db_1’)
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files…
Applying sub-patch ‘19769480’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.util, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20299023’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf.ic, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20831110’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘21359755’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.assistants.server, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Applying sub-patch ‘21948354’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Applying sub-patch ‘22291127’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘23054246’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.install.deinstalltool, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.ctx, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.nlsrtl.rsf, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.ctx.atg, 12.1.0.2.0…
Applying sub-patch ‘24006101’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘24732082’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘25171037’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.jai, 12.1.0.2.0…
Patching component oracle.ordim.server, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.javavm.containers, 12.1.0.2.0…
Applying sub-patch ‘25755742’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] , [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Composite patch 25755742 successfully applied.
Log file location: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_16-50-22PM_1.log
OPatch succeeded.
Step4:-Shutdown Primary database and Listener.
[oracle@primary ~]$ export ORACLE_SID=prime
[oracle@primary ~]$ sqlplus ‘/as sysdba’
SQL*Plus: Release 12.1.0.2.0 Production on Fri Jun 15 17:02:39 2018
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, OLAP, Advanced Analytics and Real Application Testing options
SQL> shut immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 – 64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
[oracle@primary ~]$ lsnrctl stop
LSNRCTL for Linux: Version 12.1.0.2.0 – Production on 15-JUN-2018 17:03:26
Copyright (c) 1991, 2014, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.1.24)(PORT=1539)))
The command completed successfully
Step5:-Apply PSU Patch on Primary Site
[oracle@primary ~]$ cd /u01/25755742/
[oracle@primary 25755742]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@primary 25755742]$ opatch apply
Oracle Interim Patch Installer version 12.2.0.1.13
Copyright (c) 2018, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.1.0.2/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0.2/db_1/oraInst.loc
OPatch version : 12.2.0.1.13
OUI version : 12.1.0.2.0
Log file location : /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_17-06-26PM_1.log
Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 19769480 20299023 20831110 21359755 21948354 22291127 23054246 24006101 24732082 25171037 25755742
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.2/db_1’)
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files…
Applying sub-patch ‘19769480’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.util, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20299023’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf.ic, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Applying sub-patch ‘20831110’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘21359755’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.assistants.server, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Applying sub-patch ‘21948354’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.xdk.rsf, 12.1.0.2.0…
Applying sub-patch ‘22291127’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.oraolap, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.oraolap.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘23054246’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.install.deinstalltool, 12.1.0.2.0…
Patching component oracle.ldap.rsf.ic, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.ctx, 12.1.0.2.0…
Patching component oracle.xdk, 12.1.0.2.0…
Patching component oracle.nlsrtl.rsf, 12.1.0.2.0…
Patching component oracle.xdk.parser.java, 12.1.0.2.0…
Patching component oracle.ctx.atg, 12.1.0.2.0…
Applying sub-patch ‘24006101’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.dv, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Applying sub-patch ‘24732082’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Applying sub-patch ‘25171037’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
Patching component oracle.sqlplus.ic, 12.1.0.2.0…
Patching component oracle.sqlplus, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.client, 12.1.0.2.0…
Patching component oracle.ordim.jai, 12.1.0.2.0…
Patching component oracle.ordim.server, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Patching component oracle.rdbms.install.plugins, 12.1.0.2.0…
Patching component oracle.javavm.containers, 12.1.0.2.0…
Applying sub-patch ‘25755742’ to OH ‘/u01/app/oracle/product/12.1.0.2/db_1’
ApplySession: Optional component(s) [ oracle.oid.client, 12.1.0.2.0 ] , [ oracle.has.crs, 12.1.0.2.0 ] not present in the Oracle Home or a higher version is found.
Patching component oracle.network.rsf, 12.1.0.2.0…
Patching component oracle.ldap.rsf, 12.1.0.2.0…
Patching component oracle.ldap.client, 12.1.0.2.0…
Patching component oracle.oracore.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.deconfig, 12.1.0.2.0…
Patching component oracle.tfa, 12.1.0.2.0…
Patching component oracle.network.listener, 12.1.0.2.0…
Patching component oracle.rdbms, 12.1.0.2.0…
Patching component oracle.rdbms.dbscripts, 12.1.0.2.0…
Patching component oracle.rdbms.rsf, 12.1.0.2.0…
Patching component oracle.rdbms.rman, 12.1.0.2.0…
Composite patch 25755742 successfully applied.
Log file location: /u01/app/oracle/product/12.1.0.2/db_1/cfgtoollogs/opatch/opatch2018-06-15_17-06-26PM_1.log
OPatch succeeded.
Step6:-Enable Log shipping on Primary
Start the database and listener both side
DGMGRL> edit database prime set state=’ONLINE’;
Succeeded.
Step7:-execute Post installation Scripts (datapatch)
[oracle@primary OPatch]$ ./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 Production on Fri Jun 15 18:27:13 2018
Copyright (c) 2012, 2016, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_10585_2018_06_15_18_27_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:
Bundle series PSU:
ID 170718 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:
25755742 (DATABASE PATCH SET UPDATE 12.1.0.2.170718)
Installing patches…
Patch installation complete. Total patches installed: 1
Validating logfiles…
Patch 25755742 apply: SUCCESS
logfile: /u01/app/oracle/cfgtoollogs/sqlpatch/25755742/21385018/25755742_apply_PRIME_2018Jun15_18_27_37.log (no errors)
SQL Patching tool complete on Fri Jun 15 18:28:34 2018
Step8:-Monitor the redo apply from Primary to Standby
SQL> SELECT ARCH.THREAD# “Thread”, ARCH.SEQUENCE# “Last Sequence Received”,
APPL.SEQUENCE# “Last Sequence Applied”, (ARCH.SEQUENCE# – APPL.SEQUENCE#) “Difference”
FROM
(SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME ) IN
(SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
(SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN
(SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE
ARCH.THREAD# = APPL.THREAD#
ORDER BY 1; 2 3 4 5 6 7 8 9 10
Thread Last Sequence Received Last Sequence Applied Difference
———- ———————- ——————— ———-
1 18 18 0
Step9:-Opatch Status
[oracle@primary ~]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@primary ~]$ opatch lsinventory|grep 25755742
Patch 25755742 : applied on Fri Jun 15 17:11:29 IST 2018
Patch description: “Database Patch Set Update : 12.1.0.2.170718 (25755742)”
[oracle@standby 25755742]$ export PATH=/u01/app/oracle/product/12.1.0.2/db_1/OPatch:$PATH
[oracle@standby 25755742]$ opatch lsinventory|grep 25755742
Patch 25755742 : applied on Fri Jun 15 16:55:37 IST 2018
Patch description: “Database Patch Set Update : 12.1.0.2.170718 (25755742)”
SQL> select PATCH_ID,ACTION_TIME,STATUS,DESCRIPTION from registry$sqlpatch;
PATCH_ID ACTION_TIME STATUS DESCRIPTION
———- —————————— ————— —
25755742 15-JUN-18 06.28.34.330133 PM SUCCESS DATABASE PATCH SET UPDATE 12.1.0.2.170718
Successfully applied PSU Patch on Dataguard Environment
Catch Me On:- Hariprasath Rajaram
LinkedIn:https://www.linkedin.com/in/hari-prasath-aa65bb19/
Facebook:https://www.facebook.com/HariPrasathdba
FB Group:https://www.facebook.com/groups/894402327369506/
FB Page: https://www.facebook.com/dbahariprasath/?
Twitter: https://twitter.com/hariprasathdba