Search Blog Post

Thursday, August 29, 2013

Applying CPUJan2011 Patch on 11.2.0.1.0/Linux(64 bit)



                                     Applying CPUJan2011 Patch on 11.2.0.1.0/Linux(64 bit)

1. Database version
SQL> select * from v$version;
BANNER
--------------------------------------------------------------------------------
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE     11.2.0.1.0             Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production


2. OS Version
[root@mydb Desktop]# uname -a
Linux mydb.mydomain.com 2.6.39-400.17.1.el6uek.x86_64 #1 SMP Fri Feb 22 18:16:18 PST 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@mydb Desktop]#

3. Download CPUJan2012 patch for 11.2.0.1
 Patch No 10248516 from support.oracle.com

4. Opatch Version
To apply CPUJan2012, OPatch utility version 11.2.0.1.0 or later to apply this patch. Oracle recommends that you use
the latest released OPatch 11.2, which is available for download from My Oracle Support patch 6880880 by
selecting the 11.2.0.0.0 release

[oracle@mydb ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@mydb ~]$ opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.5
Copyright (c) 2013, Oracle Corporation.  All rights reserved.

Oracle Home       : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.5
OUI version       : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2013-08-29_20-57-33PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2013-08-29_20-57-33PM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):

Oracle Database 11g                                                  11.2.0.1.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
--------------------------------------------------------------------------------
OPatch succeeded.


5. Sessions Status
Check How Many sesion are ACTIVE, If any found Ask Application team to bring down all Applications/Processes.

SQL> select username,count(*) from v$session where username is not null group by username;
USERNAME                                        COUNT(*)
------------------------------ ----------
SYS                                                                         1


6. Invalid Objects
SQL>  select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type order by owner,object_type;

OWNER                                                       OBJECT_TYPE                   COUNT(*)
------------------------------ ------------------- ----------
SCOTT                                          FUNCTION                       1
SCOTT                                          MATERIALIZED VIEW                   1
SCOTT                                          PACKAGE                                         2
SCOTT                                          PACKAGE BODY                             2
SCOTT                                          PROCEDURE                                    1


7. Status of Oracle Services
[oracle@mydb ~]$ ps -ef | grep smon
oracle   25478  5892  0 21:05 pts/0    00:00:00 grep smon
[oracle@mydb ~]$ ps -ef | grep tns
oracle   25482  5892  0 21:05 pts/0    00:00:00 grep tns

8. Take Cold Backup of Database & Backup of (ORACLE_HOME & Inventory)
--Preferred to have a user-managed backup

9. Apply Opatch
[oracle@mydb ~]$ export PATH=$ORACLE_HOME/OPatch:$PATH
[oracle@mydb 10248516]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.5
Copyright (c) 2013, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.5
OUI version       : 11.2.0.1.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/10248516_Aug_29_2013_21_13_26/apply2013-08-29_21-13-25PM_1.log

Applying interim patch '10248516' to OH '/u01/app/oracle/product/11.2.0/db_1'
Verifying environment and performing prerequisite checks...
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: tyagi.ankur07@gmail.com
Provide your My Oracle Support password to receive security updates via your My Oracle Support account.
Password (optional):          

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

Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Patching component oracle.rdbms.rsf, 11.2.0.1.0...

Patching component oracle.rdbms.dbscripts, 11.2.0.1.0...

Patching component oracle.rdbms, 11.2.0.1.0...

Patching component oracle.oraolap, 11.2.0.1.0...

Patching component oracle.rdbms.deconfig, 11.2.0.1.0...

Patching component oracle.javavm.server, 11.2.0.1.0...

Patching component oracle.precomp.common, 11.2.0.1.0...

Patching component oracle.network.rsf, 11.2.0.1.0...

Patching component oracle.network.listener, 11.2.0.1.0...

Patching component oracle.rdbms.dv.oc4j, 11.2.0.1.0...

Patching component oracle.sdo.locator, 11.2.0.1.0...

Patching component oracle.sysman.console.db, 11.2.0.1.0...

OPatch found the word "warning" in the stderr of the make command.
Please look at this stderr. You can re-run this make command.
Stderr output:
ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2091: warning: ignoring old commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/ins_precomp.mk:19: warning: overriding commands for target `pcscfg.cfg'
/u01/app/oracle/product/11.2.0/db_1/precomp/lib/env_precomp.mk:2091: warning: ignoring old commands for target `pcscfg.cfg'



Verifying the update...
Patch 10248516 successfully applied
OPatch Session completed with warnings.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/10248516_Aug_29_2013_21_13_26/apply2013-08-29_21-13-25PM_1.log

OPatch completed with warnings.

Note:- As per Metalink ID:  Opatch warning: overriding commands for target xxxx (Doc ID 1448337.1), we can safely ignore these warnings.


10. Post Installation
Database instance running on the Oracle home being patched, connect to the database using SQL*Plus using SYSDBA and run the catbundle.sql script as follows:

[oracle@mydb ~]$ cd /u01/app/oracle/product/11.2.0/db_1/rdbms/admin/
[oracle@mydb admin]$ ls catbundle.sql
catbundle.sql
[oracle@mydb admin]$ sqlplus '/as sysdba'
SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 29 21:29:07 2013
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
Connected to an idle instance.

SQL> startup
ORACLE instance started.
Total System Global Area  634679296 bytes
Fixed Size                                2216024 bytes
Variable Size                        486543272 bytes
Database Buffers               142606336 bytes
Redo Buffers                         3313664 bytes
Database mounted.
Database opened.

SQL> @catbundle.sql psu apply


11. Check the status from registry$history
SQL> select action, version, id, comments, bundle_series from registry$history where bundle_series like '%PSU%';
ACTION          VERSION                 ID COMMENTS        BUNDLE_SERIES
--------------- --------------- ---------- --------------- ---------------
APPLY           11.2.0.1                 4 PSU 11.2.0.1.4  PSU


12. Compile Invalid objects by executing “utlrp.sql”.
[oracle@mydb admin]$ ls utlrp*
utlrp.sql
[oracle@mydb admin]$ sqlplus '/as sysdba'

SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 29 21:39:48 2013

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


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

SQL> @utlrp.sql

Now, check invalid objects after patching and recompile

SQL> select owner,object_type,count(*) from dba_objects where status='INVALID' group by owner,object_type order by owner,object_type;

OWNER                                                       OBJECT_TYPE                   COUNT(*)
------------------------------ ------------------- ----------
SCOTT                                          PACKAGE                                         1
SCOTT                                          PACKAGE BODY                             1


13. OPatch status
[oracle@mydb ~]$ opatch lsinventory|grep 10248516
Patch  10248516     : applied on Thu Aug 29 21:20:48 IST 2013
     8588519, 8783738, 8834425, 9454385, 8856497, 8890026, 8721315, 10248516


1 comment:

  1. ThankQ..........Dear........U.......Made.........Our..........Job.........Easier..................................

    ReplyDelete