Simplified RAC Patching Scripts

Since the company I work for has deployed 6 node RAC clusters as their license/utilisation consolidation platform, I thought it was wise to invest some time into scripting a simplified solution to ease the patching process.

AsĀ the cluster is Admin Managed, the DBA’s make a conscious decision as to which nodes the instance is allowed to run on and depending on the criticality of the database, how many instances it is allowed to run. The DBA then manually disables the other instances to stop CRS from starting them on restarts.

Before I wrote these scripts, we were relying on crsctl stop crs with the default shutdown option being set to transactional for each database. However, it came apparent while tailing an instance alert log that CRS actually aborts the instances and ignores the default shutdown option, meaning sessions connected to the instances CRS was aborting would end up being killed and potentially cause issues with the applications.

The scripts are a little quick and dirty stop gap at the moment but perform the job required.

The workflow is broken down into the following steps and you must have User Equivalence configured between all nodes for these to work:

  1. Runs Pre-Checks as SYSDBA on all running databases.
  2. Sets all databases default shutdown mode to transactional. This is available from 11g onwards and waits for all running transaction to either commit or rollback.
  3. Generates a dynamic script to stop all theĀ instances running on the particular node you wish to stop for patching.


Work In Progress