Most of the time, we can shut down the database and listener for patching the database home. But there is a method to apply the patch without shutting down the database and listener.

Checking the database and listener running

[oracle@oem 12834800]$ ps -ef|grep pmon
oracle 16816 1 0 03:11 ? 00:00:00 ora_pmon_PROD4
oracle 18385 1 0 03:26 ? 00:00:00 ora_pmon_EMREP
oracle 23048 18343 0 03:48 pts/2 00:00:00 grep pmon
[oracle@oem 12834800]$ ps -ef|grep tns
oracle 17961 1 0 03:18 ? 00:00:00 /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr LISTENER -inherit
oracle 23063 18343 0 03:48 pts/2 00:00:00 grep tns
[oracle@oem 12834800]$

Checking the lsinventory

[oracle@oem ~]$ opatch lsinv
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-03-22_03-42-37AM.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-03-22_03-42-37AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.

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

OPatch succeeded.
[oracle@oem ~]$

Now, we can apply the patch

[oracle@oem 12834812]$ opatch apply online -connectString PROD2:sys:oracle
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-03-22_03-42-59AM.log

Applying interim patch '12834812' to OH '/u01/app/oracle/product/11.2.0/db_1'
Verifying environment and performing prerequisite checks...

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

Skip patching component oracle.rdbms, 11.2.0.3.0 and its actions.
The actions are reported here, but are not performed.

Verification of patch actions is skipped.
Patch 12834800 successfully applied
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-03-22_03-42-59AM.log

OPatch succeeded.
[oracle@oem 12834800]$

Again, check the lsinventory

[oracle@oem 12834812]$ opatch lsinv
Invoking OPatch 11.2.0.1.7

Oracle Interim Patch Installer version 11.2.0.1.7
Copyright (c) 2011, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.7
OUI version : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2018-03-22_03-43-11AM.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2018-03-22_03-43-11AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g 11.2.0.3.0
There are 1 products installed in this Oracle Home.

Interim patches (1) :

Patch 12834812 : applied on Thu Mar 22 03:43:04 IST 2018
Unique Patch ID: 14522435
Created on 28 Jan 2012, 10:16:58 hrs PST8PDT
Bugs fixed:
12834812

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

OPatch succeeded.
[oracle@oem 12834800]$

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

Anuradha’s LinkedIn: Anuradha’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.