Tuesday, March 29, 2011

Implementing DB patch

Below are the steps for implementation of a DB patch for our case:


-- ------------------------------------------------------------------------
-- Database Machine (DBM) Overlay Patch for Bug 11661824 for Oracle Exadata
---------------------------------------------------------------------------
-- -------------
-- Prerequisites
-- -------------

1. (BP8) 10389035 is already applied and dismount all DBFS

2. latest Opatch [already installed for BP8]

3. Verify the OUI Inventory:

** Logon to each(4) DB Machine and follow below steps:

For GI HOME:
------------
$ echo $ORACLE_HOME
/u01/app/11.2.0/grid

$cd $ORACLE_HOME/OPatch
$./opatch lsinventory

For DB HOME:
------------
$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/dbhome_1

$ cd $ORACLE_HOME/OPatch
$ ./opatch lsinventory

[If the command errors out, contact Oracle Support]

4. Create a location PATCH_TOP

** Logon All 4 DB Machine and follow below steps:

$ mkdir /u01/app/patch/p11661824_112010_Linux-x86-64
$ export PATCH_TOP=/u01/app/patch/p11661824_112010_Linux-x86-64
$ unzip -d $PATCH_TOP p11661824_112010_Linux-x86-64.zip

-- ------------
-- Installation
-- ------------

**for all 4 nodes repeat below steps [steps 5 to 7]:

5. Install Patch on GI_HOME
- As oracle run below:
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
$ $ORACLE_HOME/bin/srvctl stop instance -d db_name -n node_name

- As root run below:
# /u01/app/11.2.0/grid/bin/crsctl stop crs
# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -unlock

- As oracle run below:
$ export ORACLE_HOME=/u01/app/11.2.0/grid
$ export PATH=$PATH:$ORACLE_HOME/OPatch
$ which opatch
/u01/app/11.2.0/grid/OPatch/opatch
$ export PATCH_TOP=/u01/app/patch/p11661824_112010_Linux-x86-64
$ cd $PATCH_TOP/11661824
$ opatch apply -local

- As root run below:
# /u01/app/11.2.0/grid/crs/install/rootcrs.pl -patch
# /u01/app/11.2.0/grid/bin/crsctl check crs

- As oracle run below:
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
$ $ORACLE_HOME/bin/srvctl start instance -d db_name -n node_name

6. Install Patch on DB_HOME [Start a new session to unset ENV variable in step:5]
- As oracle run below:
$ export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
$ $ORACLE_HOME/bin/srvctl stop home -o /u01/app/oracle/product/11.2.0/dbhome_1 -s stat_file_location -n node_name
$ export PATH=$PATH:$ORACLE_HOME/OPatch
$ which opatch
/u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch
$ export PATCH_TOP=/u01/app/patch/p11661824_112010_Linux-x86-64
$ cd $PATCH_TOP/11661824
$ opatch apply -local
$ $ORACLE_HOME/bin/srvctl start home -o /u01/app/oracle/product/11.2.0/dbhome_1 -s
tat_file_location -n node_name

-- --------------
-- Deinstallation
-- --------------

7. **for all 4 nodes repeat steps 5 to 6] except use "opatch rollback -id 11661824 -local" inetead of "opatch apply -local"

No comments:

Post a Comment