36963280-sapnote-0000839182

10
26.08.2010 Page 1 of 10 SAP Note 839182 - Installing patches using OPatch Note Language: English Version: 62 Validity: Valid Since 17.06.2010 Summary Symptom OPatch This note describes how to install Oracle database patches using the Oracle tool "OPatch" in the SAP environment. This note applies to Oracle Releases 10.2 and 11.2. For Oracle Release 9.2, see Note 306408. General information about OPatch OPatch is used for the installation of Oracle database patches both on UNIX/Linux platforms and on Windows platforms. There are different patch variants (generic, merge, bundle, and so on). For more information about these, see Note 839187. The complete documentation for OPatch is available in the " Universal Installer and OPatch User's Guide for Windows and UNIX" in the Oracle online documentation. Other terms Reason and Prerequisites You use OPatch in the SAP environment with Oracle Release 10.2 and 11.2. Solution Contents General information and prerequisites for OPatch Overview of OPatch commands Displaying installed patches SAP-specific OPatch version Installing a new OPatch version Installing patches on UNIX/Linux Installing patches on Windows Installation of several patches with "napply" Appendix A: Descriptions and abbreviations Appendix B: Technical overview of OPatch versions General information and prerequisites for OPatch o OPatch is in the Oracle Home in the directory OPatch.

Upload: gchandan

Post on 24-Apr-2015

21 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: 36963280-sapnote-0000839182

26.08.2010 Page 1 of 10

SAP Note 839182 - Installing patches using OPatch

Note Language: English Version: 62 Validity: Valid Since 17.06.2010

Summary

Symptom

OPatch

This note describes how to install Oracle database patches using the Oracletool "OPatch" in the SAP environment.

This note applies to Oracle Releases 10.2 and 11.2.For Oracle Release 9.2, see Note 306408.

General information about OPatch

OPatch is used for the installation of Oracle database patches both onUNIX/Linux platforms and on Windows platforms. There are different patchvariants (generic, merge, bundle, and so on). For more information aboutthese, see Note 839187.

The complete documentation for OPatch is available in the "Universal Installer and OPatch User's Guide for Windows and UNIX" in theOracle online documentation.

Other terms

Reason and Prerequisites

You use OPatch in the SAP environment with Oracle Release 10.2 and 11.2.

Solution

ContentsGeneral information and prerequisites for OPatchOverview of OPatch commandsDisplaying installed patchesSAP-specific OPatch versionInstalling a new OPatch versionInstalling patches on UNIX/LinuxInstalling patches on WindowsInstallation of several patches with "napply"

Appendix A: Descriptions and abbreviationsAppendix B: Technical overview of OPatch versions

General information and prerequisites for OPatch

o OPatch is in the Oracle Home in the directory OPatch.

Page 2: 36963280-sapnote-0000839182

26.08.2010 Page 2 of 10

SAP Note 839182 - Installing patches using OPatch

o The same operating system user that was used to install the Oraclesoftware is also used for installing or uninstalling patches usingOPatch. For UNIX/Linux, this is the user ora<dbsid>; for Windows,this is the user <sapsid>adm.

o OPatch requires that the environment variable ORACLE_HOME is set.

o Without extending the search path, you can call OPatch in thefollowing way:UNIX : OS> $ORACLE_HOME/OPatch/opatch [command] [options]Windows: OS> %ORACLE_HOME%\OPatch\opatch [command] [options]

o Note the information specified in the patch README.txt, especially:

- Pre-installation steps

- Post-installation stepsFor generic patches, you generally have to execute SQL scriptsor SQL commands after installing the relevant patch to ensurethat it becomes effective.

o Before you install or uninstall patches, you must stop all of theinstances and processes that were started from the ORACLE_HOME. OnWindows, you must also stop the database services (listener, agent,and DB service).

o You can install several Oracle database patches in directsuccession without having to restart the Oracle instance after eachpatch, provided that the patch description does not contain otherinstructions (for UNIX, see Note 1027012 about MOPatch).

o You can use both OPatch (see below, lsinventory) and the UniversalInstaller to determine the patches that are currently installed.

o After you install or uninstall one or more patches, execute 'opatchIsinventory' to log the new patch status in an OPatch log.

o The OPatch log files are stored in the directory ORACLE_HOME/cfgtoollogs/opatch. In addition to these action logsfor each individual OPatch action, OPatch also logs all the OPatchactivities in a summary log opatch_history.txt in the samedirectory. OPatch inventory listings are also stored in thedirectory ORACLE_HOME/cfgtoollogs/opatch/lsinv.

Overview of OPatch commands

o Displaying the OPatch versionOS> opatch version

o Displaying the online helpOS> opatch -help

o Displaying the online help for a certain commandOS> opatch <command> -help<command> = apply, rollback, lsinventory, util

Page 3: 36963280-sapnote-0000839182

26.08.2010 Page 3 of 10

SAP Note 839182 - Installing patches using OPatch

o Displaying the Oracle inventory (see below)OS> opatch lsinventory [-all][-detail]

o Installing a patch (see below)OS> opatch apply

o Installing several patches (see below)OS> opatch napply

o Uninstalling a patch (see below)OS> opatch rollback -id <patchid>

o Special functions of OPatchOS> opatch util

o Cleanup of the patch storage directoryOS> opatch util cleanup

When you install patches using MOPatch (UNIX/Linux), the patchstorage directory is automatically cleaned up by default using thisoption.

o You can use the option -silent to suppress the user query'Is the local system ready for patching?' and the command (forexample, opatch apply) is executed without further query. Youshould use the option -silent only if you are certain that theOracle instance and all of the processes from the affectedORACLE_HOME have been stopped.

o You can also specify the option -verbose for each OPatch command toobtain detailed information about the patch process.

Displaying installed patches

'opatch lsinventory' shows the patches that are currently installed.

UNIX : OS> $ORACLE_HOME/OPatch/opatch lsinventory [-all] [-details]Win : OS> %ORACLE_HOME%\OPatch\opatch lsinventory [-all][-details]

o 'opatch lsinventory -all' shows all of the registered Oracle Homes.

o 'opatch lsinventory -details' shows detailed information about eachindividual patch (module, make objects, and so on).

o 'opatch lsinventory -group_by_date' shows patches day by day andgrouped according to installation date.

SAP-specific OPatch version

An SAP-specific version of OPatch is available on SAP Service Marketplace,which you should install before you begin to install patches. The SAPversion of OPatch can be identified from the following message:

Page 4: 36963280-sapnote-0000839182

26.08.2010 Page 4 of 10

SAP Note 839182 - Installing patches using OPatch

OS> <opatch> version========================================================GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY========================================================

Installing a new OPatch version

From time to time, you will have to install a new version of OPatch, forexample, because the patch description requires a specific version or toinstall the generic SAP version. The OPatch version that corresponds to therelevant Oracle release is then available on SAP Service Marketplace (link:http://service.sap.com/oracle-download)

o For Oracle Release 11.2.0.1:--> Oracle-----> Oracle 11.2.0.1---------> OPatch

o For Oracle Release 10.2.0.4:--> Oracle-----> Oracle 10.2.0.4---------> OPatch (only for Release 10.2.0.4)

o For Oracle Release 10.2.0.2:--> Oracle-----> Oracle other---------> OPatch 10.2 (only for Release 10.2.0.2)

For Oracle Release 10.2.0, do not use any old OPatch version fromthe directory 'Oracle other' -> 'Tools'.

The procedure is as follows:

1. Download the relevant file with the new OPatch version from SAPService Marketplace and copy this file to the Oracle Home.

2. Rename the previous, old OPatch directory.UNIX: OS> cd $ORACLE_HOMEOS> mv OPatch OPatch.SAVEProceed accordingly on Windows.

3. Unpack the new version of OPatch:UNIX: OS> cd $ORACLE_HOMEOS> unzip -d $ORACLE_HOME OPatch_<release>.zipProceed accordingly on Windows.

4. After this, the installation is complete and the new OPatch version isready for use.

Installing patches on UNIX/Linux

Page 5: 36963280-sapnote-0000839182

26.08.2010 Page 5 of 10

SAP Note 839182 - Installing patches using OPatch

On Unix/Linux platforms, you should install patches only with MOPatchbecause of the many advantages. For more information about MOPatch, seeNote 1027012.

The general procedure for manually installing a patch using OPatch is asfollows:

1. For each Oracle patch set release, you must first create a separatepatch base directory <patch_base_dir>.

For example:OS> mkdir patches.11201 (for Release 11.2.0.1)OS> mkdir patches.10204 (for Release 10.2.0.4)

2. Copy the patch file(s) <patchfile> to be installedto the base directory and unpack the file there. In this case, anindividual patch directory <patch_dir> is created in the basedirectory for each individual patch.

OS> cp <patchfile> <patch_base_dir>OS> cd <patch_base_dir>OS> unzip <patchfile>

3. Stop the instance and all of the Oracle processes of the relevantORACLE_HOME.

4. Before installing the patch, you should save the Oracle Home and theOracle inventory.

5. Install the patch or the patches as follows:

Option 1: Calling OPatch specifying the patch directoryOS> $ORACLE_HOME/OPatch/opatch apply <patch_dir>

Option 2: Calling OPatch directly from the patch directoryOS> cd <patch_dir>OS> $ORACLE_HOME/OPatch/opatch apply

6. Note the information specified in the patch README with regard to therequired post-installation steps.

7. Optional: Clean up the patch storage directory (Cleanup)OS> $ORACLE_HOME/OPatch/opatch util cleanup

Installing patches on Windows

For the installation, note the exact installation instructions from thepatch README.

1. For each Oracle patch set release or Patch Set Update (PSU) Release,you must first create a separate patch base directory<patch_base_dir>.

For example:OS> mkdir patches.11201 (for Release 11.2.0.1)OS> mkdir patches.10204 (for Release 10.2.0.4)

Page 6: 36963280-sapnote-0000839182

26.08.2010 Page 6 of 10

SAP Note 839182 - Installing patches using OPatch

2. Copy the patch to be installed to the base directory and unpack itthere (for example, using zip or winzip) in the directory <patch_dir>.

3. Stop all of the Oracle processes, Oracle services and so on of therelevant Oracle Home (OracleService<DBSID>, Oracle<ORACLE_HOME_NAME>TNSListener,OracleDBConsole<DBSID>).

4. Before installing the patch, you should save the Oracle Home and theOracle inventory.

5. Install the patch by calling OPatch as follows:

Option 1: Calling OPatch specifying the patch directoryOS> %ORACLE_HOME%\OPatch\opatch apply <patch_dir>

Option 2: Calling OPatch directly from the patch directoryOS> cd <patch_dir>OS> %ORACLE_HOME%\OPatch\opatch apply

6. Then perform the postprocessing steps Patch Post Install Instructionsthat are prescribed in the patch README if they can be used.

7. Optional: Clean up the patch storage directory (Cleanup)OS> %ORACLE_HOME%\OPatch\opatch util cleanup

Installation of several patches with "napply"

OPatch also provides the option of installing several patches with anOPatch call.

1. Copy the patch files to be installed to the base directory <patch_base_dir>, but do not unpack them.

2. Install the patches as follows:

OS> <opatch> napply <patch_base_dir>

If several patches have been installed, but others have not, you canskip the already installed patches with "-skip_duplicate".

OS> <opatch> napply <patch_base_dir> -skip_duplicate

3. Then perform the postprocessing steps Patch Post Install Instructionsif they can be used.

Appendix A: Descriptions and abbreviations

Descriptions and abbreviations used in this note:

o <opatch>Generic call of OPatch

Page 7: 36963280-sapnote-0000839182

26.08.2010 Page 7 of 10

SAP Note 839182 - Installing patches using OPatch

UNIX : OS> $ORACLE_HOME/OPatch/opatchWindows: OS> %ORACLE_HOME%\OPatch\opatch

o <patch_base_dir>Patch base directory

o <patch_dir>Directory that is created if a <patchfile> is unpacked (see below).

o <patchfile>Patch file. The name consists of

- Prefix 'p'

- <patch_id>: Unique patch ID

- <release>: Oracle Release: for example, 10204, 11201

- <platform>: Unique identifier of the platform or "Generic" forgeneric patches.

- .zip: Extension

Appendix B: Technical overview of OPatch versions

OPatch Release 11.2.0.1Release: 11.2.0.1.XDownload link: http://service.sap.com/oracle-download Oracle->Oracle 11.2.0.1->OPatchDownload zip file: OPatch_112011_Generic.zipOCM support: See Note 1227404.MOPatch support: See Note 1027012.

OPatch Release 10.2.0.4Release: 10.2.0.4Oracle patch ID: 6880880 (Oracle MetaLink 602334.1)Runtime environment: Java (installed in ORACLE_HOME)Patch storage (UNIX): $ORACLE_HOME/.patch_storageOPatch log files (UNIX): $ORACLE_HOME/cfgtoollogs/opatch $ORACLE_HOME/cfgtoollogs/opatch/lsinvOPatch history file: opatch_history.txtDownload link: http://service.sap.com/swcenter-3pmain Oracle->Oracle 10.2.0.4->OPatchDownload zip file: Opatch_10204_Generic_v<n>.zipOCM support: No, see Note 1227404.MOPatch support: Yes, see Note 1027012.

As of June 9, 2008, you can no longer use the OPatch version, which is alsoavailable for Release 10.2.0.4 in patch 4898608 on Oracle MetaLink, toinstall patches (see Oracle MetaLink Note 602334.1). Therefore, use theOPatch version for Release 10.2.0.4 that is available on SAP ServiceMarketplace for the patch installation for Oracle Release 10.2.0.4 in theSAP environment.

Page 8: 36963280-sapnote-0000839182

26.08.2010 Page 8 of 10

SAP Note 839182 - Installing patches using OPatch

The OPatch version for Release 10.2.0.4, which is available on SAP ServiceMarketplace, is a special version of OPatch that is released only for theuse in the SAP environment. It is platform-independent and does not includeOCM support, unlike the OPatch version on Oracle MetaLink (patch ID6880880).

The version display of the SAP version of OPatch is as follows:

%> $ORACLE_HOME/OPatch/opatch version========================================================GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY========================================================Invoking OPatch 10.2.0.4.3OPatch Version: 10.2.0.4.3OPatch succeeded.%>

OPatch Release 10.2.0.2Release: 10.2.0.2Oracle patch ID: 4898608 (Oracle MetaLink 602334.1)Runtime environment: Java (installed in ORACLE_HOME)Patch storage (UNIX): $ORACLE_HOME/.patch_storageOPatch log files (UNIX): $ORACLE_HOME/cfgtoollogs/opatch $ORACLE_HOME/cfgtoollogs/opatch/lsinvOPatch history file: opatch_history.txtDownload link: http://service.sap.com/swcenter-3pmain Oracle->Oracle other->OPatch 10.2Download zip file: p4898608_10202_GENERIC_v<n>.zipOCM support: NoMOPatch support: Yes, see Note 1027012.

As of June 9, 2008, you can no longer use the OPatch version that isavailable in patch 4898608 on Oracle MetaLink to install patches (seeOracle MetaLink Note 602334.1). Therefore, continue to use the OPatchversion for Release 10.2.0.2 that is available on SAP Service Marketplacefor the patch installation for Oracle Release 10.2.0.2 in the SAPenvironment.

Header Data

Release Status: Released for CustomerReleased on: 17.06.2010 09:42:47Master Language: GermanPriority: Correction with high priorityCategory: Installation informationPrimary Component: BC-DB-ORA Oracle

Secondary Components:BC-DB-ORA-DBA Database Administration with

Page 9: 36963280-sapnote-0000839182

26.08.2010 Page 9 of 10

SAP Note 839182 - Installing patches using OPatch

Oracle

The Note is release-independent

Related Notes

Number Short Text

1431800 Oracle 11.2.0: Central Technical Note

1228643 Oracle Clusterware: Patches on top of Oracle 10.2.0.4

1227404 Oracle Database 10g: Oracle Configuration Manager (OCM)

1178339 Universal Installer / OPatch tools are Hanging and / or Fail

1137346 Oracle 10.2.0: Patches/patch collections for Oracle 10.2.0.4

1027012 MOPatch - Install Multiple Oracle Patches in One Run

1026237 FAQ: OPatch and Universal Installer 10.2

1010217 Oracle CRS: Patches for RAC enabled SAP Systems

899070 ORA-01406 reported on SELECT against SAP Tables (eg.TRDIR)

871735 Current patch set for Oracle 10.2.0

871096 Oracle 10.2.0: Patches/patch collections for Oracle 10.2.0.2

839574 Oracle Database 10g: Stopping Oracle CSS Service ocssd.bin

839187 Oracle 10.2.0: Applying patch set/patches/patch collection

820062 Oracle Database 10g: Patch sets/patches for 10.1.0

640910 Problems when using OPatch

629588 Current versions of OPatch and OUI

306408 Oracle 9.2.0: Using OPatch to install patches

Attributes

Attribute Value

Database system ORACLE

Database system Oracle 10

Database system Oracle 10.2

Database system Oracle 11.2

Attachments

Page 10: 36963280-sapnote-0000839182

26.08.2010 Page 10 of 10

SAP Note 839182 - Installing patches using OPatch

FileType

File Name Language Size

ZIP p4898608_102025_GENERIC.zip E 1.029 KB

ZIP p4898608_10204_Generic_v2.zip E 1.029 KB

ZIP p4898608_102022_GENERIC.zip E 733 KB

ZIP p4898608_102023_GENERIC.zip E 759 KB

ZIP p4898608_102024_GENERIC.zip E 768 KB