HOW TO APPLY ORACLE PATCH (OPATCH) To apply Opatch conditions are db and listener both must be down as opatch will update your current ORACLEHOME with patches. In single instance its not possible. But for RAC instance its possible.
Oracle issues product fixes for its software called patches. When you apply the patch to your Oracle software installation, a small collection of files are replaced to fix certain bugs. OPatch is an Oracle supplied utility that facilitates Oracle software patching.
A group of patches form a patch set. When you apply a patch set, many different files and utilities are modified. This results in a version change for your Oracle software, for example, from Oracle Database 10.2.0.1.0 to Oracle Database 10.2.0.2.0. To apply a patch set you use the Oracle Universal Installer (OUI).
This chapter describes how to manage Oracle software and apply patches in Oracle Real Application Clusters (Oracle RAC) environments using Enterprise Manager and the OPatch utility.
This chapter includes the following sections:
See Also:
Oracle Universal Installer and OPatch User's Guide for more information about using OPatch and applying patches to Oracle RAC
Configuring the Enterprise Manager Patch Interface
Oracle Enterprise Manager Database Control enables you to find the latest patch release on the Oracle MetaLink Web site and to download it to your Oracle home. There are two steps in configuring the Enterprise Manager Patch interface:
Setting Oracle MetaLink Credentials
To download patches from Oracle MetaLink using Enterprise Manager, you can give Oracle Enterprise Manager Database Control (Database Control) your login credentials so that it can log in to Oracle MetaLink automatically and search for patch releases. You must set these credentials before you can run the Patch wizard in Database Control.
Refer to Oracle Database 2 Day DBA for instructions on setting your Oracle MetaLink credentials.
Running the Refresh_From_Metalink Job
After you have configured the Oracle MetaLink credentials, you can create a job to search for critical patch advisories for your installed software.
To create a job to search for critical patch advisories on Oracle MetaLink, perform the following tasks:
Obtaining the Patch
You obtain patches and patch sets from Oracle MetaLink, which is the Oracle Support Services Web site, at
Active data studio torrent. Active@ Data Studio is a complete IT Technician's or IT Consultant's package that includes most powerful data recovery, data imaging, and secure data erasing set of software tools and utilities. Dec 03, 2018 email protected Data Studio is a collection of powerful and advanced tools that will help you batter manage your files and disk. By using this tool, you will be able to easily perform a wide variety of tasks, such as document and photo recovery, disk backup and restore, HDD health monitoring, secure data erasing, and much more. Active@ Data Studio includes a set of powerful desktop applications as well as a bootable image which can be copied to either an optical disk or a flash drive.
Refer to Oracle Database 2 Day DBA for information about configuring Enterprise Manager to access OracleMetaLink for patch queries and downloads.
You can view available patch releases at Oracle MetaLink by using Enterprise Manager. Viewing these updates is the first step in the Patch wizard, which you can use to download the patch to your Oracle home.
To start the Patch wizard with Enterprise Manager:
Preparing to Use OPatch
Before you apply the patch to your Oracle RAC database, your Oracle ASM installation, or to your Oracle Clusterware installation, there are a few steps to perform:
Check ORACLE_HOME Environment Variable
OPatch verifies if the Oracle home is present. You must ensure that the
ORACLE_HOME environment variable is set to the Oracle home of the product you are trying to patch. Check the respective vendor documentation for the details to set the environment variable.
Perform a Backup
It is highly recommended to back up the software directory you are patching before performing any patch operation. This applies to Oracle Database, Oracle ASM, or Oracle Clusterware software installation directories. You can back up the software installed in the specified
ORACLE_HOME using any method such as zip , cp -r , tar , and cpio to compress the ORACLE_HOME .
Stage the Patch on Each Node
If you use Enterprise Manager to download the patch, and you selected all the nodes in your cluster as targets for the patch, then the patch is automatically staged on those nodes. If you manually downloaded the patch from Oracle MetaLink, then you must copy the patch to each node.
Update the PATH Environment Variable
The
opatch binary file is located in the $ORACLE_HOME/OPatch directory. You can either specify this path when executing OPatch, or you can update the PATH environment variable to include the OPatch directory. For example, on RedHat Linux systems you would use a shell command similar to the following:
How To Apply Oracle Patch Using Opatch
You could also modify the shell profile script to have this variable configured every time you log in.
Configure SSH User Equivalency
Before you patch a system, make sure the user equivalency is working. You can use the following command to test user equivalency:
If the date is returned, then user equivalency between the source and destination node has been configured. If you see output similar to the following, then SSH user equivalency is not enabled:
To enable SSH User Equivalency:
Applying Patches
Patching in an Oracle RAC environment is slightly different compared to patching a single node. If OPatch detects a cluster, it uses Oracle Universal Installer to query the software inventory to find the local node name and node list.
Before you install a patch, you must stop all the applications running from the software directory that is being patched. In an Oracle RAC cluster, you may have to shut down additional applications, depending upon which software is being patched. The following table lists the applications to stop when patching Oracle software.
Table 10-1 Patching Oracle Home Directories
You can patch Oracle RAC in three different ways:
All Node Patching
In all node patching, all the nodes in the cluster are initially shut down and the patch is applied on all the nodes. After all the nodes have been patched, then all the
nodeapps on the nodes are restarted. This method is typically used for very critical patches and it leads to maximum downtime. OPatch uses this method if the patch cannot be applied in a rolling fashion and you did not specify the minimize_downtime option.
To implement all node patching:
Rolling Patching
In rolling patching, one group of nodes is shut down, the patch is applied to those nodes, and the nodes are brought back up. This is performed group by group, separately, until all the nodes in the cluster are patched. This is the most efficient means of applying an interim patch to an Oracle RAC, Oracle ASM, or Oracle Clusterware installation. By patching groups of nodes individually, there is zero downtime for the cluster database because at least one instance is available at all times on a different node.
While most patches can be applied in a rolling fashion some patches can not be applied in this fashion. The
README file for the patch indicates whether or not you can apply the patch using the rolling patch method. If the patch cannot be applied using the rolling patch method, then you must use either 'Minimum Downtime Patching' or 'All Node Patching' to apply the patch.
To apply a patch using the rolling patch method:
Minimum Downtime Patching
In minimum downtime patching, one set of nodes is shut down and the patch is applied to those nodes. After the first set of nodes has been patched, the second set of nodes is shut down. The first set of nodes is then restarted and the patch is applied to the second set of nodes. After the patch has been applied to the second set of nodes, those nodes are restarted. This method leads to less downtime for Oracle RAC, compared to having all the nodes shut down at the same time.
When you use the minimum downtime patching method, the following actions occur:
To apply a patch to your cluster database using the minimum downtime method:
Applying Patch Sets
Patch sets are a mechanism for delivering fully tested and integrated product fixes. All of the fixes in a patch set have been tested and are certified to work with each other. Because a patch set includes only low impact patches, it does not require you to certify applications or tools against the server.
For instructions on applying the 10.2.0.2.0 patch set to your Oracle RAC database and Oracle Clusterware installations on Red Hat Linux, refer to document 316900.1, 'ALERT: Oracle 10g release 2 (10.2) Support Status and Alerts' on the Oracle Metalink Web site.
This document provides a summary of the patch sets available for Oracle 10g Release 2. Using this document, you can easily locate and view the Patch Set Notes for your platform. For example, you can use a link to access document 368732.1, 'Oracle Database Patch Set Notes 10g Release 2 (10.2.0.2) Patch Set for Linux x86'. The Oracle Database Patch Set Notes document contains the following information:
To locate and review the Oracle Database 10g Release 2 (10.2) patch set information in document 316900.1:
Troubleshooting Patch Deployment
This section covers the following topics regarding troubleshooting patch deployment:
If you have problems applying a patch to your Oracle RAC database, review these solutions to common problems. If the problem you encountered is not listed, review the log and trace files, and refer to Oracle Universal Installer and OPatch User's Guide.
Updating the Node List for OPatch
If OPatch does not automatically detect Oracle RAC or its nodes, investigate the contents of the inventory and ensure they are complete.
If your node list is not complete, you can update it by using the
-updateNodeList flag of Oracle Universal Installer, as demonstrated in the following example:
Viewing Log and Trace Files
Logging and tracing is a common aid for debugging. OPatch maintains logs for all
apply , rollback , and lsinventory operations. The log files are located in the $ORACLE_HOME/cfgtoollogs/opatch directory. Each log file will be tagged with the time stamp of the operation. Log files are named as opatch_mm-dd-yyyy_hh-mm-ss.log , where mm-dd-yyyy is the current date and hh-mm-ss is the current time. Each time OPatch is executed, a new log file is created.
For example, if a log file is created on May 17, 2005 at 11:55 PM, then it will be named as follows:
OPatch also maintains an index of the commands executed with OPatch and the log files associated with it in the
history.txt file located in the $ORACLE_HOME/cfgtoollogs/opatch directory. A sample of the history.txt file is as follows:
Resolving the 'Not a valid patch area' Error
You might get this error if the directory that the OPatch utility is using to do the patch does not match the template for what it is checking, or if the OPatch utility is run from an invalid directory.
To correct the problem, start the OPatch utility from the directory where the patch to be installed has been unzipped and staged on disk. Or, you can use the following command when starting OPatch:
The
Patch_Shiphome directory should have the following structure:
![]() Resolving the 'Unable to remove a partially installed interim patch' Error
If the patching process is interrupted, you might get the 'Unable to remove a partially installed interim patch' when you try to install the patch a second time.
To resolve the partially-installed patch error:
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |