Вы находитесь на странице: 1из 8

Introduction to Oracle Patches and Patchsets | SPU Vs.

PSU

BUG

A BUG is a mistake, or unexpected behavior, i.e. failing in the existing code or


functionality not performing as documented. We can get patch for a bug. If patch
is not available from MOS to fix our problem, need to open a case with MOS (Should
have MOS account to download patch).

What is MOS?

MOS means MY ORACLE SUPPORT also previously called METALINK.


METALINK is Oracle's Official Electronic On-line Support Service.

MOS requires a paid software license support contract. It offers technical support
notes, bug access, request tracking and patches. Users with a valid support
contract can register on Oracle’s metalink.

Oracle Support

Oracle uses CSI number to verify if a customer is eligible to receive Oracle


support. CSI means CUSTOMER SUPPORT IDENTIFIER (number). Customers with valid CSI
numbers can log SRs (Service Requests) on the metalink Website. When creating SR
on a METALINK, Oracle can start Web Conference using (OCS – Oracle Collaboration
Suite) to collect more specific information about the problem.

The CSI also used to identify a customer's account and track service requests.
Information contained within My Oracle Support is made accessible strictly to
registered MOS users, for reference purposes only.

If we have a MOS account, then we can download patches. We need a support contract
to obtain a MOS.

Oracle Patch and Patchset

Patches

 Patches are BUG FIXES for existing RDBMS Installation.


 Patches are released by oracle for bug fixes via METALINK. When releasing a
patch, Oracle provides (README File) that describes bug fixes (i.e. Clearly
specifies what are the various issues are resolved by the patch).
Types of Patches

 Patchset Exception - (PSE) / One-off Patch (or) Interim Patch.


 Upgrade patches i.e. Patchsets (Bug fixes).
 CPU (Commonly refers Security Patches).
 PSU (Bug Fixes and Security Patches).
 Patch bundle (recommended fixes for Windows and Exadata).
Definition of an Oracle Patch

Patches are software programs for individual BUG FIXES. Oracle issues product
fixes software, usually it is called as Patches, and it is used to fix a
particular problem (Bugs, Security weakness, Improving Performance etc.).

Patches are associated with particular versions of Oracle products. When we apply
patch to Oracle Software, a small collection of files are replaced to fix certain
bugs and database Version number doesn’t change.
Patches are available as Single Interim Patches and Patchsets (Patch Releases).
Patch Releases have release numbers. If we installed oracle 10.2.0.0, the first
patch release will have a release number of 10.2.0.1.

Exploring the Oracle DBA Technology by 8 Bits Virtual Training


Introduction to Oracle Patches and Patchsets | SPU Vs. PSU

Definition of an Oracle Patchset - (Patch Releases)

A Patchset is a TESTED and INTEGRATED set of product fixes. A group of patches


form a patch set (Bundle of patches). Patch sets are applied via OUI (Oracle
Universal Installer). Patch sets are usually applied to upgrade oracle version.
When we apply patch set many different files and utilities are modified. 10.2.0.1,
10.2.0.2..... , 10.2.0.5 are all Patchsets.

Patchsets Changing Oracle Database Version Number

We have to use Patchset 10.2.0.4.0 to upgrade from Base release 10.2.0.1.0 to


10.2.0.4.0 for more useful feature and to avoid bugs. Applying a Patchset usually
requires the use of the Oracle Universal Installer (OUI) and then running a script
inside each database using that $ORACLE_HOME.

Difference between Patch and Patchsets

Patches/Patch sets are fully tested and integrated product fixes. Patch release
affects the software residing in your Oracle home only. Patchsets allows our
database to get upgraded within base release. Patch releases are collections of
bug fixes that are applicable for all customers.

PSE and One–off Patches

PSE stands for PATCH SET EXCEPTION fixing particular bug.


One off patch also known as Interim Patches (Official name)
One off patch usually refers to a patch which addresses a specific bug.

About Interim Patches

Interim patches are bug fixes to specific bugs.


Interim patches address individual software bugs.
Interim patches are not cumulative and can be applied via opatch.
Oracle releases Interim Patches frequently to fix a bug or set of bugs.
We can get it by specifying patch ID in MY ORACLE SUPPORT.

POINTS TO NOTE

Interim patch given to customers in critical need, the main purpose is business
customers who cannot wait until the next Patch Set or new product release to get a
fix.

Managing Oracle Software and Applying Patches

Some Patches are for Software only.


Some Patches affect both Software and Database.

If my database needs a Patch, How can I identify?

When upgrading an oracle database from Version to Version, need to apply patch for
database. Ex: (From 10.2.0.1 to 10.2.0.4).

If My Oracle Software needs a Patch, How can I identify?

When we apply the patch to Oracle Software Installation, a small collection of


files are replaced to fix certain bugs.
Local inventory contains patch level for $ORACLE_HOME.
The Local Inventory gets updated whenever a patch is applied using OUI.

Exploring the Oracle DBA Technology by 8 Bits Virtual Training


Introduction to Oracle Patches and Patchsets | SPU Vs. PSU

Oracle Database Release Number 10g

Oracle periodically produces new releases.


Five (5) numbers may be required to fully identify a release.

 The First Digit (10) is Most General Identifier. Major Oracle database release
number, it contains significant new functionality.
 The Second Digit (2) Database maintenance release no, some new features also
included or BUG fixes to existing release (10.1.0)
 The Third Digit (0) Application Server release no, (OracleAS).
 The Fourth Digit (4) is Component Specific/Patch Release no A Patch release
contains fixes for serious bugs. Different components have different numbers.
Ex: Component Patch Sets.
 The Fifth Digit (0): Platform Specific Release No, Usually this is a Patchset.
It usually fixes or works around a particular, critical problem.

Check Current Release Number

SQL > SELECT * FROM PRODUCT_COMPONENT_VERSION;

CPU (SPU) vs. PSU:

Keeping Oracle database software up to date is a critical and time consuming task
for DBAs. Let’s see difference between CPU and PSU and which one should apply?

 Patch Set Update (PSU)


 Critical Patch Update (CPU)
 PSU and CPU both also quarterly delivered by Oracle.
Overview of CPU

CPU was introduced in JAN 2005 to provide SECURITY FIXES.


CPU’s are sets of patches containing fixes for security fault.
Critical Patch Updates are Collections of Security fixes for Oracle Products. They
are available to customers with valid support contracts.

CPU PATCHES ARE ALWAYS CUMULATIVE, that means fixes from previous Oracle security
alerts and critical patch updates are included in current patch. However each
advisory describes only the security fixes added since the previous Critical Patch
Update advisory. (Not required to have previous security patches applied before
applying the latest patches).

Critical Patch Updates and Security Alerts for information about Oracle Security
Advisories.

CPU patches are collection of patches applied to fix multiple security


vulnerabilities. Suppose after applying latest Patchset for current release; If
there is any bug occurrence , then oracle release CPU patches in regular
interval is used to fix those bug. CPU patch based on latest Patchset.

Exploring the Oracle DBA Technology by 8 Bits Virtual Training


Introduction to Oracle Patches and Patchsets | SPU Vs. PSU

Overview of PSU

 PSU was introduced in JULY 2009.


 PSU is limited from 25 to 100 new bug fixes.
 PSU’s are also well tested by Oracle compared to one off patches.
 PSU are patch sets but some major differences respect to regular patch sets.
 Oracle Introduced new method for patching i.e. Patch set Updates or PSU.
 PSUs are cumulative and include all of the security fixes from CPU patches,
plus additional fixes. An Oracle PSU having recommended bug fixes and
"proactive" cumulative patches, so the DBA choose to apply all patches in the
PSU patch bundle (which includes additional fixes).

Advantages of PSU

 PSU Supports Zero downtime Patching.


 In RAC, each node is Patched Separately no downtime.
 PSU includes a couple of one-off patches and CPU

If PSU patch is applied, we cannot apply CPU patch (until dB upgrade to new
version) - Any Specific reason?

 10.2.0.4.1  1 indicates for PSU patch.


 If we have 10.2.0.4 then it is well contain all fixes in 10.2.0.3

So, the fifth no of the database version is incremented for each PSU. All PSUs
are denoted by the last digit - (10.2.0.4.1, 10.2.0.4.2). The initial PSU is
version 10.2.0.4.1, the next PSU for Release will be 10.2.0.4.2 and so on.

If we choose to apply CPU, then last digit will indicate to CPU


If we choose to apply PSU, then last digit will indicate to PSU

Once a PSU is applied, only PSU can be applied in future quarters until the
databases is upgraded to new base version.

How can we check applied Patch?

CPU  select * from registry$history;


PSU  opatch lsinv -bugs_fixed | grep -i PSU
PSU  opatch lsinventory -bugs_fixed | grep -i 'DATABASE PSU'

PSUs are referenced by their 5th place in the Oracle version numbers which makes
it easier to track (e.g. 10.2.0.3.1) and will not change the version of oracle
binaries (like sqlplus, exp/imp etc.)

Best Suggestion

My Preference always goes with PSU, no need to apply CPU patch because (PSU
Contains CPU). In other words CPU is a subset of the PSU.

See here, a complete list of patches in 10.2.0.4, Zillions of patches:


http://www.eygle.com/Notes/10204_buglist.htm

Exploring the Oracle DBA Technology by 8 Bits Virtual Training


Introduction to Oracle Patches and Patchsets | SPU Vs. PSU

How to check applied patches on Oracle database?

 opatch lsinventory
 opatch lsinventory - details
 SQL> select * from sys.registry$history;

ADDITIONAL POINTS TO REMEMBER

 PSU = Bug Fixes + CPU


 We cannot apply CPU over PSU
 CPUs are applied only on the base release version.
 CPUS are collection of security fixes for Oracle Products.
 PSU includes a couple of one-off patches and CPU.
 We cannot apply a CPU patch once a PSU patch has been applied.
 PSUs and CPUs are applied via opatch utility.
 PSU patches can be applied on the base release version or on TOP of any earlier
Patch set update. So, 10.2.0.4.3 can be installed on the top of the base
10.2.0.4.0, PSU 10.2.0.4.1, PSU 10.2.4.0.2
 Patch set updates are available only for oracle database server 10.2.0.4 and
later.
 Patch sets are cumulative bug fixes that fix all bugs and consume all patches
since the last base release. Patchset are usually applied through OUI-based
product specific installers.
 The Local Inventory gets updated whenever a patch is applied using OUI. One or
more executable files, like sqlplus or rman, is changed. No changes are made to
the database content.
 MRL patch is created by putting several fixes into a single patch.

Simple diagram for CPU and PSU

CPU CPU
PSU

Fig: Critical Patch Update (CPU) is a subset of the Patch Set Update (PSU)

Exploring the Oracle DBA Technology by 8 Bits Virtual Training


Introduction to Oracle Patches and Patchsets | SPU Vs. PSU

CPU has been renamed to SPU

SPU patches are the same as previous CPU patches, just a new name. Security Patch
Update (SPU) terminology is introduced in the Oct 2012. Critical Patch Update as
the term for the quarterly security patch.

Patch Set Updates (PSU) was added as cumulative patches that included priority
fixes as well as security fixes.

Patch Conflicts

If a patch has been applied, all the bugs fixed by that patch could reappear after
another patch is applied. This is called a conflict situation. OPatch detects such
situations and raises an error when it detects a conflict.

What is OPTACH?

Opatch is a JAVA based Oracle Utility.


Opatch is the Oracle databases Interim (one-off) Patch Installer.

One-off bug fixes, we can use opatch to apply them. Opatch assists to apply
interim patches to Oracle’s software and removes interim patches from Oracle
software. Opatch also able to Report already installed interim patch and can
detect conflicts (when already interim patch has been applied).

Opatch Supports

 Applying an interim Patch.


 Reporting on installed products and interim patches.
 Rolling back (Removes) the application of an interim patch.
 Detecting a conflict and raises an error about conflict situation

Check Opatch Version and Options

If Opatch version is not compatible, check the readme file and download the latest
version and decompress in $ORACLE_HOME.
For the latest information about the OPatch utility, to check for updates, and to
get the latest versions, from (MOS).

Basic Syntax and Help Options

$ export PATH=$ORACLE_HOME/OPatch:$PATH
$ which opatch

$ cd $ORACLE_HOME/OPatch
$ opatch -help

$ cd $ORACLE_HOME/OPatch
$ opatch lsinventory
Copyright (c) 2005, Oracle Corporation. All rights reserved..

UNIX is case sensitive. 'Opatch'! = 'opatch’

Interim patches that are installed with Oracle's OPatch Utility can be listed by
invoking the linux > opatch command with the lsinventory option.

Exploring the Oracle DBA Technology by 8 Bits Virtual Training


Introduction to Oracle Patches and Patchsets | SPU Vs. PSU

Getting help from opatch

$./opatch -help or $ opatch –help


Usage: opatch [-help] [-r [eport]] [command]
command := apply
lsinventory
query
rollback
version
<global_arguments>:= -help Displays the help message for the command.
-report Print the actions without
executing (deprecated).
example:
'opatch -help'
'opatch apply -help'
'opatch lsinventory -help'
'opatch rollback -help'
OPatch succeeded.

Commonly Used Opatch Commands

$ opatch apply Installs an interim patch


$ opatch napply Installs n number of patches
$ opatch rollback Removes (rollback) an interim patch
$ opatch lsinventory Lists what is currently installed on the system.
$ opatch query Queries a given patch for specific details.
$ opatch version Prints the current Version of the patch tool

Correct Version of Opatch for RDBMS

We can verify whether the Opatch version for RDBMS release is correct or not using
metalink note [ID 357221.1.].

Opatch latest version is p6880880.


Opatch log files can be found at $ORACLE_HOME/cfgtoollogs/opatch
Opatch program requires Java (JVM) to be present on the current system.

OUI vs. Opatch

Why two different utilities are used?

Oracle offers two utilities for software deployment.

OUI is use to install Oracle Products.


Opatch is use to apply interim Patches.

 Oracle Version upgrades, we use OUI.


 One-off bug fixes, we use opatch to apply them.
 Sometimes the instructions tell to run OUI.
 Sometimes the instructions tell to use opatch...

Opatch assists with the process of applying interim patches to Oracle's software.
OUI performs component-based installations as well as complex installations, such
as integrated bundle and suite installations.

Can we check latest patch installed?

Yes, On Oracle version (10g) we can query dba_registry_history and/or


sys.registry$history (as SYS DBA) to get patch information from within the
database.

Exploring the Oracle DBA Technology by 8 Bits Virtual Training


Introduction to Oracle Patches and Patchsets | SPU Vs. PSU

POINTS TO REMEMBER

 Bundle patch is for (Windows).


 PSU and CPU (SPU) are applied via Opatch Utility
 Several Individual patches under one patch ID this is Merge Patch.
 Always should read the README.txt before applying the patch. This file contains
important information and instructions that must be followed prior to applying
patch.
 Generic patches are generally contains a correction for an SQL script (.sql), a
PL/SQL script (.sql, .plb), or a Java class. It can be identifying from the
name of the patch file: p<patchid>_<release>_GENERIC.zip.
 Patch set is a Software package that contains a large number of error
corrections. The patch sets are cumulative. We must use OUI to apply this.
Patch sets provide bug fixes only and do NOT include new functionality. It is
fully tested and integrated product fixes.
 We can no longer remove a patch set that has been applied. When you apply a
patch set, the Oracle version also changes (for example, 10.2.0.2, 10.2.0.4).
 If we apply wrong patch to oracle home, we can always rollback the patch using
following command. opatch rollback -id <Patch Number>.

Upgrading Oracle 10g database from 10.2.0.1 to 10.2.0.4

If we facing any regular errors which are not resolved by efforts and should go to
oracle support for those errors and if they recommend to upgrade then should do
the upgrade activity.

Patch no: 6810189


Database Product: Oracle 10.2.0.1
Operating System: Oracle Enterprise Linux (OEL) 4.4

We can upgrade our Oracle database to 10.2.0.4 either using DBUA or Manual method.
DBUA – Database upgrade assistant is used to upgrade database to higher versions
just like DBCA. Database Upgradation steps are explained separately.

Exploring the Oracle DBA Technology by 8 Bits Virtual Training

Вам также может понравиться