Thursday, April 10, 2014

Patching steps and details PSU

 Master link

http://www.oracleportal.org/

================



Very good link for oracle patching
===========================


What is Patch


http://www.oracleportal.org/knowledge-base/oracle-database/database-concepts/installation-and-patching/patching/patches.aspx



=================
OPATCH



http://www.oracleportal.org/knowledge-base/oracle-database/database-concepts/installation-and-patching/patching/opatch-utility.aspx


=================



Apply PSU Patch in Oracle
* You Must have two thing to apply PSU Patch :
1-Lastest version For Optach.
2-PSU Patch that you want to apply.


Steps:

$ORACLE_HOME/OPatch/opatch version
Output will be:
Invoking OPatch 11.2.0.1.7
OPatch Version:  11.2.0.1.7
OPatch succeeded

1-you need to Update latest version For Optach, to do this :

cd $ORACLE_HOME

cp -r Optach/ /u01/backup/Optach

**make sure you in ORACLE_HOME

rm -rf $ORACLE_HOME/Optach

unzip Optach_that_you_download_from_MOS inside $ORACLE_HOME.

Patch Number :6880880

2-Check Optach After Doing Above Steps :

$ORACLE_HOME/OPatch/opatch version
Output will be:
Invoking OPatch 11.2.0.3.0
OPatch Version:  11.2.0.3.0
OPatch succeeded

3-Apply PSU Patch By Doing the Following, for example :

unzip p13923374_11203_.zip
cd 13923374
opatch apply

Answer the question that you been asked by Oracle

4- Post Installation Steps :

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
 SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql psu apply
SQL> QUIT


==============

                                                                     How to Apply Patch

========================================================================

This is the latest Patch Set Update for the 11.2.0.2.0 RDBMS Home.
The OPatch utility version should be higher than 11.2.0.1.3 to apply the patch.

How to check and update the opatch utility?

1-you need to Update latest version For Optach, to do this :

cd $ORACLE_HOME

cp -r Optach/ /u01/backup/Optach

**make sure you in ORACLE_HOME

rm -rf $ORACLE_HOME/Optach


unzip Optach_that_you_download_from_MOS  inside $ORACLE_HOME.

Patch Number :6880880



=================================
Go to support.oracle.com and download the 12827726 Patch Set Update
Transfer the file on to the remote server
[I copied it to the /oratemp01/11202 directory on the remote server] and unzip the file using
unzip p12827726_112020_Linux-x86-64.zip
Set the environment variables.
I am going demonstrate by applying the patch to the 11.2.0.2.0 RDBMS Home.
export ORACLE_HOME=/u01/app/oracle/product/11.2.0/db11202_s
export PATH=$ORACLE_HOME/bin:$PATH:$ORACLE_HOME/OPatch
========================
Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
cd /oratemp01/11202/
[Note: This is the directory where I copied the psu zip file and unzipped]
================================
Run the following command

opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir ./12827726
=================================
Here is the output and you can notice that the pre-req checks succeed

Invoking OPatch 11.2.0.1.8
Oracle Interim Patch Installer version 11.2.0.1.8
Copyright (c) 2011, Oracle Corporation. All rights reserved.
PREREQ session
Oracle Home : /u01/app/oracle/product/11.2.0/db11202_s
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.8
OUI version : 11.2.0.2.0
Log file location : /u01/app/oracle/product/11.2.0/db11202_s/cfgtoollogs/opatch/opatch2011-11-10_09-21-35AM.log
Invoking prereq "checkconflictagainstohwithdetail"
Prereq "checkConflictAgainstOHWithDetail" passed.
OPatch succeeded.
==================
If you are applying the patch to the RDBMS_HOME;
shutdown all the databases associated with that RDBMS_HOME.
Apply the patch by issuing the following command.
You may be asked for your metalink credentials.
====================
cd 12827726
opatch apply


================================

[oracle@xyz 12827726]$ opatch apply
Invoking OPatch 11.2.0.1.8

Oracle Interim Patch Installer version 11.2.0.1.8
Copyright (c) 2011, Oracle Corporation. All rights reserved.

Oracle Home : /u01/app/oracle/product/11.2.0/db11202_s
Central Inventory : /u01/app/oracle/oraInventory
from : /etc/oraInst.loc
OPatch version : 11.2.0.1.8
OUI version : 11.2.0.2.0
Log file location : /u01/app/oracle/product/11.2.0/db11202_s/cfgtoollogs/opatch/opatch2011-11-10_09-21-45AM.log

Applying interim patch '12827726' to OH '/u01/app/oracle/product/11.2.0/db11202_s'
Verifying environment and performing prerequisite checks...

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 My
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/db11202_s')
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.2.0...
Patching component oracle.rdbms, 11.2.0.2.0...
Copying file to "/u01/app/oracle/product/11.2.0/db11202_s/psu/11.2.0.2.4/catpsu.sql"
Copying file to "/u01/app/oracle/product/11.2.0/db11202_s/psu/11.2.0.2.4/catpsu_rollback.sql"
Copying file to "/u01/app/oracle/product/11.2.0/db11202_s/cpu/scripts/patch_8837510.sql"
Copying file to "/u01/app/oracle/product/11.2.0/db11202_s/cpu/scripts/emdb_recomp_invalids.sql"
Patching component oracle.sysman.console.db, 11.2.0.2.0...
Patching component oracle.sysman.oms.core, 10.2.0.4.3...
Patching component oracle.ldap.rsf, 11.2.0.2.0...
Patching component oracle.rdbms.dv, 11.2.0.2.0...
Patching component oracle.rdbms.dbscripts, 11.2.0.2.0...
Patching component oracle.sysman.plugin.db.main.repository, 11.2.0.2.0...
Patching component oracle.rdbms.rman, 11.2.0.2.0...
Patching component oracle.sdo.locator, 11.2.0.2.0...
patch 12827726 successfully applied
Log file location: /u01/app/oracle/product/11.2.0/db11202_s/cfgtoollogs/opatch/opatch2011-11-10_09-21-45AM.log
OPatch succeeded.
=====================================
STARTUP the databases with the newly patched RDBMS_HOME,
set ORACLE_SID variable and load modified sql files into the database.
Perform these steps
export ORACLE_HOME=/u01/app/oracle/product/11.2.0.2/db11202_r
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
cd $ORACLE_HOME/rdbms/admin
sqlplus / as sysdba
At the sql prompt enter the following commands:
@?/rdbms/admin/catbundle.sql psu apply
QUIT

=======================================