Sunday, 29 July 2012

Applying Bug Fix Patches

Applying Bug fixes patches on oracle libraries using opatch utility:-


Necessary Steps:-

1) Download the Bug fix patch from metalink.


2) Change the owner of the patch file to oracle user.

# chown oracle:oinstall p7330434_111060_LINUX.zip

3) Set the PATH variable to locate the opatch utility.

$ export PATH=$PATH:$ORACLE_HOME/OPatch

4) unzip the patch and go the unzipped directory.

$ unzip p7330434_111060_LINUX.zip
$ cd 7330434

5) Check whether this patch can be applied online or its an offline patch

[oracle@linux11g 7330434]$ opatch query -all
Invoking OPatch 11.1.0.6.0

Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2011-06-02_09-06-52AM.log

--------------------------------------------------------------------------------
Patch created on 28 Oct 2009, 12:58:04 hrs PST8PDT
Need to shutdown Oracle instances: true
Patch is roll-backable: true
Patch is a rolling patch: true
Patch has sql related actions: false
Patch is a online patch: false
Patch is a portal patch: false

List of platforms supported:
46: Linux Intel

List of bugs to be fixed:
7330434: DBMS_MVIEW.REFRESH COMPLETE CAUSES ORA-600 [17147], ORA-600 [17114]

List of executables affected:
ORACLE_HOME/bin/oracle

List of optional components:
oracle.rdbms: 11.1.0.6.0

List of optional actions:
Update /u01/app/oracle/product/11.1.0/db_1/lib/libserver11.a with /kkzf.o
Update /u01/app/oracle/product/11.1.0/db_1/lib/libserver11.a with /qsmqutl.o
cd /u01/app/oracle/product/11.1.0/db_1/rdbms/lib
; make -f ins_rdbms.mk ioracle ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1

Possible XML representation of the patch:






7330434




--------------------------------------------------------------------------------

OPatch succeeded.


6) Review the above query, its states that the oracle instance has to be shutdown, hence shutdown the database.

7) Shutdown the database.


[oracle@linux11g software]$ export ORACLE_SID=test11g
[oracle@linux11g software]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jun 2 09:04:03 2011

Copyright (c) 1982, 2007, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

[oracle@linux11g software]$ lsnrctl stop

LSNRCTL for Linux: Version 11.1.0.6.0 - Production on 02-JUN-2011 09:04:47

Copyright (c) 1991, 2007, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully



8) Apply the patch


[oracle@linux11g 7330434]$ opatch apply
Invoking OPatch 11.1.0.6.0
Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2011-06-02_09-08-09AM.log

ApplySession applying interim patch '7330434' to OH '/u01/app/oracle/product/11.1.0/db_1'

Running prerequisite checks...

OPatch detected non-cluster Oracle Home from the inventory and will patch the local system only.


Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.1.0/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files and inventory (not for auto-rollback) for the Oracle Home
Backing up files affected by the patch '7330434' for restore. This might take a while...
Backing up files affected by the patch '7330434' for rollback. This might take a while...

Patching component oracle.rdbms, 11.1.0.6.0...
Updating archive file "/u01/app/oracle/product/11.1.0/db_1/lib/libserver11.a" with "lib/libserver11.a/kkzf.o"
Updating archive file "/u01/app/oracle/product/11.1.0/db_1/lib/libserver11.a" with "lib/libserver11.a/qsmqutl.o"
Running make for target ioracle
ApplySession adding interim patch '7330434' to inventory

Verifying the update...
Inventory check OK: Patch ID 7330434 is registered in Oracle Home inventory with proper meta-data.
Files check OK: Files from Patch ID 7330434 are present in Oracle Home.

The local system has been patched and can be restarted.


OPatch succeeded.

9) Check the status

[oracle@linux11g 7330434]$ opatch lsinventory
Invoking OPatch 11.1.0.6.0

Oracle Interim Patch Installer version 11.1.0.6.0
Copyright (c) 2007, Oracle Corporation. All rights reserved.


Oracle Home : /u01/app/oracle/product/11.1.0/db_1
Central Inventory : /u01/app/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.1.0.6.0
OUI version : 11.1.0.6.0
OUI location : /u01/app/oracle/product/11.1.0/db_1/oui
Log file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/opatch2011-06-02_09-09-29AM.log

Lsinventory Output file location : /u01/app/oracle/product/11.1.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2011-06-02_09-09-29AM.txt

--------------------------------------------------------------------------------
Installed Top-level Products (1): 

Oracle Database 11g 11.1.0.6.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch 7330434 : applied on Thu Jun 02 09:09:17 IST 2011
Created on 28 Oct 2009, 12:58:04 hrs PST8PDT
Bugs fixed:
7330434



--------------------------------------------------------------------------------

OPatch succeeded.

10) Start the oracle Instance and listener

[oracle@linux11g 7330434]$ export ORACLE_SID=test11g
[oracle@linux11g 7330434]$ sqlplus / as sysdba

SQL*Plus: Release 11.1.0.6.0 - Production on Thu Jun 2 09:09:55 2011

Copyright (c) 1982, 2007, Oracle. All rights reserved.

Connected to an idle instance.

SQL> startup
ORACLE instance started.

Total System Global Area 422670336 bytes
Fixed Size 1300352 bytes
Variable Size 348129408 bytes
Database Buffers 67108864 bytes
Redo Buffers 6131712 bytes
Database mounted.
Database opened.
SQL> !lsnrctl start
SQL> exit

No comments:

Post a Comment