Skip Headers
Oracle® Database 2 Day DBA
11g Release 2 (11.2)

Part Number E10897-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

12 Managing Oracle Database Software

This chapter describes how to keep your Oracle Database software up-to-date with patch and software releases. This chapter contains the following sections:

Note:

The steps described in this chapter require a license for the Enterprise Manager Provisioning Management pack. Refer to the Oracle Database Licensing Information for information about the availability of these features on your system.

About Software Management and Patch Releases

Software management involves keeping your Oracle Database software up-to-date with the latest product fixes. When a product defect, or a bug, is discovered, a patch is created to fix the problem. A patch corrects a single defect in the installed software. Individual patches, also referred to as interim patches, are made available to customers who for business reasons cannot wait until the next patch set to receive the product fix.

Oracle periodically issues maintenance releases for its software, in the form of patch sets. A patch set is a collection of product fixes that have been released up to the time of the maintenance release. Patch sets are fully tested and integrated product fixes. All the product fixes in the patch set have been tested and are certified to work with each other.

Every patch or patch set is associated with a bug number for identification purposes. Patch sets are also associated with version numbers. For example, if you use Oracle Database 11g Release 11.1.0.6, then an available patch set might be 11.1.0.7. The version number of the patched software does not change if an interim patch is applied.

Every patch has an associated README file that describes how it fixes the software. The README file also has instructions for applying the patch.

Every patch set is accompanied by a Patch Set Notes file that contains installation instructions and information about the product fixes contained within the patch set. When you apply a patch set to your Oracle software, you change the maintenance release number for your installed software. Applying a patch set affects the software residing in your Oracle home only, with no change to the data in the database.

You can use Oracle Enterprise Manager Database Control to automate the staging and application of Oracle patches and patch sets. Database Control stages an Oracle patch by downloading it from the My Oracle Support Web site and copying it to a directory on the server.

Patching the Oracle Software

The steps involved in patching the Oracle software are as follows:

Determining Your Oracle Database Environment

To select the appropriate patch set release for your environment, you must know the following details about your Oracle environment:

  • Oracle Database version

  • Oracle home location

  • Hardware configuration

To determine the Oracle Database version:

  • In the General section of the Database Home page, view the version number.

Description of general_11g.gif follows
Description of the illustration general_11g.gif

To determine the location of your Oracle home:

  • In the General section of the Database Home page, click View All Properties.

    The View All Properties page appears. This page displays the path to your Oracle home.

To view information about your hardware configuration:

  1. In the General section of the Database Home page, click the name of your Host.

    The Host page appears.

    This page displays the following information about your hardware configuration:

    • Operating system

    • Hardware platform

    • IP address

    • Number of CPUs

    • Memory size (MB)

    • Local file system (GB)

  2. In the Configuration section, click the links to drill down to pages that describe your operating system, hardware platform, and local file system in more detail.

Setting Your My Oracle Support Credentials

You can obtain patches and patch sets from My Oracle Support (formerly OracleMetaLink at the following URL:

https://metalink.oracle.com

To download patches and patch sets from My Oracle Support, you must register using your customer support identifier, which your company obtains when it signs a support contract with Oracle. When you register with My Oracle Support, you are given a user name and password that enables you to log in to this site from a Web browser.

Before you begin using the patching features of Database Control, you must configure your My Oracle Support credentials. After you specify your My Oracle Support credentials, an automated process can search My Oracle Support every day for patches that are applicable to your installed software. You also receive notification about critical patch advisories.

To set your My Oracle Support login credentials:

  1. Click the Setup link located at the top and bottom of most Database Control pages.

    The Setup page appears.

  2. Click Patching Setup.

    The Patching Setup subpage appears.

  3. Under My Oracle Support, enter a user name and password.

  4. (Optional) Complete the following steps:

    1. At the top of the page, click Online and Offline Settings.

    2. Enter the maximum size of your patch cache in the Patch Cache Maximum Size (MB) field.

      The patch cache is a temporary area where patches are stored. When the patch cache exceeds the specified maximum size, Database Control automatically performs a purge operation and tries to delete old patches until the patch cache is smaller than the specified maximum size.

  5. Click Apply to set your My Oracle Support credentials.

    Database Control displays a message that confirms the setup and informs you that two jobs have been automatically created and scheduled to update your Software Library:

    • Refresh From Metalink

    • OPatch Update

    Note:

    You might see an error regarding the Software Library not being configured. This error can be ignore and the configuration is completed in the next section.

Configure the Software Library

Before you can stage or apply patches using Enterprise Manager, you must configure the software library. When configuring the Software Library you specify the directory paths that the software library uses to store binary data, such as patches.

To configure the Software Library before using the Patch Interface of Database Control:

  1. On the Database Home page in DB Control, click Software and Support.

  2. In the Deployment Procedure Manager section, click the Deployment and Provisioning Software Library link.

    The Provisioning page appears.

  3. Click the link for the Administration subpage.

  4. Scroll down to the Software Library Configuration section at the bottom of the page. Click Add.

    The Add Software Library Location page appears.

  5. In the Software Library directory location field, enter the name of the directory where the patches are stored on the node, for example, /home/oracle. Click OK.

    A progress window appears indicating that Provisioning Archive (PAR) files are being uploaded. PAR files contain procedures, directives, and components related to deployment procedures, or a series of steps that accomplish a particular task. The PAR files being uploaded now contain best practices advocated by Oracle.

  6. When this action completes, you have completed the Software Library configuration.

Staging and Applying Patches and Patch Sets

Applying a patch or patch set is the process of installing the staged, or locally stored, patch files in the Oracle home on the server. You must specify patching credentials before you can stage and apply a patch or patch set using Enterprise Manager.

To stage and apply patches and patch sets using the Patching wizard:

  1. From the Database Home page, click Software and Support.

    The Database Instance: instance_name page appears.

    Description of software_page.gif follows
    Description of the illustration software_page.gif

  2. In the Database Software Patching section, select Apply Patch.

    The Select Patches page appears.

  3. Click Add Patches to search for new patches to apply.

    The Search and Select Patches page appears.

  4. Choose the option Search My Oracle Support. In the Search section, accepts the default values for Product Family, Product, Release, and Patch Type. From the Platform list choose the name that matches your installed operating system, for example, Linux x86. After you have made your selections, click Go.

    You can optionally limit your search further by choosing different values for Product Family, Product, Patch Type, and Language, and then clicking Go.

    The available patches table at the bottom of the page is populated with the patches that satisfy your search criteria.

  5. (Optional) Select a patch or patch set and click View to view the patch details.

    Description of patch_select2.gif follows
    Description of the illustration patch_select2.gif

  6. Select a patch or patch set and start the Patching wizard by clicking Select in the top right corner of the page.

    The first page of the Patching wizard, the Select Patches page, appears.

  7. If the patch or patch set you selected in Step 6 does not appear in the Patches table, then click Add Patch and repeat the search to locate the patch. When the patch or patch set you have selected is displayed in the Patches table, click Next.

    Description of patch_wizard_1a.gif follows
    Description of the illustration patch_wizard_1a.gif

    The Credentials and Schedule page appears.

  8. Enter the credentials for the operating system user that is performing the patching operation. If you have configured Preferred Credentials, then you can choose the Use Preferred option.

    For the Schedule Type option, use the default value of One Time (Immediately). Optionally, you can choose to schedule the patching for a later time using the One Time (Later) option. Click Next to continue.

    Description of patch_wizard_2.gif follows
    Description of the illustration patch_wizard_2.gif

    The Review page appears.

  9. Review the information on this page. If any of the information is incorrect, then you can click Back to return to a previous page and make corrections.

  10. At the bottom of this page is a warning regarding the behavior of Enterprise Manager Database Control during the patching operation. Read this warning, and then select the option Select the check box to accept this warning and continue. Until you select this option, the Finish button is disabled.

    After you accept the warning option, click Finish to submit the job that patches the database.

    The Deployment Procedure Manager page appears.

    Description of patch_wizard_4.gif follows
    Description of the illustration patch_wizard_4.gif

  11. To view the progress of the recently submitted patching operation, click the link in the Run column, PATCH_STANDALONE_ORACLE_DB_SYS_2009-06-19_08-13-54.

    The Procedure Completion Status page appears, which contains information about the procedure being run, the steps involved, the completion status of each step, the job details, and the OMS log for this procedure.

    As part of the patching procedure, the database instance and Database Control are shut down and then restarted. After they have restarted, you must log in again and navigate to the Procedure Completion Status page to check the status.

  12. (Optional) After you have reviewed the status of each step, you can click Refresh to update the display if the procedure has not yet completed. If any of the steps has a status of Failed, you can click the name of the Step, for example Stage Patches, to drill down to information explaining the cause of the failure.

    When you have finished viewing the results, click Done.

    You are returned to the Deployment Procedure Manager: Procedure Completion Status page.

  13. Click the Database tab to return to the Database Home page.

Viewing Critical Patch Advisories

The Patch Advisor in Enterprise Manager describes critical software patches for your installed Oracle products. To help ensure a secure and reliable configuration, all relevant and current critical patches should be applied.

The Patch Advisor provides support for Remedies. When you select an advisory, you can view the calculated remedies from the context of that Advisory, and the affected Oracle homes.

The Patch Advisor also displays a list of available patches and patch sets for your installation, along with the name of the feature that is impacted. You can choose to display only patches for features that are used by your database, or all available patches.

To view the critical patch advisories and other recommended patches:

  1. Using Database Control, on the Database Home page, in the Policy Violations section, view the count for Critical Security Patches.

    If any critical patches have not been applied to the Oracle home for the database, then this section displays the number of critical patch advisories that are relevant to the Oracle home for the database. Also, a warning icon appears corresponding to the Oracle Home link on the Database Home page is the Oracle home is missing critical patches.

  2. To view a list of available critical patch advisories, click the nonzero number next to the heading Critical Security Patches. Alternatively, from the Database Home page, select the Software and Support subtab, then, under the heading Database Software Patching, click Patch Advisor.

    The Patch Advisor page appears, listing the available critical security patches and patch recommendations by feature.

    Description of patchadvisor.gif follows
    Description of the illustration patchadvisor.gif

  3. (Optional) In the Critical Security Patches table, click a value in the Advisory column to view further details for that critical security patch.

  4. (Optional) To view all available patches, in the Patch Recommendations by Feature table, in the View list, select the value All, then click Go.

Upgrading a Database

Use Database Upgrade Assistant (DBUA) to upgrade an existing database to the current release of Oracle Database.

This section contains these topics:

Overview of Database Upgrade Assistant

Database Upgrade Assistant (DBUA) guides you through the upgrade process and configures your database for the new release. DBUA automates the upgrade process and makes appropriate recommendations for configuration options such as tablespaces and online redo log files.

DBUA can be used to upgrade databases created using any edition of the Oracle Database software, including Express Edition (XE) databases.

Pre-Upgrade Checks

DBUA does not begin the upgrade until it completes all of the following pre-upgrade steps:

  • Checks for any invalid user accounts or roles

  • Checks for any invalid data types or invalid objects

  • Checks for any desupported character sets

  • Checks for adequate resources, including rollback segments, tablespaces, and free disk space

  • Checks for any missing SQL scripts needed for the upgrade

  • Backs up all necessary files (optional)

Automated Upgrade Tasks

After completing the pre-upgrade steps, DBUA automatically performs the following tasks:

  • Modifies or creates new required tablespaces

  • Invokes the appropriate upgrade scripts

  • Archives the online redo log files

  • Disables archiving during the upgrade phase (to improve performance)

While the upgrade is running, DBUA shows the upgrade progress for each component. DBUA writes detailed trace and log files and produces a complete HTML report for later reference. To enhance security, DBUA automatically locks new user accounts in the upgraded database. DBUA then proceeds to create new configuration files (initialization parameter and listener files) in the new Oracle home.

Support for Oracle Real Application Clusters

DBUA is fully compliant with Oracle Real Application Clusters (Oracle RAC) environments. In Oracle RAC environments, DBUA upgrades all database and configuration files on all nodes in the cluster.

About Upgrading Oracle Automatic Storage Management

Oracle ASM Configuration Assistant (ASMCA) enables you to upgrade an existing Oracle ASM instance to the current software level. However, the recommended practice is to upgrade an Oracle ASM instance with Oracle Universal Installer (OUI). OUI automatically defaults to upgrade mode when it detects an Oracle ASM instance at a previous release level.

See Also:

Oracle Database Storage Administrator's Guide for information about upgrading Oracle ASM

Support for Silent Mode

DBUA supports a silent mode of operation in which no user interface is presented to the user. Silent mode enables you to use a single statement for the upgrade.

Database Versions Supported by DBUA

DBUA supports the following versions of Oracle Database for upgrading to Oracle Database 11g Release 2 (11.2):

  • Oracle9i Release 2 (9.2.0.6) and beyond

  • Oracle Database 10g release 1 (10.1)

  • Oracle Database 10g release 2 (10.2)

  • Oracle Database 11g release 1 (11.1)

If your database version is not in this list, then you must upgrade first to the closest release listed. You can then upgrade the database to Oracle Database 11g release 2 (11.2).

Starting DBUA

If you install the Oracle Database software only and specify that you are upgrading an existing database to the new Oracle Database release, then DBUA is launched automatically after the software installation. You can then continue as described in "Upgrading a Database Using DBUA".

If you perform a software-only installation and do not upgrade your database at that time, then you can do so later by launching DBUA.

Be aware of the following before you begin using DBUA:

  • You must run Net Configuration Assistant (NETCA) before running DBUA.

  • It is not possible to upgrade a database with DBUA when the source and target Oracle homes are owned by different users.

  • If the database instance is not running, then DBUA tries to start the instance with the default initialization parameter file. If that fails, then you are prompted to provide the name of the correct initialization parameter file or to start the instance. If the instance is up and running, then DBUA connects to it.

  • If you stop the upgrade, but do not restore the database, then you should not restart DBUA until you start the database instance in UPGRADE mode using the Oracle Database 2g release 2 (11.2) software. You cannot go back to the original software version unless you restore your database.

  • If you restore your database manually (not using DBUA), then remove the following file from the Oracle Database 2g release 2 (11.2) home directory before starting DBUA:

    $ Oracle_home/cfgtoollogs/dbua/logs/Welcome_SID.txt
    

    The presence of this file indicates to DBUA that this operation is a reattempt of a previous operation.

To start DBUA on Microsoft Windows:

  1. Configure the operating system environment variables, as described in "Configuring the Operating System Environment Variables".

  2. Click Start, then select Programs (or All Programs)

  3. Select Oracle - HOME_NAME

  4. Select Configuration and Migration Tools

  5. Select Database Upgrade Assistant

    The Database Upgrade Assistant: Welcome window appears.

To start DBUA on any supported platform:

  1. Open a command window.

  2. Configure the operating system environment variables, as described in "Configuring the Operating System Environment Variables".

  3. Enter the following command:

    dbua
    

    The Database Upgrade Assistant: Welcome window appears.

    Note:

    The dbua executable is typically found in your Oracle_home/bin directory.

See Also:

Oracle Database Upgrade Guide for more information about Database Upgrade Assistant

Upgrading a Database Using DBUA

Complete the following steps to upgrade a database using DBUA. If you need help at any window or want to consult more documentation about DBUA, then click the Help button to access the online Help.

To upgrade a database using DBUA:

  1. Start DBUA. See "Starting DBUA".

  2. At the Welcome window of DBUA, make sure the database being upgraded meets the specified conditions. Then, click Next.

  3. At the Databases window, select the database you want to upgrade from the Available Databases table. Then, click Next.

    You can select only one database at a time. If you run DBUA from a user account that does not have SYSDBA privileges, then enter the user name and password credentials to enable SYSDBA privileges for the selected database.

  4. DBUA displays a message saying it is getting database information. DBUA analyzes the selected database, performing pre-upgrade checks and displaying warnings as necessary:

    • It checks for any online redo log files of a size less than 4 megabytes (MB). If such files are found, then DBUA gives the option to drop or create new online redo log files.

    • It checks the initialization parameter file for any obsolete or deprecated initialization parameters.

    If no problems are found, then the Diagnostic Destination window appears.

  5. In the Diagnostic Destination field, do one of the following:

    • Leave the setting at its default value, which is the Oracle base directory.

    • Enter a new destination.

    • Click Browse and select a new destination.

    Diagnostic Destination is the default location to store Oracle trace and diagnostic files. It replaces the initialization parameter settings for background dump destination, user dump destination and core dump destination from earlier Oracle Database releases.

    Click Next.

    The Move Database Files window appears.

  6. Do one of the following:

    • Select Do Not Move Database Files as Part of Upgrade.

    • Select Move Database Files During Upgrade.

      If you choose to move database files, then you must also select either File System or Oracle Automatic Storage Management (Oracle ASM).

    Click Next.

    The Recompile Invalid Objects window appears.

  7. (Optional) Select Recompile invalid objects at the end of upgrade and modify the value of degree of parallelism.

    When you upgrade your database to the new Oracle Database release, many of the PL/SQL modules in the database become invalid. By default, Oracle Database recompiles invalid PL/SQL modules as they are used, but this takes time and can result in poor performance. To eliminate these performance issues, select Recompile invalid objects at the end of upgrade. All the invalid PL/SQL modules are be recompiled immediately after the upgrade is performed. The task of recompiling all the invalid PL/SQL modules in your database can take a significant amount of time and increase the time it takes to complete your database upgrade.

    If you have multiple CPUs, then DBUA automatically adds a Degree of Parallelism menu to the Recompile Invalid Objects window. Parallel processing reduces the time it takes to recompile all the invalid PL/SQL modules in your database. DBUA automatically sets the degree of parallelism to one less than the number of available CPUs. You can select a different value from the menu.

    Note:

    Selecting Recompile invalid objects at the end of upgrade is equivalent to running the ORACLE_HOME/rdbms/admin/utlrp.sql script, which is used to recompile stored PL/SQL and Java code.

    Click Next.

    The Backup window appears.

  8. Select one of the following options:

    • I have already backed up my database.

    • I would like this tool to back up the database.

      If you use DBUA to back up your database, then DBUA makes a copy of all database files in the directory that you specify in the Backup Directory field. DBUA performs this consistent backup automatically after it shuts down the database and before it begins the upgrade process. The backup does not compress the database files.

      In the Backup Directory field, do one of the following:

      • Leave the setting at its default value

      • Enter a different valid file system path. You cannot specify a raw device for the backup files.

      • Click Browse and select a new backup destination.

    Oracle strongly recommends that you back up your database before starting the upgrade. If errors occur during the upgrade, then you may need to restore the database from the backup.

    In addition to creating a backup of your database, DBUA creates an executable script in the directory specified in the Backup Directory field. If needed, you can use the executable script appropriate to your system to restore the database files:

    • Microsoft Windows: db_name_restore.bat

    • Linux or UNIX systems: db_name_restore.sh

    Click Next.

    The Recovery Configuration window appears.

  9. In the Fast Recovery Area field, do one of the following:

    • Leave the setting at its default value

    • Enter a different fast recovery area

    • Click Browse and select a different fast recovery area.

    The fast recovery area can be used to recover data that would otherwise be lost during a failure. This location is also used by Enterprise Manager if you have enabled local management and daily backups on the Database Control Management Options page.

    In the Fast Recovery Area Size field, select the units you want from the list and do one of the following:

    • Leave the setting at its default value.

    • Enter a different value for Fast Recovery Area Size.

    • Use the up and down arrows to set a different Fast Recovery Area Size.

    In the Recovery Configuration window, you specify a fast recovery area and enable archiving. It is important to configure these features for your database so you can recover your data if a failure occurs.

    Click Next.

    The Summary window appears.

  10. Review the list the initialization parameters that will be set for the database during the upgrade. Click Back to correct any errors, or click Finish.

    Note:

    The database is not be available for general use during the upgrade process that begins when you click Finish.

    A Progress window appears and DBUA begins to perform the upgrade.

  11. You might encounter error messages with Ignore and Abort choices:

    • Ignore - Ignores the error, skips the current step, and proceeds with the upgrade. The ignored errors are logged and shown later in the summary. After the upgrade is complete, you can fix the problem, restart DBUA, and complete the skipped steps.

    • Abort - Stops the upgrade process. DBUA prompts you to restore the database if the database backup was performed by DBUA. After the database has been restored, correct the error and restart DBUA to perform the upgrade again. If you do not restore the database, then DBUA leaves the database in its current state so that you can proceed with a manual upgrade.

    After the upgrade has completed, the following message is displayed:

    Upgrade is complete. Click "OK" to see the results of the upgrade.
    

    Click OK.

    The Upgrade Results window appears.

  12. Examine the results of the upgrade. The upgrade results summary describes the original and upgraded databases and changes made to the initialization parameters.

    The upgrade results also include an Upgrade Details section that describes the steps performed during the database upgrade. This section provides each step name, the log file for the step, and the status. In some cases, you can click the status to display details about the execution step. The Upgrade Details section also includes the directory where the various log files are stored after the upgrade. You can examine any of these log files to obtain more details about the upgrade process.

    Note:

    An HTML version of the Upgrade Results is also saved in the log files directory.
  13. Click Configure Database Passwords.

    The Password Management dialog box appears.

  14. The Password Management dialog box enables you to change the default password for a user after you upgrade the database.

    Note:

    To prevent unauthorized use of the database, change all user passwords immediately after you upgrade your database.

    Click the Lock Account? column for a user to lock or unlock an account. A check mark indicates that the account is locked.

    Enter a new password for a user in its New Password column.

    Confirm the new password by entering it in the Confirm Password column.

    Click OK to return to the Upgrade Results window.

  15. Click Restore if you are not satisfied with the upgrade results.

    Depending on the method you used to back up your database, the restore operation performs one of the following tasks:

    • If you used DBUA to back up your database, then clicking Restore copies the original database files and the original database settings from the backup.

    • If you used your own backup procedure to back up the database, then clicking Restore copies only the original database settings. To restore the database itself, copy the data files from the backup you created using your own backup utilities.

    Click Close to quit DBUA if you are satisfied with the upgrade results.

    DBUA removes the entry of the upgraded database from the old listener.ora file and restarts the listener.

WARNING:

If you retain the old Oracle Database software, then never start the upgraded database with it. Only start the database with the executable files in the new Oracle Database installation. Also, before you remove the old Oracle Database environment, make sure you relocate any data files in that environment to the new Oracle Database environment. See Oracle Database Administrator's Guide for information about relocating data files.

See Also:

Oracle Database Upgrade Guide for information about additional tasks that should be completed after upgrading a database

Managing Oracle Software: Oracle By Example Series

Oracle By Example (OBE) has a series on the Oracle Database 2 Day DBA guide. This OBE steps you through the tasks in this chapter, and includes annotated screenshots.

To view the Managing Oracle Software OBE, in your browser, enter the following URL:

http://www.oracle.com/technology/obe/11gr2_2day_dba/managing/managing.htm