Converting an RDS for Oracle non-CDB to a CDB - Amazon Relational Database Service

Converting an RDS for Oracle non-CDB to a CDB

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:

  • You must specify oracle-ee-cdb or oracle-se2-cdb for the DB engine type. These are the only supported values.

  • Your DB engine must use Oracle Database 19c with an April 2021 or later release update (RU).

The operation has the following limitations:

  • You can't convert a CDB to a non-CDB. You can only convert a non-CDB to a CDB.

  • You can't convert a non-CDB to the multi-tenant configuration in a single modify-db-instance call. After you convert a non-CDB to a CDB, your CDB is in the single-tenant configuration. To convert the single-tenant configuration to the multi-tenant configuration, run modify-db-instance again. For more information, see Converting the single-tenant configuration to multi-tenant.

  • You can't convert a primary or replica database that has Oracle Data Guard enabled. To convert a non-CDB that has read replicas, first delete all read replicas.

  • You can't upgrade the DB engine version and convert a non-CDB to a CDB in the same operation.

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 at https://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, see Option group considerations.

  8. When all the changes are as you want them, choose Continue and check the summary of modifications.

  9. (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.

  10. On the confirmation page, review your changes. If they are correct, choose Modify DB instance.

    Or choose Back to edit your changes or Cancel 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 or oracle-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 named my-non-cdb and specifies a custom option group and parameter group.

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

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

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