Amazon Relational Database Service
User Guide (API Version 2014-10-31)

Upgrading the Oracle DB Engine

When Amazon RDS supports a new version of Oracle, you can upgrade your DB instances to the new version. Amazon RDS supports the following upgrades to an Oracle DB instance:

  • Major Version Upgrades – from 11g to 12c.

You must perform all upgrades manually, and an outage occurs while the upgrade takes place. The time for the outage varies based on your engine version and the size of your DB instance.

For information about what Oracle versions are available on Amazon RDS, see Oracle Database Engine Release Notes.

Overview of Upgrading

Amazon RDS takes two DB snapshots during the upgrade process. The first DB snapshot is of the DB instance before any upgrade changes have been made. If the upgrade doesn't work for your databases, you can restore this snapshot to create a DB instance running the old version. The second DB snapshot is taken after the upgrade completes.

Note

Amazon RDS only takes DB snapshots if you have set the backup retention period for your DB instance to a number greater than 0. To change your backup retention period, see Modifying a DB Instance Running the Oracle Database Engine.

After an upgrade is complete, you can't revert to the previous version of the database engine. If you want to return to the previous version, restore the DB snapshot that was taken before the upgrade to create a new DB instance.

If your DB instance is in a Multi-AZ deployment, both the primary and standby replicas are upgraded. The primary and standby DB instances are upgraded at the same time, and you experience an outage until the upgrade is complete.

Major Version Upgrades

Amazon RDS supports the following major version upgrades:

  • Oracle DB instances running Oracle version 12.1.0.2 to Oracle version 12.2.0.1

  • Oracle DB instances running Oracle version 11.2.0.4 to Oracle version 12.2.0.1

  • Oracle DB instances running Oracle version 11.2.0.4 to Oracle version 12.1.0.2.v5 and higher

To perform a major version upgrade, modify the DB instance manually. Major version upgrades don't occur automatically.

In some cases, your current Oracle DB instance might be running on a DB instance class that isn't supported for the version to which you are upgrading. In such a case, you must migrate the DB instance to a supported DB instance class before you upgrade. For more information about the supported DB instance classes for each version and edition of Amazon RDS Oracle, see DB Instance Class.

Before you perform a major version upgrade, Oracle recommends that you gather optimizer statistics on the DB instance that you are upgrading. Gathering optimizer statistics can reduce DB instance downtime during the upgrade. To gather optimizer statistics, connect to the DB instance as the master user, and run the DBMS_STATS.GATHER_DICTIONARY_STATS procedure, as in the following example.

EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;

For more information, see Gathering Optimizer Statistics to Decrease Oracle Database Downtime in the Oracle documentation.

Note

Major version upgrades aren't supported for deprecated Oracle versions, such as Oracle version 11.2.0.3 and 11.2.0.2.

Major version downgrades aren't supported.

A major version upgrade from 11g to 12c must upgrade to an Oracle Patch Set Update (PSU) that was released in the same month or later.

For example, a major version upgrade from Oracle version 11.2.0.4.v14 to Oracle version 12.1.0.2.v11 is supported. However, a major version upgrade from Oracle version 11.2.0.4.v14 to Oracle version 12.1.0.2.v9 isn't supported. This is because Oracle version 11.2.0.4.v14 was released in October 2017, and Oracle version 12.1.0.2.v9 was released in July 2017. For information about the release date for each Oracle PSU, see Oracle Database Engine Release Notes.

Oracle Minor Version Upgrades

To perform a minor version upgrade, modify the DB instance manually. Minor version upgrades don't occur automatically. A minor version upgrade applies an Oracle PSU.

The following minor version upgrades aren't supported.

Current Version Upgrade Not Supported

12.1.0.2.v6

12.1.0.2.v7

12.1.0.2.v5

12.1.0.2.v7

12.1.0.2.v5

12.1.0.2.v6

Note

Minor version downgrades aren't supported.

Oracle SE2 Upgrade Paths

The following table shows supported upgrade paths to Standard Edition Two (SE2). For more information about the License Included and Bring Your Own License (BYOL) models, see Oracle Licensing.

Your Existing Configuration Supported SE2 Configuration

12.2.0.1 SE2, BYOL

12.2.0.1 SE2, BYOL or License Included

12.1.0.2 SE2, BYOL

12.2.0.1 SE2, BYOL or License Included

12.1.0.2 SE2, BYOL or License Included

11.2.0.4 SE1, BYOL or License Included

11.2.0.4 SE, BYOL

12.2.0.1 SE2, BYOL or License Included

12.1.0.2 SE2, BYOL or License Included

To upgrade from your existing configuration to a supported SE2 configuration, use a supported upgrade path. For more information, see Major Version Upgrades.

Option and Parameter Group Considerations

Option Group Considerations

If your DB instance uses a custom option group, in some cases Amazon RDS can't automatically assign your DB instance a new option group. For example, this occurs when you upgrade to a new major version. In those cases, you must specify a new option group when you upgrade. We recommend that you create a new option group, and add the same options to it as in your existing custom option group.

For more information, see Creating an Option Group or Making a Copy of an Option Group.

If your DB instance uses a custom option group that contains the APEX option, in some cases you can reduce the time it takes to upgrade your DB instance by upgrading your version of APEX at the same time as your DB instance. For more information, see Upgrading the APEX Version.

Parameter Group Considerations

If your DB instance uses a custom parameter group, in some cases Amazon RDS can't automatically assign your DB instance a new parameter group. For example, this occurs when you upgrade to a new major version. In those cases, you must specify a new parameter group when you upgrade. We recommend that you create a new parameter group, and configure the parameters as in your existing custom parameter group.

For more information, see Creating a DB Parameter Group or Copying a DB Parameter Group.

Testing an Upgrade

Before you perform a major version upgrade on your DB instance, you should thoroughly test your database and all applications that access the database for compatibility with the new version. We recommend that you use the following procedure.

To test a major version upgrade

  1. Review the Oracle upgrade documentation for the new version of the database engine to see if there are compatibility issues that might affect your database or applications. For more information, see Database Upgrade Guide in the Oracle documentation.

  2. If your DB instance uses a custom option group, create a new option group compatible with the new version you are upgrading to. For more information, see Option Group Considerations.

  3. If your DB instance uses a custom parameter group, create a new parameter group compatible with the new version you are upgrading to. For more information, see Parameter Group Considerations.

  4. Create a DB snapshot of the DB instance to be upgraded. For more information, see Creating a DB Snapshot.

  5. Restore the DB snapshot to create a new test DB instance. For more information, see Restoring from a DB Snapshot.

  6. Modify this new test DB instance to upgrade it to the new version, by using one of the following methods:

  7. Perform testing:

    • Run as many of your quality assurance tests against the upgraded DB instance as needed to ensure that your database and application work correctly with the new version.

    • Implement any new tests needed to evaluate the impact of any compatibility issues that you identified in step 1.

    • Test all stored procedures, functions, and triggers.

    • Direct test versions of your applications to the upgraded DB instance. Verify that the applications work correctly with the new version.

    • Evaluate the storage used by the upgraded instance to determine if the upgrade requires additional storage. You might need to choose a larger instance class to support the new version in production. For more information, see DB Instance Class.

  8. If all tests pass, then perform the upgrade on your production DB instance. We recommend that you don't allow write operations to the DB instance until you confirm that everything is working correctly.

AWS Management Console

To upgrade an Oracle DB instance by using the AWS Management Console, you follow the same procedure as when you modify the DB instance. To upgrade, change the DB engine version. For more detailed instructions, see Modifying a DB Instance Running the Oracle Database Engine.

CLI

To upgrade an Oracle DB instance by using the AWS CLI, call the modify-db-instance command with the following parameters:

  • --db-instance-identifier – the name of the DB instance.

  • --engine-version – the version number of the database engine to upgrade to.

  • --allow-major-version-upgrade – to upgrade major version.

  • --no-apply-immediately – apply changes during the next maintenance window. To apply changes immediately, use --apply-immediately. For more information, see The Impact of Apply Immediately.

You might also need to include the following parameters. For more information, see Option Group Considerations and Parameter Group Considerations.

  • --option-group-name – the option group for the upgraded DB instance.

  • --db-parameter-group-name – the parameter group for the upgraded DB instance.

Example

The following code upgrades a DB instance. These changes are applied during the next maintenance window.

For Linux, OS X, or Unix:

aws rds modify-db-instance \ --db-instance-identifier <mydbinstance> \ --engine-version <12.1.0.2.v10> \ --option-group-name <default:oracle-ee-12-1> \ --db-parameter-group-name <default.oracle-ee-12.1> \ --allow-major-version-upgrade \ --no-apply-immediately

For Windows:

aws rds modify-db-instance ^ --db-instance-identifier <mydbinstance> ^ --engine-version <12.1.0.2.v10> ^ --option-group-name <default:oracle-ee-12-1> ^ --db-parameter-group-name <default.oracle-ee-12.1> ^ --allow-major-version-upgrade ^ --no-apply-immediately

API

To upgrade an Oracle DB instance by using the Amazon RDS API, call the ModifyDBInstance action with the following parameters:

  • DBInstanceIdentifier – the name of the DB instance.

  • EngineVersion – the version number of the database engine to upgrade to.

  • AllowMajorVersionUpgrade – set to true to upgrade major version.

  • ApplyImmediately – whether to apply changes immediately or during the next maintenance window. To apply changes immediately, set the value to true. To apply changes during the next maintenance window, set the value to false. For more information, see The Impact of Apply Immediately.

You might also need to include the following parameters. For more information, see Option Group Considerations and Parameter Group Considerations.

  • OptionGroupName – the option group for the upgraded DB instance.

  • DBParameterGroupName – the parameter group for the upgraded DB instance.

Example

The following code upgrades a DB instance. These changes are applied during the next maintenance window.

https://rds.amazonaws.com/ ?Action=ModifyDBInstance &AllowMajorVersionUpgrade=true &ApplyImmediately=false &DBInstanceIdentifier=mydbinstance &DBParameterGroupName=default.oracle-ee-12.1 &EngineVersion=12.1.0.2.v10 &OptionGroupName=default:oracle-ee-12-1 &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2014-10-31 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20131016/us-west-1/rds/aws4_request &X-Amz-Date=20131016T233051Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=087a8eb41cb1ab5f99e81575f23e73757ffc6a1e42d7d2b30b9cc0be988cff97

Related Topics