Home > Oracle Database / Applications Tips > Oracle database administrator > How to apply an Oracle patch
Oracle Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

ORACLE DATABASE ADMINISTRATOR

How to apply an Oracle patch


Elisa Gabbert, Associate Editor
07.03.2007
Rating: -4.33- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


[IMAGE]Part of our "How do I do that in Oracle?" series, this tip, compiled largely of expert advice from our Oracle installation and upgrades expert Maria Anderson, explains in detail how to apply a patch or patchset to your Oracle system.



First, determine if you are applying a patchset (e.g., 10.2.0.1 to 10.2.0.3) or a one-off patch or CPU patch. These are applied in different ways. 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. When you download the patchset, it will be accompanied by a detailed, step-by-step guide for how to apply the patchset.

The basic steps for applying the Oracle 9.2.0.7 patchset are (from "Patch to upgrade from 9.2.0.1.0 to 9.2.0.7.0"):

  • Download the patch from Metalink.
  • Unzip it on the database server.
  • Shut down all databases using the Oracle9i home.
  • Apply the patchset to the Oracle binaries.
  • Start up all databases using the Oracle9i home and run required SQL scripts within each database.

A one-off or CPU patch requires a Perl-based utility provided by Oracle called opatch. In either case, when you download the patch from Oracle's Metalink Web site, there are detailed instructions included about how to apply the patch. (To register for Metalink, you will need a valid Support Identifier (CSI). CSI numbers are unique support identifiers given to each customer with a current support contract.) You must read through the README file included with the patch and test applying the patch or patchset in a non-production environment prior to applying it in production. (From "How to apply patch to Oracle 10g on Linux?")

Depending on the patch ...


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Oracle database administrator
Understanding SQL string functions
What is the difference between a database engineer, architect and administrator?
Import on one table from dump file
Error during RMAN backup
Can I drop a column in SYS schema?
STATSPACK tool: transaction vs. execution measurement
Should I port from Microsoft Access?
How can I find statistics on total memory usage and database connections?
Installing multiple Oracle homes
Modifying SYS password in a RAC environment

Oracle database installation, upgrades and patches
How to use the Oracle Database Upgrade Assistant (DBUA)
Oracle delivers database fixes in Critical Patch Update
How to get the most out of Toad for Oracle 10
Coca-Cola Bottling swaps out Oracle for DB2
Oracle renews push into embedded open source software market
Oracle releases new database, says 11g upgrade will cut costs
Comparing servers for Oracle database 11g upgrades
Choosing the right server hardware is all about choosing the right software
The best of the Oracle 11g-ready servers
Can Sun shine running Oracle 11g?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
10g  (SearchOracle.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


you are attempting to install, the instructions may vary slightly. The basic steps are to download the patch you require from Metalink. Unzip the patch on the server where it is to be installed, start up the Oracle Universal Installer (OUI), point to the patch set and follow the prompts until installation of the patch is completed. Ensure that you first shut down all databases and listeners using this ORACLE_HOME, and that you have a backup of all your databases and software in case the patch application fails. If you have existing databases using this ORACLE_HOME, you will also have to run SQL scripts (depending on the patch) within the databases to upgrade them to the appropriate release level. (From "How to apply a patch on Oracle 9.2?" and "Unsure how to apply patch")

Sometimes when you attempt to apply a patch, you receive an error that says "There are no patches that need to be applied from the patchset ..." This can occur in any of the following cases:

  • when the installed software inventory is not updated (which can happen if you copied the ORACLE_HOME binaries from another node).
  • when you have installed the 32-bit version of the software, but have the 64-bit patchset (or vice versa).
  • when you choose the wrong ORACLE_HOME as your destination on one of the first screens of the installer for the patch set.
  • when the installed software inventory has become corrupted (removed, altered in a bad way by another install, etc.).

Unless one of these matches your situation and you know how to resolve the issue (like downloading the proper patch set version), then you may need to reinstall the software so that your inventory is updated properly. The best way to verify that the inventory is readable and contains what you think it does is to use the installer and click the "Installed Products" button on the first screen of the installer to view the installed products. There, you can verify which ORACLE_HOME you should be installing your patchset into. (From "Errors on attempting to apply patch")

For a more advanced patching tip, try Arup Nanda's recommendation to apply a patch or patchset to a new Oracle Home rather than the existing Oracle Home (taken from his article "Five DBA best practices").

Here are the steps:

  1. Install new Oracle Home
  2. Apply the patch to the new Home
  3. Shut down the database
  4. Change Oracle Home to the new location
  5. Start the database

In case of problems:

  1. Shut down the database
  2. Change Oracle Home to the old one
  3. Start the database
Here are the advantages:
  • The downtime is significantly reduced, to one-60th of the original time.
  • The risk is reduced significantly, as there is no rolling back a patch; you just go to the older version.
  • You can perform a "diff" on these two homes to see what changed. You can see the differences across multiple homes as well.
  • You can take several databases running on the same server to the new Oracle Home one by one.
  • You can see the various Oracle Homes and what patch level they are on using the inventory.

Return to "How do I do that in Oracle?"

Rate this Tip
To rate tips, you must be a member of SearchOracle.com.
Register now to start rating these tips. Log in if you are already a member.


Submit a Tip




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Oracle Development Solutions - SQL, J2EE, XML, SOA
HomeNewsTopicsTipsAsk the ExpertsMultimediaWhite PapersProductsBlogs
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2003 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts