Skip to content

DBAzine.com

Sections
Personal tools
You are here: Home » Oracle » Oracle Articles Archive » Chapter 5. Patching - Part 1

Chapter 5. Patching - Part 1

by Elke Phelps and Paul Jackson

From Oracle Applications DBA Field Guide, Berkeley, Apress, March 2006.

Part 1  |  Part 2  |  Part 3  |  Part 4

One of the most important and time-consuming aspects of an Oracle Applications DBA’s job is applying patches to the E-Business Suite. Patches may be required to resolve problems with the application code, to fix production issues, to install new features, or to upgrade components of the technology stack. Patching is not a simple one-step process, but rather requires careful research in order to determine all of the prerequisite steps, patching steps, and post-patching steps required.

Oracle E-Business Suite patching can be divided into two categories:

      • Oracle Applications patching: This includes all patching that changes the underlying Oracle Applications code.
      • Technology stack components patching: This includes all upgrades and fixes for the Oracle Database software, JDK, Oracle Developer 6i (Oracle Forms and Reports), Developer 6i Client library files, Oracle Discoverer, JDBC, Oracle Java Server Page (OJSP), Oracle Application Server (iAS), and iAS Client library files (Required Support Files or RSF).

The focus of this chapter will be on Oracle Applications patching, and a brief overview of Oracle Database software patching will also be provided. Patching the Applications Technology Stack will not be covered, as this type of patching effort has numerous operating system dependencies.

Applications Patching

There are several steps involved in patching Oracle Applications. In this section we’ll discuss each of these stages:

      • Preparing to patch: Before patching, it is important to document the requirements and determine what steps and patches are needed. This section will explain how to document and manage the overall process of applying patches, and discuss patch reporting, where you investigate which version, if any, of a patch is currently installed.
      • Applying patches: Applying a patch involves several steps, such as unbundling the patch, enabling maintenance mode, applying the patch with adpatch, and implementing manual steps. This section will discuss each of the steps involved.
      • Monitoring and resolving patching issues: Sometimes there are problems applying patches. This section will explain how to review log files and use the AD Control utility to monitor patch worker processes.
      • Post-patching steps and cleaning up: There are often steps that should be performed after the patching is complete. This section will explain how you can efficiently perform post-patching steps and clean up files no longer required after patching.

Types of Application Patches

There are several different types of Oracle Applications patches. These are the more common patches:

      • One-off patch: This is the simplest type of patch. It is created to resolve a specific bug.
      • Minipack patch: This is a collection of one-off patches and enhancements related to a particular module. Alphabetic characters denote the Minipack version for the module; for example, the product code for the Application DBA utilities is AD, and version Minipack I of this product would be called AD.I.
      • Family Pack patch: This is a collection of Minipack patches for a particular family group of application modules. Alphabetic characters denote the Family Pack version; for example, the J version of the Human Resources Suite Product Family would be HR_PF.J.
      • Maintenance Pack patch: This is a collection of Family Packs that serves as a point-level release upgrade; Oracle Applications Release 11.5.10 is an example of a Maintenance Pack.

There are also other special types of patches:

      • Consolidated patch: This is a collection of one-off fixes for a Family Pack or Maintenance Pack; Oracle Applications 11.5.10 Consolidated Update 2 (CU2) is an example of a consolidated patch.
      • Interoperability patch: This is a patch that is required for Oracle Applications to function with a newer version of a technology stack component; for example, you would apply an interoperability patch when upgrading the database to version 10g.
      • NLS patch: This is a patch that updates language-specific information for multi-language installations.
      • Rollup patch: This is a collection of one-off patches that update code levels for particular products.
      • Legislative patch: This is a special patch for HR Payroll customers; it contains legislative data for multiple countries.

As the patch group size increases from one-off patches to Maintenance Packs, the complexity of the patch application process also increases. More research is required for Family Packs than is required for a Minipack. Due to the increased complexity, there is more planning required for Maintenance Packs and Family Packs than other patches.

Preparing to Patch

Before applying a patch, carefully examine the readme file provided with the patch. This document will list all steps required by the patch.

Tip: Before applying a patch, make certain that the readme file has been carefully reviewed.

The readme file will contain prerequisites, installation steps, postinstallation steps, and other information vital to the successful installation of the patch. The prerequisites may consist of other patches or manual steps. Here is an example of the readme file contents:

---------------------------------------------------------------------
README CONTENTS:
---------------------------------------------------------------------
A. Prerequisites
B. Best Practices
C. Installation Steps
D. Post-Installation Steps
E. HRGLOBAL - SPECIAL NOTES AND CHANGE HISTORY
F. Other Information Sources
---------------------------------------------------------------------
A. PREREQUISITES:
---------------------------------------------------------------------
Apply this patch if you have HR (Product code PER) fully installed.

Before applying this patch you must have each of these prerequisites:

1. Oracle Applications Server 11i

2. Oracle 11i.PER.G, patch 1988754, or later.
. . .

If prerequisites have not been met, you must add these steps or patches to the overall process of applying the patch. Become familiar with all steps required before attempting to apply the patch.

Caution: Removing a patch from Oracle Applications after it has been applied is not usually a feasible option; therefore, a full system backup should be taken before applying patches to an instance.

Documenting the Patching Process

It is recommended that you maintain a spreadsheet detailing all prerequisite steps, patching steps, and post-installation steps required for patch application. By creating such a document, you can eliminate operator error, such as missed steps or steps completed out of order.

The columns in the spreadsheet should be customized to match your needs. These columns can include information about the node being patched, details about the patch being applied, or the rationale for the patch. At a minimum, it is useful to have columns for patch number, description,and comments, but it is often also useful to include the actual time required to complete each step based upon trial runs in a sandbox instance. Tracking timings allows for an accurate prediction of production maintenance downtime.

Figure 5-1 shows an example of a spreadsheet for patches required by Project A that will require 6 hours and 25 minutes to apply.

Figure 5-1: Sample patch documentation spreadsheet.

If timings are included for every step, the Applications DBA can generate a schedule for applying the patches to production by using time functions in the spreadsheet software. This corresponds to the Shift Start Time column in figure 5-1. This process is highly recommended for extended patching efforts that will require multiple shifts. Otherwise, a simple summation of the time required for each step should provide an accurate schedule. The times required for applying patches is also tracked by adpatch and can be found in the $APPL_TOP/admin/$CONTEXT_NAME.out/adt*.lst files.

Tip: When documenting the patching process for multiple patches, post-installation steps like recompiling invalid objects, regenerating JAR files, and running the autoconfig utility can be consolidated and executed at the end of the patching process. This helps to streamline the patch process and reduce downtime.

Patch Reporting

Patch reporting is used to determine whether or not a specific patch has already been applied to the instance, or what version of a Family Pack or Minipack is currently installed. The following sections will discuss four methods for determining patching levels:

      • Using the adphrept.sql script
      • Executing the patchsets.sh utility
      • Querying the database
      • Using Oracle Application Manager (OAM)
Using adphrept.sql

The $AD_TOP/patch/115/sql/adphrept.sql file is an Oracle-provided script for generating a patch report for an instance. This script provides an easily searchable list of all patches that have been applied to an environment. Keep in mind that the script can take a long time to execute.

Additional details regarding adphrept.sql and a description of all parameters can be obtained by viewing MetaLink Note 162498.1. The parameters for adphrept.sql are shown in table 5-1.

Option Purpose
Query_depth
1—Lists details of patches only
2—Lists details of patches and their bug fixes only
3—Lists details of patches, their bug fixes, and bug actions
Bug_number
Lists details for one bug number or ALL
Bug_product
Lists details for one product or ALL
End_date_from
Lists start date for a date range or ALL
End_date_to
Lists end date for a date range or ALL
Patchname
Lists details for a patch name or ALL
Patchtype
Lists details for a patch type or ALL
Level
Lists details for a patch level or ALL
Language
Lists details for a language or ALL
Appltop
Lists details for a specific APPL_TOP or ALL
Limit to forms server
Limits the list’s scope (Y/N)
Limit to web server
Limits the list’s scope (Y/N)Option Purpose
Limit to node server
Limits the list’s scope (Y/N)
Limit to admin server
Limits the list’s scope (Y/N)
Only patches that change db 
Limits the list’s scope (Y/N)
Report name
Specifies the report name; it must end in .txt or .htm

Table 5-1: adphrept.sql Parameters.

Typically, the report is executed with Query_depth set to 2 and all other options set either as ALL or Y. This will yield the most useful report for prerequisite requirement searching. The query must be run by the apps user account, like this:

$sqlplus apps/apps_password \
@adphrept.sql 2 ALL ALL ALL ALL ALL \
ALL ALL ALL ALL N N N N N patches.txt

Tip: As of Application Utility Minipack version I (AD.I), adphrept.sql no longer generates a text report, but rather an XML report is generated.

To search the report for a specific patch or bug, the following may be executed against the generated file:

grep [patch or bug number] patches.txt

If the grep command returns results, the patch or bug fix has been applied to the instance. For example, to test for existence of patch 3410000, check whether the following command returns any data:

$grep 3410000 patches.txt
Using patchsets.sh

The Oracle-provided patch-comparison utility, patchsets.sh, is a handy tool for reviewing patchset levels. Family Pack versions, fully installed products, and shared installed products, along with the latest version available, are displayed in the output. Information about the latest version of this utility can be reviewed in MetaLink Note 139684.1.

This utility is updated frequently by Oracle. Before running the script, download the current version from the following FTP site: ftp://oracle-ftp.oracle.com/apps/patchsets/PATCHSET_COMPARE_TOOL/patchsets.sh.

The instance owner can use the tool by executing the following:

patchsets.sh connect=[userid]/[password]

Here’s an example:

$patchsets.sh connect=apps/apps_password

More details about the parameters available for this script can be found by using the -h parameter for online help. Figure 5-2 shows an example of the output of patchsets.sh from MetaLink Note 139684.1.

The output for the file will contain the following columns for each product group:

      • Baseline Version: Displays the version provided with the release.
      • Running Version: Displays the current version installed for each product.
      • Latest Available, Status: Displays the current version available for the product. The Status portion of the column consists of two parts: the patchset status (Rel is short for released, Sup for superseded, and Obs for obsoleted) and the distribution status (By_Metal indicates it is on MetaLink, Not_Dist means it is not available, and By_Dev means it is available from development only).

Review the output to find any products that have updates available.

Querying the Database for Patches

In order to determine whether a specific patch has been applied, a query can be executed against the bug_number table. The following SQL will return results if the patches included in the IN clause have been applied to the instance:

SELECT bug_number
FROM ad_bugs
WHERE bug_number IN ('patch_number', 'patch_number', . . .)
ORDER BY bug_number DESC;
Using OAM

Oracle Application Manager (OAM) may also be used to query the instance for applied patches.

View larger image

Figure 5-2: Output from the patchsets.sh script.

Patch Search: In OAM, the Applied Patches functionality will allow searches by Patch ID, Applied From Date, and Applied to Date. Once a search result is returned, additional details regarding the patch can be displayed.

For example, the Simple Search screen for patches in OAM is shown in figure 5-3.

View larger image

Figure 5-3: The OAM Simple Search screen.

The Advanced Search screen offers additional search criteria. Use this screen if you need to search for certain product families, patches applied only to certain nodes, or patches for different APPL_TOPs.

When a patch is returned to the result screen, you can select the Details cell to see a patch-impact analysis screen. This information can be useful to testers for determining functionality that was altered by the patch. For large patches, the patch-impact analysis may be too lengthy to be of much value.

Patch Advisor: OAM can also be used to perform patch analysis reporting against your instance. Select the Patch Wizard Tasks menu to see the options shown in figure 5-4.

Figure 5-4: The Patch Wizard Tasks menu.

Select Patch Wizard Preferences to define your work environment. These options include the staging directory for patches, as well as language and platform defaults. The Patch Wizard will use these details to download information from MetaLink in order to create recommendations or patch analysis.

A scheduled job can be created to perform these tasks on a regular basis, as shown in figure 5-5.

Figure 5-5: Scheduling options for patch analysis.

--

Elke Phelps is an Oracle Certified Professional with over 12 years’ experience administering Oracle products. She is the Founder and presiding President of the Oracle Applications User Group’s Middleware SIG—formerly the ATS SIG—and is responsible for conducting meetings at the annual OAUG and Oracle Open World conferences. This yields a unique medium for access to the Oracle Applications users and provides name recognition in the user community. Elke is the author of several whitepapers and is a technical presenter at many international conferences.

Paul Jackson has over 10 years’ experience as a developer and Oracle DBA. Paul is the Program Director for the ATS SIG. He is a very active member of the Oracle community through memberships of Ohio Valley Oracle Applications User Group (OVOAUG), International Oracle User Group (IOUG), and the Oracle RAC SIG.


Contributors : Elke Phelps, Paul Jackson
Last modified 2006-06-29 01:49 PM
Transaction Management
Reduce downtime and increase repeat sales by improving end-user experience.
Free White Paper
Database Recovery
Feeling the increased demands on data protection and storage requirements?
Download Free Report!
 
 

Powered by Plone