Applying patches to RAC environments (on Linux) in a rolling manner, with zero downtime to applications.

The scope of this post is to apply patches to RAC environments (on Linux) in a rolling manner, with zero downtime to applications.

Pre-requisites

  • RAC environment (2 or more nodes)
  • Application should be RAC aware
  • Refer the Note id (756671.1) to check if the patch we are applying is applicable for Rolling manner

racpat

Details of Environment

  • 2 node RAC Database setup on which Base version of 12.1.0.2 ASM and DB are setup

Patch Installation Steps

Current Patch Level: Base version install of 12.1.0.2 on both ASM and ORACLE DB Homes

Patch to be applied

Proactive Bundle patch on both ASM and ORACLE DB Homes. Patch # 24448103

Download the patch from Oracle Support

Sequence of applying Patch

In a 2 node RAC cluster, select any one of the node and start patching, in this document, 2nd node is chosen as the node that was patched first, followed by 1st node

Pre-patch install steps on 2nd node

Opatch version

Make sure the ‘opatch’ version of ASM_HOME and ORACLE_HOME (on both nodes) is on 12.1.0.1.7 and above

cd $ORACLE_HOME/OPatch

cd $ASM_HOME/OPatch

./opatch version

Patch Install steps on 2nd node

Create OCM configuration Response file (ocm.rsp)

Create the OCM Configuration Response file on 2nd node of RAC database

cd $ASM_HOME/OPatch/ocm/bin

./emocmrsp -no_banner -output ocm.rsp

This creates the ocm.rsp file.

  • Perform the conflict analysis check on the 2nd node as asm user (ASM_HOME owner)
  • Perform the conflict analysis check on 2nd node  with ORACLE_HOME owner
  • Check the space on the file system in which ASM OH is installed
  • Check the space on the file system in which Oracle DB Home OH is installed

Analyzing the patch before applying on 2nd node

./opatchauto apply bp/24448103 -analyze

Apply Patch on 2nd node

racpat1.png

Patching 2nd node of RAC:

Apply the patch on 2nd node of RAC  with root user ,

./opatchauto apply bp/24448103 -ocmrf <Location of OCM.rspfile>

The patch terminated the instance on 2nd node ; but the services on 1st node were intact (without a glitch) and the application is able to connect to Database without issue.

 

LMS was brought down to 0 because, only one node is active. Also, the 1st node of DB was being displayed in gv$instance.

racpat2

racpat3

The above screenshots shows that patch has been successfully applied on 2nd node.

Pre-patch install steps on 1st node

Create OCM configuration Response file (ocm.rsp) on 1st node

  • Perform the Conflict check on the 1st node of database with ASM Home owner
  • Perform the Conflict check on the 1st node of database with Oracle DB Home owner
  • Perform the space check on the server before starting the patch.

Analyzing the patch before applying on 1st node

Follow the same steps as mentioned above, for node 2.

Apply Patch on 1st node

Follow the same steps as mentioned above, for node 2.

Invoke “opatchauto” with root user and apply the patch

The Instance starts automatically after the patching activity.

Advertisements
This entry was posted in Oracle Database, Oracle RAC. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s