February 18, 2015

Apply Jan 2015 PSU on 11.2.0.4

1. Download the Software from Oracle support
2.Transfer the software from our local system to client server using winscp.
3.  Comment out crontab entries on respective sever before applying patch to avoid alerts.
4. Blackout the target in OEM
5. Apply Patch using below steps
6. Uncomment crontab entries which was commented
7. Remove blackout in OEM
8. Ensure Database, Listener is up and running.

5. PSU APPLY STEPS (19769496- PSU JAN'15)
*******************
1) Pre-requisite check (Opatch Version check and Patch Conflict)
$ export PATH=$PATH:$ORACLE_HOME/OPatch
Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
$ unzip p 19769489_112040_SOLARIS64
$ cd 19769489
$ opatch prereq CheckConflictAgainstOHWithDetail -ph ./

Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation.  All rights reserved.
PREREQ session
Oracle Home       : /u01/app/oracle/product/11.2.0.4/ dbhome_1
Central Inventory : /u01/app/oracle/product/11.2.0.4/oraInventory
   from           : /u01/app/oracle/product/11.2.0.4/oraInst.loc
OPatch version    : 11.2.0.3.6
OUI version       : 11.2.0.3.0
Log file location : /u01/app/oracle/product/11.2.0.4/cfgtoollogs/opatch/opatch2015-02-13_00-26-40AM_1.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
Note: If OPatch version is not compatible then you need to apply the patch on OPatch first. Download the latest OPatch from Oracle support. Copy the latest OPatch software to OPatch directory resides in ORACLE HOME.
2)  Shutdown all oracle database services,listener.
 [oracle@ABC-TEST PSU_JAN15]$ lsnrctl stop LISTENER
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 10-FEB-2015 21:24:15
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
Down the database
[oracle@ABC-TEST PSU_JAN15]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Feb 10 21:25:16 2015
Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Release 11.2.0.4.0 - 64bit Production
SQL> select name,open_mode from v$database;
NAME      OPEN_MODE
--------- --------------------
ABC  READ WRITE
SQL> shut immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>
3)  Apply the OPatch
[oracle@ABC-TEST 19769489]$ opatch apply
Oracle Interim Patch Installer version 11.2.0.3.6                                                                                       Copyright (c) 2013, Oracle Corporation.  All rights reserved.                                                                 Oracle Home       : /u01/app/oracle/product/11.2.0.4/dbhome_1                                                               Central Inventory : /u01/app/oraInventory                                                                                                 from           : /u01/app/oracle/product/11.2.0.4/dbhome_1/oraInst.loc 
OPatch version    : 11.2.0.3.6                                                                                                                   OUI version       : 11.2.0.4.0 
Log file location : /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatch/opatch2015-02-10_21-32-06PM_1.log                                                                                                                                               
Verifying environment and performing prerequisite checks...       
OPatch continues with these patches:   19769489 
Do you want to proceed? [y|n] 
y                                                                                                                                                                 User Responded with: Y                                                                                                                           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 Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.                                                                 Email address/User Name: 
You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y                                             Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0.4/dbhome_1')                  
Is the local system ready for patching? [y|n]  y
User Responded with: Y                                                                                                                           Backing up files...                                                                                                     
Applying sub-patch '19769489' to OH '/u01/app/oracle/product/11.2.0.4/dbhome_1'
ApplySession: Optional component(s) [ oracle.oraolap, 11.2.0.4.0 ] , 
[ oracle.sysman.agent, 11.2.0.4.0 ]  not present in the Oracle Home or a higher version is found.                  
Patching component oracle.precomp.common, 11.2.0.4.0...
Patching component oracle.ovm, 11.2.0.4.0...
Patching component oracle.xdk, 11.2.0.4.0...
Patching component oracle.rdbms.util, 11.2.0.4.0...
Patching component oracle.rdbms, 11.2.0.4.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.4.0...
Patching component oracle.xdk.parser.java, 11.2.0.4.0...
Patching component oracle.rdbms.rsf, 11.2.0.4.0...
Patching component oracle.xdk.rsf, 11.2.0.4.0...
Patching component oracle.rdbms.rman, 11.2.0.4.0...
Patching component oracle.rdbms.deconfig, 11.2.0.4.0...
Verifying the update...
Composite patch 19769489 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatch/opatch2015-02-10_21-32-06PM_1.log
OPatch succeeded.
4) connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
$ sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @?/rdbms/admin/catbundle.sql psu apply

Note: If there are errors, refer to Section 5, "Known Issues". In READ ME.
The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series PSU.

SQL> select * from DBA_REGISTRY_HISTORY;
ACTION_TIME               ACTION                         NAMESPACE                      VERSION                                ID BUNDLE_SERIES                  COMMENTS
------------------------- ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ -----------------------------------
17-DEC-14 07.03.58.553848 APPLY                          SERVER                         11.2.0.4                                4 PSU                            PSU 11.2.0.4.4
 AM
10-FEB-15 09.45.48.024710 APPLY                          SERVER                         11.2.0.4                                5 PSU                            PSU 11.2.0.4.5
 PM
[oracle@ABC-TEST OPatch]$ opatch lsinv -bugs_fixed | grep -i psu
20074391   19769489  Tue Feb 10 21:34:21 EST 2015   PSU 11.2.0.3.13 POST-DEINSTALLATION CATBUNDLE
19727057   19121551  Tue Dec 16 14:43:35 EST 2014   HANDLE JVMPSU.SQL IN CATBUNDLE
18180390   18031668  Tue Dec 16 14:42:04 EST 2014   AFTER APPLYING DBPSU 11.2.0.4.1 DB PROCESSES GET
Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle or $ORACLE_BASE/cfgtoollogs/catbundle for any errors:
catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log
where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, refer to Section 5, "Known Issues".

5) Start the Listener
[oracle@ABC-TEST PSU_JAN15]$ lsnrctl start LISTENER
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 10-FEB-2015 21:24:15
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
The command completed successfully
[oracle@ABC-TESTDB PSU_JAN15]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 10-FEB-2015 21:20:31
Copyright (c) 1991, 2013, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.4.0 - Production
Start Date                17-DEC-2014 07:46:12
Uptime                    55 days 13 hr. 34 min. 19 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0.4/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/ABC-TESTDB/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Services Summary...
Service "ABC" has 1 instance(s).
  Instance "ABC", status READY, has 1 handler(s) for this service...
Service "ABCXDB" has 1 instance(s).
  Instance "ABC", status READY, has 1 handler(s) for this service...

Rollback Steps:
************
1.Shutdown the database and listener
2. Verify that an $ORACLE_HOME/rdbms/admin/catbundle_PSU_<database SID>ROLLBACK.sql file exists for each database associated with this ORACLE_HOME. If this is not the case, you must execute the step (Loading Modified SQL Files into the Database)
3. Cd 19769496
export PATH=$PATH:$ORACLE_HOME/OPatch
opatch rollback -id 19769496
4. STARTUP DATABASE
For each database instance running out of the ORACLE_HOME, connect to the database using SQL*Plus as SYSDBA and run the rollback script as follows:
cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle_PSU_<database SID>_ROLLBACK.sql
SQL> QUIT
5.      Check the log file for any errors. The log file is found in $ORACLE_BASE/cfgtoollogs/catbundle and is named catbundle_PSU_<database SID>ROLLBACK_<TIMESTAMP>.log where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS
6.      Start Listener