Select Language:
Upgrading your Oracle Database on Amazon RDS to version 21c requires some preparation because 21c only supports a CDB (Container Database) architecture. If your current database isn’t using this architecture, you’ll need to convert it first before upgrading.
The key is that you can’t upgrade in a single step if your database isn’t already a CDB. You’ll need to do this in two parts: first, convert your non-CDB to a CDB, then upgrade from 19c to 21c.
Start by converting your existing non-CDB into a single-tenant CDB. To do this:
1. Go into your RDS console and select the option to switch to Oracle’s multitenant architecture. Keep in mind, after this step, your database will operate in a single-tenant mode. For detailed instructions, you can refer to the Amazon RDS documentation on converting non-CDBs to CDBs.
Next, turn your single-tenant CDB into a multi-tenant setup:
1. Change the architecture setting again, but this time select the multi-tenant option. This will make your database the first tenant of a multi-tenant environment. The process involves running a modify command again, as the conversion is not a one-step procedure. Detailed guidance is available in Amazon’s official docs on converting single-tenant to multi-tenant configurations.
Once your database is set up as a multi-tenant CDB, you’re ready for the upgrade:
– Create a new parameter group specific to the CDB architecture for your target database version.
– Set up a new option group suited for CDBs.
– Remember that converting from non-CDB to CDB is a one-way operation. You cannot revert back after the conversion, and the upgrade itself cannot be scheduled; it happens immediately once initiated.
– Make sure you are upgrading to a release update released in the same month or later.
Before starting the upgrade, here are some important preparations:
– Review detailed Oracle guides and AWS documentation for version-specific compatibility issues.
– Optimize your database by gathering necessary statistics, which helps keep performance smooth.
– Pre-create the parameter and option groups so they are ready when the upgrade begins.
– Check that all database links and external dependencies are working correctly.
– Ensure your storage has enough space, as upgrades often need additional temporary space.
– Always take a manual snapshot before starting. Automatic snapshots happen during the process, but having your own backup adds extra security.
After the upgrade:
– Check for any invalid objects and recompile as necessary.
– Follow post-upgrade steps as outlined in Oracle’s documentation for the new version.
– Test your applications thoroughly to confirm everything functions properly.
– If any issues occur, you can restore your database using a point-in-time recovery.
– Think about upgrading any older database snapshots to ensure your environment stays current and manageable.
Keep in mind, upgrading from 19c to 21c will cause some downtime, with duration depending on factors like your database size, system resources, and activity level. It’s best to test the upgrade in a staging environment first and schedule the upgrade during off-hours to minimize impact.