18 Upgrading Databases

This chapter explains how you can upgrade Oracle databases using Oracle Enterprise Manager Cloud Control (Cloud Control). In particular, this chapter covers the following:

18.1 Getting Started

This section helps you get started with this chapter by providing an overview of the steps involved in mass upgrade of databases or when you want to install Oracle Home and upgrade database. Consider this section to be a documentation map to understand the sequence of actions you must perform to successfully upgrade Oracle database. Click the reference links provided against the steps to reach the relevant sections that provide more information.

Table 18-1 Getting Started with Upgrading Database

Step Description Reference Links

Step 1

Selecting the Usecase

Decide whether you want to upgrade single instance database, Oracle RAC database, or Oracle database clusterware, and then select the type of upgrade you want to perform on them.

Oracle Database

You can upgrade multiple database instances at a time using deployment procedure according the following usecases. :

  • Upgrading database instance only.

  • Upgrading cluster database,.

  • Upgrading clusterware.

You can even upgrade one database instance at a time. For example, if you have already upgraded some of the databases in the Oracle home earlier, and you now want to upgrade the other databases in the same Oracle home.

To upgrade databases using deployment procedure, see Section 18.3.

To upgrade one single instance database or one Oracle RAC database instance, see Section 18.4.

Step 2

Knowing About the Supported Releases

Know what releases of Oracle Database can be upgraded by the Deployment Procedure.

To learn about the releases supported by the Deployment Procedure, see Section 18.2.

Step 3

Understanding the Deployment Procedure

Understand the Deployment Procedure you need to select, and its scope and coverage.

To learn about the Deployment Procedure offered for upgrading databases, see Section 18.3.1.

Step 4

Meeting the Prerequisites

Before you run any Deployment Procedure, you must meet the prerequisites, such as setting up of the provisioning environment, applying mandatory patches, and setting up of Oracle Software Library.

  • To learn about the prerequisites for upgrading using deployment procedure, see Section 18.3.2.

  • To learn about the deployment phases involved in upgrading a database instance, see Section 18.4.1.

Step 5

Running the Deployment Procedure

Run the Deployment Procedure to successfully upgrade Oracle database.

  • To learn about the procedure for upgrading database clusters, follow the steps explained in Section 18.3.3.

  • To learn about the procedure for upgrading database clusterware, follow the steps explained in Section 18.3.4.

  • To learn about the procedure for upgrading database instance using deployment procedure, follow the steps explained in Section 18.3.5.

  • To learn about the procedure to upgrade a database instance using the database upgrade wizard, see Section 18.4.2.


18.2 Supported Releases

Using this Deployment Procedure, you can mass upgrade the following releases of Oracle Database across multiple hosts:

Table 18-2 Supported Releases for Mass Upgrade of Oracle Databases

Supported Target Supported Release to Upgrade to Supported Platform

Oracle Database (single instance database)

11g Release 2

12c Release 1

All Platforms


For upgrading one database instance, the following releases are supported:

Table 18-3 Supported Releases for Upgrading a Database Instance

Supported Target Supported Release to Upgrade to Supported Platform

Oracle Database (single instance database)

11g Release 2

12c Release 1

All Platforms

Oracle Real Application Clusters (Oracle RAC)

11g Release 2

12c Release 1

All Platforms

Oracle RAC One

11g Release 2

12c Release 1

All Platforms


18.3 Upgrading Databases Using Deployment Procedure

This section consists of the following:

18.3.1 About Deployment Procedures

Upgrading to Oracle Database 11g Release 2 or Oracle Database 12c enables you to access the latest technology, thereby increasing efficiency and providing secure data management for your applications. Ensure that you follow these steps to plan, prepare, and upgrade to make the upgrade process simpler, faster, and more predictable from start to finish.

Use the Upgrade Database deployment procedure to perform a mass upgrade of databases or when you want to install Oracle Home and upgrade database.

For mass upgrade of databases, source databases must be homogeneous, that is, they must have the same platform and same versions. The gold image to be used for the new database version must contain all patches required for these databases, effectively helping the user to get to a single standard gold image for the new release.

Cloud Control offers the Upgrade Oracle Database deployment procedure for mass upgrade of Oracle databases. The deployment procedure supports the following usecases:

  • Upgrading Database Instance Only

  • Upgrading Database Real Application Clusters

  • Upgrade of Clusterware

Note:

"Upgrading Grid infrastructure automatically upgrades the underlying ASM targets.

For upgrading one Oracle database instance at a time or any Oracle RAC database instance, you must access the Oracle Database Upgrade wizard from the Home page of the database that you want to upgrade.

Note:

The Upgrade Database deployment procedure does not support upgrade of databases in Oracle Data Guard configurations and databases with Oracle Database Vault.

The Deployment Procedure can be run by two types of administrators, mainly Designer and Operator. As a designer, you can set up a test database, deploy new software and patches, and test the upgrade process, and then create a gold image out of it. You can then access the Deployment Procedure, provide the required details, and lock one or more of the fields, such as platform, version, move to, and so on. Finally, you can save the procedure and then publish it to the operators.

As an operator, you can access the save procedure and perform only certain operations such as selecting a set of databases based on the locked criteria, providing any additional input that is specific to the runtime activity, and then scheduling the procedure. This way, the operators run a fully tested and certified Deployment Procedure in their production environments, and the entire operation tneds to be less error prone.

For more information on these types of administrators, and to learn how you can use these locking feature, see Section 2.4.

18.3.2 Meeting the Prerequisites

Before you upgrade an Oracle database, follow these prerequisites:

  • The following table lists the mininum source version and destination version required for each database target type:

    Table 18-4 Meeting the Prerequisites

    Database Target Type Mininum Source Version Supported Destination Version

    Clusterware

    10.2.0.4.0 and higher in 10gR2 series

    11.1.0.7.0 and higher in 10gR2 series

    11.2.0.1 and higher in 11gR2

    11.2 and 12c series

    Cluster Database

    10.2.0.4.0 and higher in 10gR2 series

    11.1.0.7.0 and higher in 10gR2 series

    11.2.0.1 and higher in 11gR2

    11.2 and 12c series

    Single Instance Database

    10.2.0.4.0 and higher in 10gR2 series

    11.1.0.7.0 and higher in 10gR2 series

    11.2.0.1 and higher in 11gR2

    11.2 and 12c series

    Single Instance High Availability

    11.2.0.1 and higher in 11gR2

    11.2 and 12c series

    Oracle RAC One Node

    10.2.0.4.0 and higher in 10gR2 series 11.1.0.7.0 and higher in 10gR2 series

    11.2.0.1 and higher in 11gR2

    11.2 and 12c series

    Automatic Storage Management

    Applicable only for 10.2.0.4 and higher

    11.1.0.7 and higher (stand alone type)

    11.2 and 12c series


  • The database user must have SYSDBA privileges or the OS user must be part of the DBA group.

  • The database to be upgraded, and all its node instances (in case of a cluster database) must be up and running.

  • Ensure that you have created designer and operator roles with the required privileges. The designer must have EM_PROVISIONING_DESIGNER role and the oeprator must have EM_PROVISIONING_OPERATOR role.

  • The designer must have the following privileges:

    • Edit access to Software Library to manage Software Library entities such as gold images.

    • Add/Edit Target privileges.

    • Create Named Credentials privileges.

  • The operator must have the following privileges:

    • View access to Software Library to view Software Library entities such as gold images.

    • Add/View Target privileges.

    • Privileges to the named credentials granted by designer.

18.3.3 Upgrading Oracle Cluster Database Using Deployment Procedure

To upgrade an Oracle Cluster Database using the deployment procedure, follow these steps:

  1. In the designer role, from the Enterprise menu, select Provisioning and Patching, then select Database Provisioning.

  2. In the Database Provisioning console, select the Upgrade Oracle Database Deployment Procedure and click Launch. The Database Upgrade wizard is launched.

  3. On the Targets page, in the Select Targets section, select Cluster Database as the Target Type.

    Note:

    The Cluster Database option enables you to upgrade the Cluster Databases and optionally the underlying Automatic Storage Management target and the managing Clusterware as part of the same process.
  4. Select the version that you want the database to be upgraded to from the To list.

  5. Click Add Targets.

  6. In the Select Targets for Upgrade dialog box, click on the Cluster search icon to search for the cluster database.

    In the Search and Select: Cluster Target dialog box, select the cluster database that you want to upgrade, and then click Select.

    Note:

    If the database you want to upgrade does not appear in the table, verify that the database is available and there are no metrics collection errors for the target.

    Note:

    If the cluster database that you selected is a parent cluster, then all the child nodes such as HAS, ASM, and cluster databases are automatically selected.

    Select the Cluster Database Version. Click OK.

  7. On the Targets page, click Save.

  8. In the Save Procedure dialog box, enter a description.

    For example:

    Upgrade Oracle Database Procedure 1
    

    Click Save.

  9. An Information dialog box appears. Click OK.

    Click Log Out.

  10. The designer role is completed. Now, log in with the Operator credentials.

  11. From the Enterprise Menu, select Provisioning and Patching, and then Database Provisioning.

  12. On the Database Provisioning page, all operations except for Launch are disabled for the Operator. The upgrade database deployment procedure that was saved is selected. Click Launch.

  13. On the Targets page, click Next.

  14. On the Software Details page, in the Grid Infrastructure section, click the Search icon to select a Grid Infrastructure software from the Software Library to create a new Oracle Home.

    Note:

    The software may be stored as a gold image or a zipped up installation media in the Software Library.

    From the dialog box that appears, select a Grid Infrastructure software, and then click Select.

  15. In the Oracle Database section, specify the following details:

    1. In the Oracle Database Software section, click the search icon to select the Oracle Database Software from the Software Library for creating a new Oracle Home.

      The software may be stored as a gold image or a zipped up installation media in the Software Library. Ensure that the zipped up Oracle Home contains all critical patches for the new Oracle Home.

      Note:

      To ensure that the gold image you create includes all the recommended patches, follow these steps:
      1. Click the 'Database Upgrade Planner' link and log in to My Oracle Support using Cloud Control in the online mode.

      2. Select the following types of patches to be applied to the gold image:

        • Recommended patches on the release you want to upgrade to

        • Patches on top of the release that maintain the fixes in the base release

        • Patches resolving merge conflicts if any present between the patches chosen

      3. Apply the patches to an Oracle Home of the release to upgrade to using Patch Plans or manually.

      4. Create a gold image from the Oracle Home and use it for the upgrade.

    2. In the Software Location section, specify or check if the software locations of the Oracle base for database and the database Oracle home are correct.

    3. In the User Groups section, specify or check if the specified values for the following user groups are correct:

      - Database Backup and Recovery (OSBACKUPDBA) group: Create this group if you want a separate group of operating system users to have a limited set of database backup and recovery related administrative privileges (the SYSBACKUP privilege). The usual name for this group is backupdba.

      - Data Guard administrative (OSDBDBA) group: Create this group if you want a separate group of operating system users to have a limited set of privileges to administer and monitor Oracle Data Guard (the SYSDG privilege). The usual name for this group is dgdba.

      - Encryption Key Management administrative(OSKMDBA) group: Create this group if you want a separate group of operating system users to have a limited set of privileges for encryption key management such as Oracle Wallet Manager management (the SYSKM privilege). The usual name for this group is kmdba.

    4. In the Working Directory section, specify the working directory on each target host. Ensure that all the hosts have read write permission on the working directory specified.

      Note:

      Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.
    5. Click Next.

  16. In the Credentials page, specify the Operating System credentials for Grid Infrastructure and Database, Privileged Operating System credentials (run as root), and Database credentials. If you choose to specify Preferred Credentials, select either Normal Host or Privileged Host credentials. For Named Credentials, you can specify the same or different credentials for Oracle homes.

    If you have not set Named Credentials, click the plus sign (+) in the Credentials section. In the Add New Database Credentials popup, specify the User name, Password, Role, and specify the Save Details. Select Run As and specify root. Click OK.

    Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.

    Click Next.

  17. In the Configuration Details page, the Backup and Restore settings option in the Restore Strategy is selected by default.

    In the Restore Strategy section, you can select:

    • Backup and Restore Settings Only to restore configuration changes made during database upgrade and not actual data, in case upgrade fails.

    • Create RMAN backup Before Upgrade and enter the backup location.

      Note:

      If you perform a backup using RMAN then you can restore the entire database irrespective of datafiles on filesystem or ASM. Backup using RMAN is available when upgrading to 12c only.
    • Use Existing RMAN Backup where the latest RMAN backup will be used.

    • Use Flashback and Guaranteed Restore Point

      Note:

      The source database version should be from 11g onwards. The target home version should be 12c
    • Full Backup to backup the database and restore configuration and oratab settings if upgrade fails. The backup location is, by default, $ORACLE_BASE/admin/$GDB/backup where '$GDB' is the global database name.

    • Ignore if you have your own backup options and do not want Cloud Control to perform a backup of your database.

    Note:

    Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.

    Sselect Upgrade Options from the left panel.

  18. In the Upgrade Options section, you can do the following:

    • Select Recompile invalid objects at the end of upgrade to make valid database objects for the new database version.

    • If you are upgrading to database version 11.2.0.2 or higher, you will be able to set the time zone upgrade option. You can select Upgrade Time Zone Version and Timestamp with Time Zone data.

    • Select Gather Statistics Before Upgrade

    • If archive logging has been turned on for the database, then you have the option to disable Archiving and flashback logging for each database.

  19. In the Pre and Post Upgrade Script section, specify custom scripts to run on the database before or after upgrade. Select a component from the software library that contains the SQL script to be executed before upgrading the database for each of the following scripts:

    • Pre Upgrade SQL Script

    • Post Upgrade SQL Script

    • Post Upgrade Perl Script

    Click Next.

  20. The Custom Properties page will be displayed only for user customized deployment procedures that require custom parameters. Specify custom properties for the upgrade, if any. Click Next.

  21. In the Schedule page, specify a Deployment Instance Name and schedule for the upgrade job. If you want to run the procedure immediately, then retain the default selection, that is, Immediately. If you want to run the job later, then select Later and provide time zone, start date, and start time details. Specify a Grace Period, a duration after the start period for Cloud Control to attempt to start the upgrade if it cannot start at the specified time.

    In the Breakpoint section, you can set the breakpoint by selecting Set Breakpoint, and then selecting which step you want the breakpoint to be after, from the Set Breakpoint After list .

    Setting these breakpoints appropriately can reduce the actual downtime of the upgrade process.

    For example, you can set the breakpoint before the Upgrade Cluster Database step as downtime is application only during the actual upgrade process and not duing the software installation,

    You can also change the breakpoint and resume the execution from the Database Upgrade Instance Tracking page.

    In the Set Notification Details section, select the events for which you want to be notified.

    Click Next.

  22. In the Review page, verify that the details you have selected are correctly displayed. If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    To save the deployment procedure for future use, click Save.

    To submit the deployment procedure, click Submit. When the deployment procedure is submitted for execution, the database upgrade instance tracking page is displayed. You can also navigate to this page by clicking the procedure instance in the Job Activity page.

  23. Submit the configured Database Upgrade procedure after providing values for the editable fields. After you have submitted the procedure, the summary for the running procedure is displayed.

  24. In the Upgrade Oracle Database procedure execution page, in the Current Run tab, view the upgrade job steps and status.

  25. If you have specified a breakpoint, the procedure execution will pause at the step specified. Once the execution pauses, you can do either of the following using the Run to step list.

    • Set a new breakpoint by selecting an appropriate step

    • Select All remaining steps.

    You can also perform the following actions:The possible actions are Stop, Resume, Suspend, Cleanup, Resubmit, and Skip Step. Click Resubmit to resubmit the current instance for execution.

    • Suspend: to suspend the upgrade deployment procedure.

    • Resume: to resume the upgrade deployment procedure after you have suspended it.

    • Stop: to stop the upgrade deployment procedure.

    • Restore: to do a rollback of the Grid Infrastructure. This submits another deployment procedure.

      Note:

      The rollback instance can be tracked in the same page as that of the upgrade execution run. This can be used where there is a fatal failure during the GI rollback.
    • Retry: to retry the failed step. This option can be used to retry the prerequisite step that might have failed in the previous run (The fixups were performed outside the flow),

    • Ignore: to ignore a failed step.

    • Resubmit: to resubmit the upgrade deployment procedure (usually after fixing errors found). In general, this should only be used when you are unable to perform a retry on the previous run.

  26. If a step has status Failed, click View Log. The Job Run for the step is listed. Click Show in the Details column to view the entire log. Fix the error and click Retry.

  27. After the procedure execution is completed, click on the Database menu and verify that the newly upgraded databases appear as Cloud Control targets

18.3.4 Upgrading Oracle Clusterware Using Deployment Procedure

To upgrade an Oracle Clusterware using the deployment procedure, follow these steps:

  1. In the designer role, from the Enterprise menu, select Provisioning and Patching, then select Database Provisioning.

  2. In the Database Provisioning console, select the Upgrade Oracle Database Deployment Procedure and click Launch. The Database Upgrade wizard is launched.

  3. On the Targets page, in the Select Targets section, select Clusterware as the Target Type.

    Note:

    The Clusterware option enables you to upgrade the Clusterware and optionally the underlying Automatic Storage Management target as part of the same process.
  4. Select the version that you want the database to be upgraded to from the To list.

  5. Click Add Targets.

  6. In the Select Targets for Upgrade dialog box, click on the Cluster search icon to search for the cluster.

    In the Search and Select: Cluster Target dialog box, select the cluster that you want to upgrade, and then click Select.

    Note:

    If the database you want to upgrade does not appear in the table, verify that the database is available and there are no metrics collection errors for the target.

    Note:

    If the cluster database that you selected is a parent cluster, then all the child nodes such as HAS, ASM, and cluster databases are automatically selected.

    Click OK.

  7. On the Targets page, click Save.

  8. In the Save Procedure dialog box, enter a description.

    For example:

    Upgrade Oracle Database Procedure 1
    

    Click Save.

  9. An Information dialog box appears. Click OK.

    Click Log Out.

  10. The designer role is completed. Now, log in with the Operator credentials.

  11. From the Enterprise Menu, select Provisioning and Patching, and then Database Provisioning.

  12. On the Database Provisioning page, all operations except for Launch are disabled for the Operator. The upgrade database deployment procedure that was saved is selected. Click Launch.

  13. On the Targets page, click Next.

  14. On the Software Details page, in the Grid Infrastructure section, click the Search icon to select a Grid Infrastructure software from the Software Library to create a new Oracle Home.

    Note:

    The software may be stored as a gold image or a zipped up installation media in the Software Library.

    From the dialog box that appears, select a Grid Infrastructure software, and then click Select.

  15. In the Working Directory section, specify the working directory on each target host. A working directory on the host target is required to stage files during Grid Infrastructure or Database installation or upgrade. Ensure that all the hosts have read write permission on the working directory specified.

    Note:

    Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.
  16. In the Credentials page, specify the Operating System credentials for Grid Infrastructure and the Privileged Operating System credentials (run as root). If you choose to specify Preferred Credentials, select either Normal Host or Privileged Host credentials. For Named Credentials, you can specify the same or different credentials for Oracle homes.

    If you have not set Named Credentials, click the plus sign (+) in the Credentials section. In the Add New Database Credentials popup, specify the User name, Password, Role, and specify the Save Details. Select Run As and specify root. Click OK.

    Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.

    Click Next.

  17. The Custom Properties page will be displayed only for user customized deployment procedures that require custom parameters. Specify custom properties for the upgrade, if any. Click Next.

  18. In the Schedule page, specify a Deployment Instance Name and schedule for the upgrade job. If you want to run the procedure immediately, then retain the default selection, that is, Immediately. If you want to run the job later, then select Later and provide time zone, start date, and start time details. Specify a Grace Period, a duration after the start period for Cloud Control to attempt to start the upgrade if it cannot start at the specified time.

    In the Breakpoint section, you can set the breakpoint by selecting Set Breakpoint, and then selecting which step you want the breakpoint to be after, from the Set Breakpoint After list .

    Setting these breakpoints appropriately can reduce the actual downtime of the upgrade process.

    For example, you can set the breakpoint before the Upgrade Clusterware step as downtime is application only during the actual upgrade process and not duing the software installation,

    Downtime is applicable only during the actual upgrade and not during the software installation. The downtime is only for the actual upgrade process itself. There is a step in the DP which says Upgrade Clusterware and thats the step that will require a downtime.

    You can also change the breakpoint and resume the execution from the Database Upgrade Instance Tracking page.

    In the Set Notification Details section, select the events for which you want to be notified.

    Click Next.

  19. In the Review page, verify that the details you have selected are correctly displayed. If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    To save the deployment procedure for future use, click Save.

    To submit the deployment procedure, click Submit. When the deployment procedure is submitted for execution, the database upgrade instance tracking page is displayed. You can also navigate to this page by clicking the procedure instance in the Job Activity page.

  20. Submit the configured Database Upgrade procedure after providing values for the editable fields. After you have submitted the procedure, the summary for the running procedure is displayed.

  21. In the Upgrade Oracle Database procedure execution page, in the Current Run tab, view the upgrade job steps and status.

  22. If you have specified a breakpoint, the procedure execution will pause at the step specified. Once the execution pauses, you can do either of the following using the Run to step list.

    • Set a new breakpoint by selecting an appropriate step

    • Select All remaining steps.

    You can also perform the following actions:The possible actions are Stop, Resume, Suspend, Cleanup, Resubmit, and Skip Step. Click Resubmit to resubmit the current instance for execution.

    • Suspend: to suspend the upgrade deployment procedure.

    • Resume: to resume the upgrade deployment procedure after you have suspended it.

    • Stop: to stop the upgrade deployment procedure.

    • Restore: to do a rollback of the Grid Infrastructure. This submits another deployment procedure.

      Note:

      The rollback instance can be tracked in the same page as that of the upgrade execution run. This can be used where there is a fatal failure during the GI rollback.
    • Retry: to retry the failed step. This option can be used to retry the prerequisite step that might have failed in the previous run (The fixups were performed outside the flow),

    • Ignore: to ignore a failed step.

    • Resubmit: to resubmit the upgrade deployment procedure (usually after fixing errors found). In general, this should only be used when you are unable to perform a retry on the previous run.

  23. If a step has status Failed, click View Log. The Job Run for the step is listed. Click Show in the Details column to view the entire log. Fix the error and click Retry.

  24. After the procedure execution is completed, click on the Targets menu and select All Targets to navigate to the All Targets page and verify that the newly upgraded databases appear as Cloud Control targets.

18.3.5 Upgrading Oracle Database Instance Using Deployment Procedure

To upgrade an Oracle database instance using the deployment procedure, follow these steps:

  1. In the designer role, from the Enterprise menu, select Provisioning and Patching, then select Database Provisioning.

  2. In the Database Provisioning console, select the Upgrade Oracle Database Deployment Procedure and click Launch. The Database Upgrade wizard is launched.

  3. On the Targets page, in the Select Targets section, select Single Instance Database as the Target Type.

    Note:

    The Single Instance Database option enables you to upgrade the Single Instance Database and optionally the underlying Automatic Storage Management target and the managing High Availability Service as part of the same process.
  4. Select the version that you want the database to be upgraded to from the To list.

  5. Click Add Targets.

  6. In the Select Targets for Upgrade dialog box, select the .Source Version and the Platform of the database instance that you want to upgrade. Click Search.

    In the Search and Select: Cluster Target dialog box, select the database instance target that you want to upgrade.

    Note:

    If the database you want to upgrade does not appear in the table, verify that the database is available and there are no metrics collection errors for the target.

    You can choose to upgrade the listeners by selecting Upgrade Listeners. The selected listeners in the source Oracle Home will be migrated and restarted in the destination Oracle Home of the database.

    Click OK.

  7. On the Targets page, click Save.

  8. In the Save Procedure dialog box, enter a description.

    For example:

    Upgrade Oracle Database Procedure 1
    

    Click Save.

  9. An Information dialog box appears. Click OK.

    Click Log Out.

  10. The designer role is completed. Now, log in with the Operator credentials.

  11. From the Enterprise Menu, select Provisioning and Patching, and then Database Provisioning.

  12. On the Database Provisioning page, all operations except for Launch are disabled for the Operator. The upgrade database deployment procedure that was saved is selected. Click Launch.

  13. On the Targets page, click Next.

  14. In the Oracle Database section, select Upgrade Database Instance only. Specify the Database Oracle Home location.

    In the Working Directory section, specify the working directory on each target host. A working directory on the host target is required to stage files during Grid Infrastructure or Database installation or upgrade.Ensure that all the hosts have read write permission on the working directory specified.

    Note:

    Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.

    Click Next.

  15. In the Credentials page, specify the Operating System credentials for Database, Privileged Operating System credentials (run as root), and Database credentials. If you choose to specify Preferred Credentials, select either Normal Host or Privileged Host credentials. For Named Credentials, you can specify the same or different credentials for Oracle homes.

    If you have not set Named Credentials, click the plus sign (+) in the Credentials section. In the Add New Database Credentials popup, specify the User name, Password, Role, and specify the Save Details. Select Run As and specify root. Click OK.

    Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.

    Click Next.

  16. In the Configuration Details page, the Backup and Restore settings option in the Restore Strategy is selected by default.

    In the Restore Strategy section, you can select:

    • Backup and Restore Settings Only to restore configuration changes made during database upgrade and not actual data, in case upgrade fails.

    • Create RMAN backup Before Upgrade and enter the backup location.

      Note:

      If you perform a backup using RMAN then you can restore the entire database irrespective of datafiles on filesystem or ASM. Backup using RMAN is available when upgrading to 12c only.
    • Use Existing RMAN Backup where the latest RMAN backup will be used.

    • Use Flashback and Guaranteed Restore Point

      Note:

      The source database version should be from 11g onwards. The target home version should be 12c
    • Full Backup to backup the database and restore configuration and oratab settings if upgrade fails. The backup location is, by default, $ORACLE_BASE/admin/$GDB/backup where '$GDB' is the global database name.

    • Ignore if you have your own backup options and do not want Cloud Control to perform a backup of your database.

    Note:

    Click on the Lock icon to lock the fields that you do not want to be editable. These fields will not be available for editing in the operator role.

    Sselect Upgrade Options from the left panel.

  17. In the Upgrade Options section, you can do the following:

    • Select Recompile invalid objects at the end of upgrade to make valid database objects for the new database version.

    • If you are upgrading to database version 11.2.0.2 or higher, you will be able to set the time zone upgrade option. You can select Upgrade Time Zone Version and Timestamp with Time Zone data.

    • Select Gather Statistics Before Upgrade

    • If archive logging has been turned on for the database, then you have the option to disable Archiving and flashback logging for each database.

  18. In the Pre and Post Upgrade Script section, specify custom scripts to run on the database before or after upgrade. Select a component from the software library that contains the SQL script to be executed before upgrading the database for each of the following scripts:

    • Pre Upgrade SQL Script

    • Post Upgrade SQL Script

    • Post Upgrade Perl Script

    Click Next.

  19. The Custom Properties page will be displayed only for user customized deployment procedures that require custom parameters. Specify custom properties for the upgrade, if any. Click Next.

  20. In the Schedule page, specify a Deployment Instance Name and schedule for the upgrade job. If you want to run the procedure immediately, then retain the default selection, that is, Immediately. If you want to run the job later, then select Later and provide time zone, start date, and start time details. Specify a Grace Period, a duration after the start period for Cloud Control to attempt to start the upgrade if it cannot start at the specified time.

    In the Breakpoint section, you can set the breakpoint by selecting Set Breakpoint, and then selecting which step you want the breakpoint to be after, from the Set Breakpoint After list .

    Setting these breakpoints appropriately can reduce the actual downtime of the upgrade process.

    For example, you can set the breakpoint before the Upgrade Database Instance step as downtime is application only during the actual upgrade process and not duing the software installation,

    You can also change the breakpoint and resume the execution from the Database Upgrade Instance Tracking page.

    In the Set Notification Details section, select the events for which you want to be notified.

    Click Next.

  21. In the Review page, verify that the details you have selected are correctly displayed. If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes.

    To save the deployment procedure for future use, click Save.

    To submit the deployment procedure, click Submit. When the deployment procedure is submitted for execution, the database upgrade instance tracking page is displayed. You can also navigate to this page by clicking the procedure instance in the Job Activity page.

  22. Submit the configured Database Upgrade procedure after providing values for the editable fields. After you have submitted the procedure, the summary for the running procedure is displayed.

  23. In the Upgrade Oracle Database procedure execution page, in the Current Run tab, view the upgrade job steps and status.

  24. If you have specified a breakpoint, the procedure execution will pause at the step specified. Once the execution pauses, you can do either of the following using the Run to step list.

    • Set a new breakpoint by selecting an appropriate step

    • Select All remaining steps.

    You can also perform the following actions:The possible actions are Stop, Resume, Suspend, Cleanup, Resubmit, and Skip Step. Click Resubmit to resubmit the current instance for execution.

    • Suspend: to suspend the upgrade deployment procedure.

    • Resume: to resume the upgrade deployment procedure after you have suspended it.

    • Stop: to stop the upgrade deployment procedure.

    • Restore: to do a rollback of the Grid Infrastructure. This submits another deployment procedure.

      Note:

      The rollback instance can be tracked in the same page as that of the upgrade execution run. This can be used where there is a fatal failure during the GI rollback.
    • Retry: to retry the failed step. This option can be used to retry the prerequisite step that might have failed in the previous run (The fixups were performed outside the flow),

    • Ignore: to ignore a failed step.

    • Resubmit: to resubmit the upgrade deployment procedure (usually after fixing errors found). In general, this should only be used when you are unable to perform a retry on the previous run.

  25. If a step has status Failed, click View Log. The Job Run for the step is listed. Click Show in the Details column to view the entire log. Fix the error and click Retry.

  26. After the procedure execution is completed, click on the Database menu and verify that the newly upgraded databases appear as Cloud Control targets

18.4 Upgrading an Oracle Database or Oracle RAC Database Instance Using the Database Upgrade Wizard

This section describes how you can use the wizard to upgrade one single instance database or one Oracle RAC database instance at a time.

Upgrading enables you to access the latest technology, thereby increasing efficiency and providing secure data management for your applications. Ensure that you follow these steps to plan, prepare, and upgrade to make the upgrade process simpler, faster, and more predictable from start to finish.

The Database Upgrade feature allows you to submit a database upgrade job remotely from Enterprise Manager or schedule it for later execution.

Use this wizard to upgrade a standalone database where the Oracle Home has been installed or upgraded. For database upgrade automation or when Oracle Homes are not installed or upgraded, use the Upgrade Database deployment procedure explained in Upgrading Oracle Databases Using Deployment Procedures.

Note:

Since mass upgrade of Oracle RAC database is not supported at the moment, Oracle recommends that you use the wizard described in this section to upgrade one Oracle RAC database instance at a time.

This section covers the following:

18.4.1 Meeting the Prerequisites

Before you upgrade an Oracle Database Instance, follow these prerequisites:

  • The database version must be 10.2.0.4 or above for upgrade to 11g or 12c.

  • For Oracle Real Application Clusters databases, if you select an Oracle RAC database instance and start the database upgrade process, it will upgrade the entire cluster database.

  • If OS authentication is not turned on, SYSDBA credentials are required for the upgrade.

  • Database to be upgraded must be up and running.

  • Ensure that you have DBA privileges to run this procedure.

18.4.2 Performing the Upgrade Procedure

To upgrade an Oracle Database Instance, follow these steps:

  1. From the Enterprise menu, select Targets, then select Database. In the Databases page, select the source database to be upgraded.

  2. In the Database Instance home page, from the Oracle Database menu, select Provisioning, then select Upgrade Database.

    Note:

    For single instance database instances, you will see another menu option to upgrade the Oracle home and the instance. If you select that option, you will be taken to the wizard described in Section 18.4, however, only the database instance, from where you navigated to the wizard, will be pre-selected for upgraded.
  3. Specify the Database user and password credentials and click Continue. The Database Upgrade wizard is launched.

  4. In the Oracle Home page, select the New Oracle Home where you want the new Oracle Home for the upgrade to be installed, based on the version of the database to be upgraded.

    If the Oracle Home is not a discovered target in Cloud Control, either discover the Oracle Home using the Cloud Control Discovery feature and then initiate the upgrade process or type the path of the Oracle Home manually. For Oracle Real Application Clusters databases, specify the Oracle RAC home.

    For information about discovering targets in Cloud Control, see Chapter 3.

    When specifying the new Oracle Home, you must have DBA permissions on both the source and destination Oracle Homes and these Oracle Homes must reside on the same host.

  5. In the Oracle Home Credentials section, specify the host credentials. Host credentials must have DBA privileges and can be Preferred Credentials, or Named Credentials, or, you can select Enter Credentials and specify the user name and password and save it. Click More Details to view details about the host credentials you have selected. The specified Oracle Home credentials should have privileges on both the source database Oracle Home and the new Oracle Home. Click Test to verify that the credentials have the required privileges. If you are using Named Credentials, ensure that these are user and password credentials, else they will not be supported in Cloud Control.

  6. Click Next. The errors and warnings from the prerequisite checks are displayed. Fix all errors and warnings and revalidate. Click OK to proceed to next step.

  7. In the Options page, the Diagnostics destination field is displayed only for database upgrade from version 10.2.x to 11.1.0.6. The diagnostic destination is defaulted to Oracle Base and all diagnostic and trace files are stored at this location.

    If you are upgrading from version 11.1.0.7 or higher to 11.2.x, the diagnostic destination field does not appear.

  8. The Upgrade parallelism is set at a default value of 4. The maximum value is 8. This feature is available only when you are upgrading the database to 12c.

    If archive logging has been turned on for the database, then you have the option to disable or Keep archive logging enabled during upgrade.

    If flash recovery area has been configured for the database, then the Flash Recovery section will be displayed. Specify Flash Recovery Area Location and provide an adequate space for Size.

  9. If you are upgrading to database version 11.2.0.2 or higher, you will be able to set the time zone upgrade option. You can select to Upgrade Time Zone Version and Timestamp with Time Zone data.

    You can select Gather statistics if you want to gather optimizer statistics on fixed tables. This helps the optimizer to generate good execution plans. It is recommended that you gather fixed object statistics before you upgrade the database.

    You can also select Make user tablespaces readonly. This makes the tablespaces read-only during the database upgrade, and it reverts back to read-write once the upgrade is done.

    Note:

    The Gather statistics and Make user tablespaces readonly options are available only when upgrading to 12c.

    Note:

    If the database has ASM configured with it, the Backup section will not be displayed.
  10. In the Backup section, you can select:

    • Restore Settings Only to restore configuration changes made during database upgrade and not actual data, in case upgrade fails.

    • Perform full backup before upgrade and restore upon failure to restore oratab configuration. Specify a file system location for Backup Location. The credentials that you have specified earlier must have read-write permissions to this location.

      Note:

      If you perform a backup using RMAN then you can restore the entire database irrespective of datafiles on filesystem or ASM. Backup using RMAN is available when upgrading to 12c only.
    • Use an existing RMAN backup to restore database enables you to restore a database using the latest RMAN backup. This option is specific to upgrading a database to 12c.

    • Use guaranteed restore point to flashback the database.

      Note:

      The source database version should be from 11g onwards. The target home version should be 12c
    • None if you do not want to specify a database backup.

    Note:

    Starting with Oracle Database 12c Release 1 (12.1), Oracle Database supports the use of Oracle Home User, specified at the time of Oracle Database installation. This Oracle Home user is the owner of Oracle services that run from Oracle home and cannot be changed post installation. Different Oracle homes on a system can share the same Oracle Home User or use different Oracle Home User names.

    An Oracle Home User is different from an Oracle Installation User. An Oracle Installation User is the user who needs administrative privileges to install Oracle products. An Oracle Home User is a low-privileged Windows User Account specified during installation that runs most of the Windows services required by Oracle for the Oracle home. For more information about Oracle Home User, see Oracle Database Platform Guide..

    For database version 12.1 or higher, for Microsoft Windows operating systems, the database services will be configured for the Microsoft Windows user specified during Oracle home installation.This user will own all services run by Oracle software.

    In the Oracle Home Windows User Credentials section, specify the host credentials for the Microsoft Windows user account to configure database services. Select existing named credentials or specify new credentials. To specify new credentials, provide the user name and password. You can also save these credentials and set them as preferred credentials.

    In the Advanced section, specify the custom SQL scripts you want to run before and after the database upgrade. Copy these scripts to the host file system and select them. If your custom scripts are stored as a component in the Software Library, select Select these scripts from the Software Library and then browse the Software Library for these scripts. During execution, the main file specified in the Software Library component will be run. So, if you want to run a set of scripts, organize them in the main script file and specify the main script in the Software Library component.

  11. Select Recompile invalid objects at the end of upgrade to make valid database objects for the new database version. Setting a higher Degree of Parallelism will ensure faster recompilation of objects. The default setting is the number of CPU count of the host.

    Click Next.

  12. The Listeners page is displayed only for single instance database upgrade. In the Listeners page, listeners that are registered with Oracle Restart and those that are running in the new Oracle Home are displayed. You can create a new listener or migrate your existing listener manually and then upgrade the database. If you create a new listener, the listener will then be an Cloud Control target and will be monitored. If you migrate your existing listener, the upgrade job will register the database with the listener.

    If you have listeners running in the source Oracle Home and need to maintain the same listener port after upgrade, migrate your listener manually to the new Oracle Home first.

    For Oracle Real Application Clusters database, the upgraded database will be registered with the Clusterware listener automatically and the Listeners page will not appear.

    To add a new listener, specify the Name and Port Number.

    Click Next.

  13. In the Schedule page, edit or retain the Job Name and Description for the database upgrade. If you want to run the job immediately, then retain the default selection, that is, Immediately. If you want to run the job later, then select Later and provide time zone, start date, and start time details. Specify a Grace Period, a duration after the start period for Cloud Control to attempt to start the upgrade job if it cannot start at the specified time.

    Select Blackout the database target in Enterprise Manager during upgrade if you do not want the database to be monitored and alerts to be raised by Cloud Control during the upgrade.

    Click Next.

  14. In the Review page, ensure that you review all warnings generated in the Validation Summary. Click the Validation Summary icon to view validation results and severity and action taken for any warnings. Verify that the details you have provided for the upgrade job appear correctly and then click Submit Job to run the job according to the schedule set. If you want to modify the details, then click Back repeatedly to reach the page where you want to make the changes. Click Save to save the deployment procedure for future deployment.

  15. After you have submitted the job, the Database Upgrade Job page with the summary for the running job will be displayed. In the Jobs page, view the job summary and the list of steps and view their status.

    Note:

    If the database upgrade fails for any reason and you have not specified a backup option in the Database Upgrade wizard, restore the database manually and perform the upgrade again. If the database upgrade succeeded, but post upgrade custom scripts did not run, then the database will not be restored since upgrade has succeeded.
  16. After the upgrade job is completed successfully, click on the Targets menu and select All Targets to navigate to the All Targets page and verify that the newly upgraded database is displayed as an Cloud Control target with the correct database version.