Oracle® Database 2 Day DBA 10g Release 2 (10.2) Part Number B14196-03 |
|
|
PDF · Mobi · ePub |
This chapter describes how to keep your Oracle software up-to-date with patch releases. This chapter contains the following topics:
Software management involves keeping your Oracle software up-to-date with the latest product fixes.
Periodically, Oracle issues product fixes for its software called patch releases. Patch releases are fully tested product fixes only. They do not include new functionality. Application of a patch release affects the software residing in your Oracle home only, with no upgrade or change to the database.
Patches are individual bug fixes. Patch sets are a collection of bug fixes up to the time of the patch set release.
All patch and patch set releases carry version numbers. For example, if you bought Oracle 10g Release 10.2.0.1, then an available patch set might be 10.2.0.2. Every patch or patch set also has a patch number to identify it.
Every patch release has an associated README file that describes its bug fixes. The README also has instructions for manually applying the patch.
Enterprise Manager enables you to find the latest patch release on the Oracle MetaLink Web site and to download it to your Oracle home.
The steps involved in applying a patch are as follows:
To select the appropriate patch for your environment, you need to know:
What version of the Oracle database you are running
The location of your Oracle home.
What type of hardware configuration you have
You can find this information in the General section of the Database Home page, as shown in Figure 11-1.
Figure 11-1 General Section of Database Home Page
You can determine your Oracle database version by navigating to the General section of the Enterprise Manager home page. For example, Figure 11-1 shows that the database version is 10.2.0.1.0.
The Oracle home is the operating system location of your Oracle installation.
To determine the Oracle home:
In the General section of Enterprise Manager home page, click View All Properties.
The View All Properties: instance_name page appears. As shown in Figure 11-2, this page displays the path for the Oracle home.
Click the path link next to Oracle Home.
The Oracle home: oracle_home page appears. As shown in Figure 11-3, this page displays the file directory of your Oracle home, along with the installed product components and time of installation.
In the Component section, click the link to drill down to the page that describes specific components in your installation, including all component dependencies. In the Oracle Home Target section, click the links to display pages for the host agent, instance, and listener.
You hardware configuration consists of your database machine and operating system. You need this information to select the appropriate Oracle patch.
To learn more about your hardware configuration:
In the General section of Enterprise Manager home page, click the link next to Host.
The Host: host_name page appears. This page lists your operating system, hardware platform, IP address, number of CPUs, memory size, and disk space.
In the Configuration section, click the links to drill down to pages that describe your operating system, hardware platform, and disk space.
You obtain patches and patch releases from Oracle MetaLink, which is the Oracle support Web site:
http://metalink.oracle.com
To download patches from Metalink, you need to register using your customer support identifier, which your company obtains when it signs a support contract with Oracle. On registering with MetaLink, you are given a username and password that enables you to log in to this site from a Web browser.
Alternatively, you can give Enterprise Manager your login credentials so that it can log in to MetaLink automatically and search for patch releases. You must set these credentials before you can run the patch wizard in Enterprise Manager. The patch wizard can automatically search and download patches for you, and is described in section "Staging the Patch Release" .
To set your MetaLink login credentials:
Click the Setup link located at the top and bottom of most Enterprise Manager pages.
The Setup page appears.
Click Patching Setup.
The Patching Setup page appears, as shown in Figure 11-4.
In the MetaLink Username and MetaLink Password boxes, enter the username and password that you obtain by registering with your customer support id. In Patch Cache Maximum Size (MB), you can optionally set the maximum size of your patch cache, a temporary area where patches are stored. The oldest patches are automatically removed to keep the patch cache under its maximum size.
Click Apply to set your MetaLink credentials.
You can view available patch releases at MetaLink by using Enterprise Manager. Viewing these updates is the first step in the patching wizard, which you can use to download the patch to your Oracle home.
Downloading the patch is known as staging. After staging, you can apply the patch manually by shutting down the database and running the Oracle Universal Installer.
Note:
The following example searches for and stages a patch release on an Oracle Database, Release 10.1.0.2. The Enterprise Manager wizard and screenshot might be slightly different for your Oracle Database, Release 10.2.To start the patching wizard:
From the home page, click Maintenance.
In the Database Software Patching section, click Apply Patch.
The Patch: Select Patch page appears, as shown in Figure 11-5.
Enterprise Manager automatically fills in values for Product Family , Product , Release, and Platform. The search results that match the criteria are displayed by most recent patch (or patch set) at the top of the list.
Note that you can limit your search by entering values for Begin Date and End Date and then clicking Search.
Select a patch and click View Details to view the patch details. Select a patch and click View ReadMe to view the ReadMe, which includes a description of the bug fixes. Return to the Patch wizard by clicking the Patch locator link on the View Patch Details page.
Select the patch you are interested in, or select the most recent patch set if you are doing a periodic software update. In this example, we select patch set number 3761843, dated Aug 13, 2004, release 10.1.0.3. Click Next.
The Patch: Select Destination page appears. On this page you select your destination.
In Destination Type, specify your target database or a host or directory location to stage your patch. In this example, you accept the default database target, listed under Selected Targets. Click Next.
The Patch: Set Credentials page appears.
In Username and Password boxes, enter the operating system username and password to enable Enterprise Manager to stage the patch to your Oracle home. Enterprise Manager requires these credentials for job scheduling. Click Next.
The Patch: Stage or Apply page appears.
By default Enterprise Manager downloads the patch to the stage directory that is listed in the main box. Typically, this location is an Oracle home subdirectory called EMStagedPatches
patchnumber
.
By default, Enterprise Manager stages the patch only. You can then manually apply the patch by following the directions given in the README. The directions include shutting down the database and your applications and then running the Oracle Universal Installer.
You can optionally have Oracle run an operating system script to apply the patch automatically. To do so, you check the option Run Script to Apply Patch, which runs the script template listed in the window. Note that if you choose this option, you must edit the template to have it shut down the database and your application processes. Oracle does not recommend this option unless you have significant experience in shell scripting.
Click Next.
The Patch: Schedule page appears.
In the Schedule Patch Job section, select Immediately to download and stage the patch immediately. Click Next.
The Patch: Summary page appears.
Click Finish.
A confirmation page confirms that your job was submitted.
Confirm that the patch was staged by viewing the patch cache. Navigate to the Maintenance page, and in the Database Software Patching section, click View Patch Cache.
The Patch Cache appears. The downloaded patch should appear in the table.
After you have downloaded the latest patch or patch set release, you can install it. Before you install it, you must shut down your database instances, listeners, and dependent applications, as well as back up your current Oracle home installation.
Because of these preliminary steps, Oracle recommends applying patches during off-peak hours, when the system is not actively being used. It is also helpful to notify database users in advance of any planned downtime.
When your system is down as such, you can apply the patch by unzipping the downloaded file and running the Oracle Universal Installer.
See Also:
The patchset README for further instructions on installing the patchThis section describes the basic steps to take after downloading the patch release:
Read the README included with the patch release for patch-specific installation instructions.
Shut down all dependent applications.
Shut down your database instances. See "Shutting Down and Restarting the Instance and Database with Enterprise Manager" in Chapter 5, "Managing the Oracle Instance".
Optionally, shut down the database listener. This step is optional because your database listener automatically reconnects to the database when you restart the database. However, keeping the listener up can enable a client to log in to the database during the upgrade process, which might be undesirable. See "Starting and Shutting Down the Listener" in Chapter 4, "Configuring the Network Environment".
Shut down Enterprise Manager. See "Starting and Stopping the Oracle Enterprise Manager Console" in Chapter 3, "Getting Started with Oracle Enterprise Manager".
Apply the patch by following the instructions in the README.
Start up the database.
Start up the listener if you took it down previously. If you left the listener running, then it will automatically reconnect to the database. See "Starting and Shutting Down the Listener" in Chapter 4, "Configuring the Network Environment".
Start up Enterprise Manager. See "Starting and Stopping the Oracle Enterprise Manager Console" in Chapter 3, "Getting Started with Oracle Enterprise Manager".
Restart up your applications.
Oracle by Example (OBE) has a series on the Oracle Database 2 Day DBA book. This OBE steps you through the tasks in this chapter, and includes annotated screen shots.
To view the Managing Oracle Software OBE, point your browser to the following location:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/2day_dba/managing/managingsoftware.htm