Converting an RDS for Oracle non-CDB to a CDB (original) (raw)

You can change the architecture of an Oracle database from the non-CDB architecture to the Oracle multitenant architecture, also called the CDB architecture, with the modify-db-instance command. In most cases, this technique is preferable to creating a new CDB and importing data. The conversion operation incurs downtime.

When you upgrade your database engine version, you can't change the database architecture in the same operation. Therefore, to upgrade an Oracle Database 19c non-CDB to an Oracle Database 21c CDB, you first need to convert the non-CDB to a CDB in one step, and then upgrade the 19c CDB to a 21c CDB in a separate step.

The non-CDB conversion operation has the following requirements:

The operation has the following limitations:

Before converting your non-CDB, consider the following:

To convert a non-CDB to a CDB
  1. Sign in to the AWS Management Console and open the Amazon RDS console athttps://console.aws.amazon.com/rds/.
  2. In the upper-right corner of the Amazon RDS console, choose the AWS Region where your DB instance resides.
  3. In the navigation pane, choose Databases, and then choose the non-CDB instance that you want to convert to a CDB instance.
  4. Choose Modify.
  5. For Architecture settings, select Oracle multitenant architecture. After conversion, your CDB will be in the single-tenant configuration.
  6. (Optional) For DB parameter group, choose a new parameter group for your CDB instance. The same parameter group considerations apply when converting a DB instance as when upgrading a DB instance. For more information, see Parameter group considerations.
  7. (Optional) For Option group, choose a new option group for your CDB instance. The same option group considerations apply when converting a DB instance as when upgrading a DB instance. For more information, seeOption group considerations.
  8. (Optional) For Credentials management, chooseManaged in AWS Secrets Manager orSelf-managed. For more information, see Managing the master user password for a DB instance with Secrets Manager.
  9. When all the changes are as you want them, chooseContinue and check the summary of modifications.
  10. (Optional) Choose Apply immediately to apply the changes immediately. Choosing this option can cause downtime in some cases. For more information, see Using the schedule modifications setting.
  11. On the confirmation page, review your changes. If they are correct, chooseModify DB instance.
    Or choose Back to edit your changes orCancel to cancel your changes.

To convert the non-CDB on your DB instance to a CDB in the single-tenant configuration, set --engine to oracle-ee-cdb ororacle-se2-cdb in the AWS CLI command modify-db-instance. For more information, see Settings for DB instances.

The following example converts the DB instance namedmy-non-cdb and specifies a custom option group and parameter group. The command also enables password management with Secrets Manager.

Example

For Linux, macOS, or Unix:

aws rds modify-db-instance \
    --db-instance-identifier my-non-cdb \
    --engine oracle-ee-cdb \
    --option-group-name custom-option-group \
    --db-parameter-group-name custom-parameter-group \
    --manage-master-user-password

For Windows:

aws rds modify-db-instance ^
    --db-instance-identifier my-non-cdb ^
    --engine oracle-ee-cdb ^
    --option-group-name custom-option-group ^
    --db-parameter-group-name custom-parameter-group ^
    --manage-master-user-password

To convert a non-CDB to a CDB, specify Engine in the RDS API operation ModifyDBInstance.