Posted by: Monish | November 29, 2017

Oracle ASM Patching Step-By-Step Approach

Oracle ASM patching using Opatch auto utility is a very common activity for Oracle DBAs. In this post I have tried to capture all the steps need to be performed to patch Oracle ASM/Grid and RDBMS homes in one go. The GRID patch is being installed here is 24436338

This article contains mostly the high level steps, feel free to reach me, by commenting below,  if you face any error or difficulties while  performing this activity.

1.0     Prerequisits:

1.1      Opatch Version Check:

Go through the Readme.txt of the patch to make sure all the DB and GI homes contains the recommended Opatch version.

$ /OPatch/opatch version

If it’s not present then Download the OPatch from Oracle Metalink utility to a temporary directory and unzip it to the DB/GI home.

$ unzip  -d 
$ /OPatch/opatch version

1.2      OCM Configuration

The OPatch utility will prompt for your OCM (Oracle Configuration Manager) response file when it is run. You should enter a complete path of OCM response file if you already have created this in your environment. OCM response file is mandatory and is not optional.

If you do not have the OCM response file (ocm.rsp).

$ export ORACLE_HOME=
$ $ORACLE_HOME/OPatch/ocm/bin/emocmrsp -output /ocm.rsp

1.3      Check for patch Conflict

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./ -invPtrLoc $ORACLE_HOME/oraInst.loc

2.0     Patch Installation

Connect to root

Set Grid Home

Execute opatch auto command

$ $ORACLE_HOME/OPatch/opatch auto  -ocmrf /ocm.rsp

[hostname:root]/opt/oracle>$ORACLE_HOME/OPatch/opatch auto /opt/oracle/24436338 -ocmrf /opt/oracle/product/11.2.0.4/grid/OPatch/ocm/bin/ocm.rsp

In the below sample Output you can see that at first its getting appled to RDBMS home than its applying it to GRID home:

Executing /opt/oracle/product/11.2.0.4/grid/perl/bin/perl /opt/oracle/product/11.2.0.4/grid/OPatch/crs/patch11203.pl -patchdir /opt/oracle -patchn 24436338 -ocmrf /opt/oracle/product/11.2.0.4/grid/OPatch/ocm/bin/ocm.rsp -paramfile /opt/oracle/product/11.2.0.4/grid/crs/install/crsconfig_params

This is the main log file: /opt/oracle/product/11.2.0.4/grid/cfgtoollogs/opatchauto2016-12-01_08-28-38.log

This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:

/opt/oracle/product/11.2.0.4/grid/cfgtoollogs/opatchauto2016-12-01_08-28-38.report.log

2016-12-01 08:28:38: Starting Oracle Restart Patch Setup

Using configuration parameter file: /opt/oracle/product/11.2.0.4/grid/crs/install/crsconfig_params

Stopping RAC /opt/oracle/product/11.2.0.4/dbhome_1 ...

Stopped RAC /opt/oracle/product/11.2.0.4/dbhome_1 successfully

patch /opt/oracle/24436338/24006111  apply successful for home  /opt/oracle/product/11.2.0.4/dbhome_1

patch /opt/oracle/24436338/23054319/custom/server/23054319  apply successful for home  /opt/oracle/product/11.2.0.4/dbhome_1

Stopping CRS...

Stopped CRS successfully

patch /opt/oracle/24436338/24006111  apply successful for home  /opt/oracle/product/11.2.0.4/grid

patch /opt/oracle/24436338/23054319  apply successful for home  /opt/oracle/product/11.2.0.4/grid

patch /opt/oracle/24436338/22502505  apply successful for home  /opt/oracle/product/11.2.0.4/grid

Starting CRS...

CRS-4123: Oracle High Availability Services has been started.

Starting RAC /opt/oracle/product/11.2.0.4/dbhome_1 ...

Started RAC /opt/oracle/product/11.2.0.4/dbhome_1 successfully

opatch auto succeeded.

 

Start the database

cd $ORACLE_HOME/rdbms/admin

sqlplus / as sysdba

startup

@catbundle.sql psu apply

 

3.0     Post patching activity

Recompile Invalid Objects

@?/rdbms/admin/utlrp.sql

Check if the latest patch version is reflecting from DB level. Alos chcek the opatch lsinventory of both the homes for the patch apply status.

set lines 300
set pages 30
col ACTION_TIME for a30
col ID for a10
col ACTION for a15
col VERSION for a15
col BUNDLE for a15
col COMMENTS for a30
select substr(action_time,1,30) as action_time, substr(id,1,10) as id,substr(action,1,10) as action,substr(version,1,8) as version, substr(BUNDLE_SERIES,1,6) as bundle, substr(comments,1,20) as comments from registry$history;

 
=========

Readers are leaders. You can only master the craft if you constantly study and keep up the hands-on practice. Following are some of the great books for your reference.

Please use the below links to grab your copy. Thank you! 🙂

Expert Oracle Database Architecture (by Thomas Kyte and Darl Kuhn) –> https://amzn.to/2EZ8eUE

Expert Oracle Database Architecture: Oracle Database 9i, 10g, and 11g Programming Techniques and Solutions –> https://amzn.to/2F17qPh

Oracle Database 12c DBA Handbook (Oracle Press) –> https://amzn.to/2F0tJoh
RMAN Recipes for Oracle Database 12c-A Problem-Solution Approach –> https://amzn.to/2EYY3ja
Oracle Database 12c Performance Tuning Recipes –> https://amzn.to/2F01uGj

Oracle RMAN 11g Backup and Recovery (Oracle Press) –> https://amzn.to/2NQ3OT9

OCA/OCP Oracle Database 12c All-in-One Exam Guide (Exams 1Z0-061, 1Z0-062, & 1Z0-063) –> https://amzn.to/2F0jTD0

OCA/OCP Oracle Database 11g All-in-One Exam Guide with CD-ROM –> https://amzn.to/2SPPJWJ

Expert Oracle RAC Performance Diagnostics and Tuning –> https://amzn.to/2NTXxWr

Pro Oracle Database 11g Administration (Expert’s Voice in Oracle) –> https://amzn.to/2NRj0iD

Advertisements

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

Categories

%d bloggers like this: