AWS Database Blog
Best practices for upgrading Amazon RDS for Oracle DB instances from 18c to 19c
Amazon Relational Database Service (Amazon RDS) for Oracle provides newer versions of databases so you can keep your DB instances up to date. These versions can include bug fixes, security enhancements, and other improvements. When Amazon RDS for Oracle supports a new version, you can choose how and when to upgrade your DB instances. Amazon RDS for Oracle supports two types of upgrades: major version and minor version. In general, a major engine version upgrade can introduce changes that aren’t compatible with existing applications. In contrast, a minor version upgrade in Oracle generally only includes changes that are backward-compatible with existing applications. In other words, a minor version upgrade applies an Oracle Database Patch Set Update (PSU) or Release Update (RU) to a major version. For example, upgrading from 18c to 19c (22.214.171.124) is a major version upgrade, whereas going from 126.96.36.199.ru-2019-04.rur-2019-04.r1 to 188.8.131.52.ru-2019-07.rur-2019-07.r1 is considered a minor version upgrade.
Although Amazon RDS for Oracle allows the option to automate some of the patching decisions, such as minor version patching in the form of automatic minor version upgrade, the majority of patching decisions—including the major version upgrades— are up to you. Therefore, it’s critical to be aware of common issues, steps involved, and best practices to upgrade with the least impact on your business.
In this post, we look at 18c End of Support timeline in Amazon RDS for Oracle, study the version upgrade choices available to you, and dive deep into the best practices to follow during the upgrade process.
This post is relevant to database administrators running their DB instances on Amazon RDS for Oracle. Most pre-upgrade and post-upgrade steps in this post are general guidelines from Oracle support and upgrade documentation relevant to Amazon RDS for Oracle. This post is written considering the various workloads on Amazon RDS for Oracle that could be impacted by 18c to 19c DB upgrade. Not all guidelines mentioned here are relevant to all customers. We strongly recommend that you use your judgment to see which one is suitable for your database based on your options and parameters used. Prior knowledge of Oracle database administration and the environment should be used for performing the upgrade.
Amazon RDS for Oracle: 18c version End of Support timeline
Oracle has announced the end date of support for Oracle Database version 18c as June 30, 2021, after which Oracle Support will no longer release Critical Patch Updates for this database version. 18c is not eligible for Extended Support. Amazon RDS for Oracle will deprecate Oracle Database version 18c on June 30, 2021.
All 18c instances will be automatically upgraded to 19c starting on July 1, 2021. We highly recommend you upgrade your existing Amazon RDS for Oracle 18c DB instances and validate your applications before the automatic upgrades begin.
The following table summarizes the timeline for Oracle 18c.
|Now – June 30th, 2021||You can upgrade 18c DB instances manually to the version of your choice|
|May 1st, 2021||You can upgrade 18c snapshots manually to the version of your choice|
|May 1st, 2021||Amazon RDS for Oracle disables new instance creates on 18c|
|July 1st, 2021||Amazon RDS for Oracle starts automatic upgrades of 18c DB instances to 19c|
|July 1st, 2021||Amazon RDS for Oracle will start automatic upgrades to version 19c for DB instances restored from 18c snapshots|
For up-to-date information about the End of Support of the 18c version by Amazon RDS for Oracle, see Amazon RDS for Oracle – End of Support Timeline for 18c Major Version.
Refer to MOS note #742060.1 for the latest status of Oracle Database releases and support coverage. For License Included customers, please create a support case for this document with AWS.
Version upgrade choices in Amazon RDS for Oracle
Amazon RDS for Oracle supports the following major version upgrade paths (as of this writing).
|Current Version||Supported Upgrade path|
As part of deciding which version to upgrade to, you have the following options:
- 184.108.40.206 – Extended Support for Oracle Database 220.127.116.11 (Terminal Patch Set) ends on July 31, 2022. Amazon RDS for Oracle plans to support Oracle Database 18.104.22.168 until July 31, 2022.
- 22.214.171.124 – Limited Error Correction Support for Oracle Database 126.96.36.199 ends on March 31, 2022. Amazon RDS for Oracle plans to support Oracle Database 188.8.131.52 until March 31, 2022.
- 19c – Premier Support for Oracle Database 19c ends on April 30, 2024, and the Extended Support ends on April 30, 2027. Amazon RDS for Oracle plans to support Oracle Database 19c until April 30, 2027.
We recommend you upgrade your 18c DB instances to 19c because it’s the long-term support release. When upgrading any software, checking for compatibility of the new version and its features plays a crucial role in the upgrade’s overall success. Oracle Database versions and releases can differ in how they work and interact with applications, which may result in compatibility issues. Although the way you interact with Amazon RDS for Oracle remains the same from the major version upgrade perspective, Oracle Database specific features across major versions may change or even become obsolete. For more information about major version upgrades, see Oracle database engine release notes.
Keep in mind the following:
- Major version downgrades aren’t supported
- A major version upgrade from 18c to 19c must upgrade to an Oracle PSU released in the same month or later
For example, a major version upgrade from Oracle version 184.108.40.206.ru-2019-10.rur-2019-10.r1 to Oracle version 220.127.116.11.ru-2020-01.rur-2021-01.r1 is supported. However, a major version upgrade from Oracle version 18.104.22.168.ru-2019-10.rur-2019-10.r1 to Oracle version 22.214.171.124.ru-2019-07.rur-2019-07.r1 isn’t supported. This is because Oracle version 126.96.36.199.ru-2019-10.rur-2019-10.r1 was released in October 2019, and Oracle version 188.8.131.52.ru-2019-07.rur-2019-07.r1 was released in July 2019. For information about the release date for each Oracle PSU, see Oracle database engine release notes.
Downtime considerations for a major version upgrade
Amazon RDS lets you manually initiate a major version upgrade by modifying the DB instance—either via the AWS Management Console, AWS Command Line Interface (AWS CLI), or Amazon RDS API. This is an in-place upgrade and requires downtime for your applications during the upgrade process. In the event of any issues with the upgrade phase, you can restore the latest backup. The duration of the outage varies based on your engine version and the DB instance class. You can determine the exact amount of time it takes by exercising a test upgrade using a snapshot restore of the production database in a pre-production environment.
If performing the major version upgrade using the modify DB instance method isn’t desirable for your application, an alternative approach is using logical bi-directional replication with either AWS Database Migration Service (AWS DMS) or Oracle GoldenGate. This method can provide the least downtime for the upgrade. This method involves setting up logical replication between the source and target DB instances (both running on the same version). You then upgrade the target DB instance to 19c, while leaving the source to run on 18c. When the upgrade of the target DB instance is complete, you can point your application to the upgraded target DB instance. This method, which uses bi-directional replication between the source and target DB instances, can also be used as a fallback plan, should the upgrade break due to incompatibility.
This post covers the upgrade process using the modify DB instance method. The logical replication method of upgrading is out of scope of this post.
How Amazon RDS for Oracle performs a major version upgrade
When a major version upgrade is invoked on the console, AWS CLI, or Amazon RDS API, the automation completes the following steps:
- Takes a pre-upgrade snapshot (if configured for backups). You can use this snapshot to roll back to if needed.
- Shuts down the instance and prepares it for the upgrade.
- Runs Oracle upgrade scripts.
- Takes a post-upgrade snapshot.
When Amazon RDS initiates Step 1, the instance’s status changes from
Upgrading. After Step 4, it returns to
Available. The following diagram illustrates the high-level steps when the
modify-db-instance AWS CLI call is invoked.
Best practices for major version upgrades
In this section, we dive deep into the recommended best practices during various phases of the upgrade process: pre-upgrade, upgrade, and post-upgrade. What we discuss in the following sections are the common steps typically completed in most Oracle Database upgrades. For a complete list, see the Oracle Database Upgrade Guide.
Oracle uses the following terminology when upgrading to a higher release (or major version upgrade in Amazon RDS terminology):
- Deprecated features – Features that are no longer being enhanced, but are still supported for the full life of this release of Oracle Database.
- Desupported features – Those that are no longer supported by fixing bugs related to that feature. Oracle can choose to remove the code required to use the feature.
Where indicated, a deprecated feature can be desupported in a future major release. When moving across multiple major releases during the upgrade process, it’s highly recommended to consult Oracle documentation for deprecated and desupported features, options, and parameters in the intermediary releases as well. For more information, see Behavior Changes, Deprecated and Desupported Features for Oracle Database.
You should consider the following factors in the pre-upgrade phase.
A typical upgrade with all possible options in the option group might take 1–2 hours. To reduce downtime, consider the following:
- Take a manual snapshot using the
create-db-snapshotAWS CLI call prior to starting the upgrade phase. This speeds up the time taken for a pre-upgrade snapshot (which is automatically invoked during the upgrade phase).
- When upgrading to 19c, it’s recommended to convert all
DBMS_SCHEDULERbefore the upgrade. During the upgrade, Oracle tries to convert the
DBMS_SCHEDULER. If you have a large number of
DBMS_JOBentries, the upgrade takes longer.
- Make sure the audit trails aren’t very large. Pre-upgrade checks and upgrades can take longer with large audit trails.
- Gather optimizer statistics before the upgrade using
DBMS_STATS.gather_dictionary_stats. Also gather fixed and dictionary stats.
- Remove options that aren’t used. It’s a good practice to remove unused options to speed up the upgrades and result in fewer issues and conflicts when moving from one major version to another.
- Remove or reset parameters that aren’t used for the same preceding reasons.
- If necessary, you might also have to upgrade the instance class based on the target instance choice. For more information, see RDS for Oracle instance classes.
If your DB instance is in a Multi-AZ deployment, Amazon RDS for Oracle upgrades both the primary and Multi-AZ standby simultaneously.
Option groups considerations
Consider the following for option groups:
- By default, when one engine is upgraded to the next higher major version, Amazon RDS for Oracle chooses the default option group if the new corresponding custom option group for the target version isn’t chosen. For example, when upgrading from 18c to 19c, you should create a new option group that’s compatible with the new version 19c and matches closest to the 18c options, and use it during upgrade process. You should also consider factors such as APEX upgrade, which is recommended to be handled as a separate preparatory process, to speed up the upgrade. This also applies to OEM agents. In some cases, options are uninstalled and reinstalled as you move from one version to another. For example, SQLT is freshly installed, which deletes any old metadata stored by the option.
- When choosing the version of the OEM agent, consider the compatibility with the OMS.
- Note the option group and the VPC. If a DB instance is in a VPC, the option group associated with the instance is linked to that VPC. This means that you can’t use the option group assigned to a DB instance if you try to restore the instance to a different VPC or a different platform (for example, when you use the OEM option). When you upgrade a major version, understand the changes Oracle makes to the options in that change. For example, Oracle Multimedia is deprecated as of the Oracle Database 18c release and is desupported in 19c. However, it separated the MDSYS functionality into a separate option called Locator. Oracle also recommends you move from Locator to Spatial and Graph prior to the upgrade. All MDSYS functionality is available with Spatial and Graph. So, when you upgrade to 19c and install Spatial and Graph, all stored procedures work fine. For more information, see “My Oracle support” article 2347372.1. For License Included customers, please create a support case for this document with AWS.
- Starting in Oracle Database 19c, the SQL*Plus table
PRODUCT_USER_PROFILE(PUP table) is desupported. The SQL*Plus product-level security feature is unavailable in Oracle Database 19c. Oracle recommends that you protect data by using Oracle Database settings, so that you ensure consistent security across all client applications.
Parameter groups considerations
Consider the following regarding parameter groups:
- If you associate a new parameter group with a DB instance, reboot the database after the upgrade completes. If you need to reboot the instance to apply the parameter group changes, the instance’s parameter group status shows
pending-reboot. You can view an instance’s parameter group status on the console or by using a
describecommand, such as describe-db-instances.
continuous_minefunctionality of the LogMiner package
DBMS_LOGMNR.START_LOGMNRis obsolete. It was deprecated in Oracle Database 12c Release 2 (12.2). There is no replacement functionality. Oracle didn’t provide any alternative to this. If you use this, you need to address it in a different way, such as AWS DMS or Oracle GoldenGate.
- The apply parameter
OPTIMIZE_PROGRESS_TABLEfor Oracle GoldenGate Integrated Replicat, XStream In, and Logical Standby, is desupported in Oracle Database 19c. Before you upgrade to Oracle Database 19, you must turn off this parameter. If
OPTIMIZE_PROGRESS_TABLEis set to ON, then stop apply gracefully, turn off the parameter, and restart apply. For GoldenGate Apply and XStream, this parameter is set to OFF by default.
The following are some important security considerations:
- By default, Oracle accounts that have not had their passwords reset before upgrade (that are set to
EXPIREDstatus), and that are also set to
LOCKEDstatus, are set to
NO AUTHENTICATIONafter the upgrade is complete. Therefore, post-upgrade, any account with a password set to default, locked, and expired loses the authentication method. Although it could be reverted back, it’s recommended to validate the password for its strength before the upgrade and lock it.
- Check the accounts that use the case-insensitive password version. Log in to SQL*Plus as an administrative user, and enter the following SQL query. If there are any 10g versions, you should refer to the Oracle documentation to fix 10g versions, or user accounts with
LOCKEDafter the upgrade is complete:
- Make sure that you don’t have the deprecated parameter
Finally, you should consider the following general points:
- When upgrading to 19c, we recommend you look at the provisioned capacity and see if it would be met. Depending on the instance class your 18c database is running on, you may need to scale the compute to a newer generation of the instance class. For more information, see RDS for Oracle instance classes. This could also be an opportunity to evaluate Amazon RDS reserved instances, and you may want to purchase new leases for your version before performing the upgrade.
- Make sure that no objects are invalid before upgrading. It’s a good practice to keep a list of all objects with their respective count, type, and status prior to the upgrade and compare it after the upgrade.
- Take a backup of optimizer statistics for all application schemas using the
- Collect pre-upgrade AWR or Statspack snapshots prior to the upgrade. These are used during the post-upgrade performance validation. Even though you would have done this in the pre-production environment, it’s a good practice to do this comparison in the production.
- If you also have a DB maintenance task, such as adding partitions, it’s better to run them before upgrading.
- Disable scheduled database custom jobs or cron jobs.
- It’s recommended to disable any custom DDL triggers before upgrade and re-enable them after upgrade.
- If you’re using materialized views (MV), check the status of all MVs prior to the upgrade. Check the size of the MV logs. If it’s non-zero, address them to make sure they are all in sync. It’s recommended to wait until all MVs have completed refreshing. Make sure that any objects referencing remote databases across database links are accessible to reduce time spent on network timeouts. For more information, see “My Oracle support” Doc ID 1406586.1. For License Included customers, please create a support case for this document with AWS.
- Keep a list of clients and its drivers used along with the version numbers. Identify the corresponding version that works with 19c.
- Review all hidden parameters and make sure they’re modified or removed to meet the target version. Include all features affected by these parameters as part of the functional and performance testing in the pre-production environment.
After you complete the pre-upgrade checks successfully, you can move on to the upgrade phase. If your instance has been using custom option group or parameter group configurations, you must specify new option and parameter groups for the upgrade to go through along with any other additional attributes.
In this section, we discuss how to perform the upgrade on the console or via the AWS CLI.
To upgrade the engine version of a DB instance on the console, complete the following steps:
- On the Amazon RDS console, choose Databases.
- Choose the DB instance that you want to upgrade.
- Choose Modify.The Modify DB Instance page appears.
- For License model, choose the desired license type.
- For DB engine version, choose the new version.
- Choose Continue and check the summary of modifications.
- To apply the changes immediately, choose Apply immediately.Choosing this option can cause an outage in some cases. For more information, see Using the Apply Immediately setting. Otherwise, you can have the upgrade take place in your next weekly maintenance window.
- On the confirmation page, review your changes and choose Modify DB Instance to save your changes.
To perform a major version upgrade in your next maintenance window using the AWS CLI modify-db-instance command, enter the following code:
For information about valid engine versions, use the AWS CLI describe-db-engine-versions command.
If you have multiple instances, you could use the AWS CLI combined with a shell script to upgrade multiple instances. For more information about upgrading the database engine for Amazon RDS for Oracle, see Upgrading the Oracle DB engine.
After the upgrade phase, you can complete the following checks and post-upgrade steps:
INVALIDAs mentioned in the pre-upgrade phase section, checking for objects with
INVALIDstatus and fixing them is required before testing further. This is also a good time to compare the report (list of object count with status) gathered during the pre-upgrade phase.
- If Amazon RDS for Oracle is used as an RMAN catalog, upgrade the RMAN recovery catalog. Use the
UPGRADE CATALOGcommand to upgrade the RMAN recovery catalog schema from an older version to the version required by the RMAN client.
- Complete the following client connectivity steps:
- Make sure to set the
LIBPATH, and more to 19.x in the client home.
- Make appropriate changes to
sqlnet.oraon the client side and incorporate changes related to 19c or the new endpoint if testing on a new RDS instance restored from the production.
- Test the client connectivity. Based on the identified target version of the driver, perform a regression test. Keep in mind there are cases where the choice of JDBC version might impact performance and change the process optimizer plan.
- Make sure to set the
- If you used the
DBSM_STATSpackage to export the optimizer stats as mentioned in the pre-upgrade tasks, upgrade the stats table (using
DBMS_STATS.UPGRADE_STAT_TABLE) where the optimizer statistics are backed up prior to the upgrade. Then restore statistics and run performance testing.
- If you have database links to other RDS for Oracle DB instances or other Oracle instances on Amazon Elastic Compute Cloud (Amazon EC2), it’s recommended to test them from both a functionality and performance standpoint after the upgrade.
- If you have any external scheduler jobs scheduled in Amazon CloudWatch or cron, ensure those are enabled and can still connect to the database after upgrade and run with no issues.
- Also make sure to enable any DDL or system triggers disabled as part of the pre-upgrade check.
- Make sure to have enough free space in
SYSAUXtablespaces. Having an additional 1–2 GB of space in each tablespace is recommended.
- Validate your applications against the upgraded database. It’s vital that you look at the top SQL statements (either via AWR or Statspack) and verify that they are using the desired plans.
- After the upgrade, if the SQL statements perform poorly due to the change in the plans by the 19c optimizer, you can use
OPTIMIZER_FEATURES_ENABLE. This parameter is alterable at the session level and system level. For example, if you upgrade your database from release 18c to release 19c, but you want to keep the release 18c optimizer behavior, you can do so by setting this parameter to 18c. At a later time, you can try the enhancements introduced in releases up to and including release 19c by setting the parameter to 19.0.0.
- If you have an automated process of backup and restore, disaster recovery, or production to non-production refresh procedures, we strongly recommend you test them. You need to test any process that interacts with other databases that may or may not be at the same level.
We highly recommend you upgrade the manual snapshots you intend to retain longer, including the snapshots taken using AWS Backup or any third-party partner products. For example, if you used AWS Backup and the backup was migrated to an Amazon Elastic File System (Amazon EFS) file system based on the lifecycle defined in AWS Backup, when the backup is restored, the first thing the RDS does is force upgrade it to one of the supported versions and then complete the restore. If you want to keep it as a copy of the old version (for example, if the database is supporting an old version of a third-party application) you should plan on making a backup using native Oracle tools such as export data pump or RMAN. Also keep the version incompatibilities in mind.
After you upgrade the database, if you run into connectivity issues such as
"ORA-28040: No matching authentication protocol", you might have to upgrade the client version or the JDBC driver. In general, it’s best to match the client and server versions. The best client version for the database version 19c is client 19c. However, the 18c clients are also supported on 19c. We highly recommend testing for this combination. Refer to “My Oracle support” document 207303.1 for more information with AWS.
Test the upgrade of your RDS for Oracle DB instance
Before you upgrade the production database to a new major version, you must validate your applications against the new version in a pre-production environment. This rehearsal of the upgrade process also allows you to gauge the time it takes to perform this major version upgrade.
The following diagram illustrates the steps to test your upgrade.
The process includes the following steps:
- Take a snapshot of the existing DB instance using the
create-db-snapshotAWS CLI call.
- Restore the DB snapshot using the
restore-db-instance-from-db-snapshotAWS CLI call to create a test DB instance on the same version.
- Run the
modify-db-instanceAWS CLI call on the test DB instance to upgrade it to the new major version.
- When the upgrade is complete, you can validate your application against the test DB instance.
- After the testing is complete, you can schedule and perform the production database upgrade.
In this post, we reviewed the 18c End of Support timeline in Amazon RDS for Oracle, studied the version upgrade choices available to you, and covered the best practices during the phases of the upgrade process.
If you need additional assistance in planning and upgrading your Amazon RDS for Oracle DB instances running on 18c, you can reach out to the following resources:
For more information about the upgrade, see the following:
About the authors
Yamuna Palasamudram is a Senior Database Specialist Solutions Architect with Amazon Web Services. She works with AWS RDS team, focusing on commercial database engines like Oracle. She enjoys working with customers to help design, deploy, and optimize relational database workloads on AWS.
Sundar Raghavan is a Senior Specialist Solutions Architect at Amazon Web Services.