Monday, December 2, 2013

Oracle Database 12c–Apply online patch

1. Make sure the patch can be apply online from patch readme file

Oracle Database 12c Release 12.1.0.1.1

ORACLE DATABASE Patch for Bug# 16527374 for Linux-x86-64 Platforms

This patch is RAC Rolling Installable - Please read My Oracle Support Document 244241.1 https://support.us.oracle.com/oip/faces/secure/km/DocumentDisplay.jspx?id=244241.1
Rolling Patch - OPatch Support for RAC.

This patch is Online Patchable - Please read My Oracle Support note 761111.1 on how to use/deploy an online patch


2. Pre-checking



[oracle@gc12c 16527374]$ $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.

PREREQ session

Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version : 12.1.0.1.0
OUI version : 12.1.0.1.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/opatch2013-12-02_21-24-29PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.




3. Apply the patch in online mode



[oracle@gc12c 16527374]$ $ORACLE_HOME/OPatch/opatch apply online -connectString cdborcl:sys:password
Oracle Interim Patch Installer version 12.1.0.1.0
Copyright (c) 2012, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/12.1.0/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.1.0/dbhome_1/oraInst.loc
OPatch version : 12.1.0.1.0
OUI version : 12.1.0.1.0
Log file location : /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/16527374_Dec_02_2013_21_25_05/apply2013-12-02_21-25-04PM_1.log


The patch should be applied/rolled back in '-all_nodes' mode only.
Converting the RAC mode to '-all_nodes' mode.
Applying interim patch '16527374' to OH '/u01/app/oracle/product/12.1.0/dbhome_1'
Verifying environment and performing prerequisite checks...
All checks passed.
Backing up files...

Patching component oracle.rdbms, 12.1.0.1.0...
Installing and enabling the online patch 'bug16527374.pch', on database 'cdborcl'.


Verifying the update...
Patch 16527374 successfully applied
Log file location: /u01/app/oracle/product/12.1.0/dbhome_1/cfgtoollogs/opatch/16527374_Dec_02_2013_21_25_05/apply2013-12-02_21-25-04PM_1.log

OPatch succeeded.


4. Check the database alert log



2013-12-02 21:25:08.921000 +08:00
Patch file bug16527374.pch is out of sync with oracle binary; performing fixup
Patch file bug16527374.pch has been synced with oracle binary
Patch bug16527374.pch Installed - Update #1
Patch bug16527374.pch Enabled - Update #2
Online patch bug16527374.pch has been installed
Online patch bug16527374.pch has been enabled



5. Things to take note



Extra memory required for online patches:



Ensure that you maintain adequate memory on your system to apply this online patch. To calculate the amount of memory required for this online patch, use the following formula:
Memory Consumed = (Number of Oracle Processes + 1) X (Size of Patched .pch File)



[oracle@gc12c 16527374]$ ls -l online/files/hpatch/bug16527374.pch
-rw-r--r--. 1 oracle oinstall 222801 Oct 14 17:28 online/files/hpatch/bug16527374.pch