Cloning an Autonomous Database

This topic describes how to clone an existing Autonomous Database using the Oracle Cloud Infrastructure Console or the API. You can use the cloning feature to create a point-in-time copy of your Autonomous Database for purposes such as testing, development, or analytics. To clone only the database schema of your source database, choose the metadata clone option.

Note

  • You can clone any existing Autonomous Database (including those provisioned with preview version software) using a preview version of Autonomous Database. However, preview-version databases cannot be cloned using the regular (general-availability) Autonomous Database software.
  • You cannot clone an Autonomous Database from one Autonomous Container Database to another Autonomous Container Database if one of the Autonomous Container Databases has different encryption management configured. Encryption management must be the same for both Autonomous Container Databases, either Oracle-managed or customer-managed.

Clone Types

The clone feature offers the following types of Autonomous Database clones:

  • Full clone: This option creates a database that includes the metadata and data from the source database.
  • Metadata clone: This option creates a database that includes only the metadata from the source database.
  • Refreshable clone: This option creates a clone that can be easily updated with changes from the source database. For information about creating and using refreshable clones, see Using Refreshable Clones with Autonomous Database.

Clone Sources

You can use a running database to create a clone. For databases running on shared Exadata infrastructure, you can also use a backup as the source of your clone. When using a backup, you can select a listed backup to clone from, or create a point-in-time clone. Point-in-time clones contain all data up to a specified timestamp. The specified timestamp must be in the past.

Note

When you create a clone from a backup, you must select a backup that is at least two hours old.

Prerequisites

To clone an Autonomous Database, you must have the required type of access in a policy  written by an administrator, whether you're using the Console or the REST API with an SDK, CLI, or other tool. If you perform an action and get a message that you don’t have permission or are unauthorized, confirm with your administrator the type of access you've been granted and which compartment  you should work in. See Authentication and Authorization for more information on user authorizations for the Oracle Cloud Infrastructure Database service.

Note

You can't clone a database in a security zone to create a database that isn't in a security zone. This is true whether the source is a running database or a database backup. See the Security Zone Policies topic for a full list of policies that affect Database service resources.

Password Requirement for New Databases on Dedicated Exadata Infrastructure

When cloning a database on dedicated Exadata infrastructure, the password you set for the target database cannot be one of the three most recently used passwords of the source database.

Using the Oracle Cloud Infrastructure Console

Note

See Create a Refreshable Clone for an Autonomous Database Instance for instructions for creating a refreshable clone.
To clone an Autonomous Database to shared Exadata infrastructure
  1. Open the navigation menu. Under Oracle Database, click Autonomous Data Warehouse, Autonomous JSON Database, or Autonomous Transaction Processing.
  2. If you are not already in the correct compartment, then choose one from the Compartment drop-down in the List Scope section that contains the database you want to clone.
  3. In the list of Autonomous Databases, click the display name of the database you want to clone.
  4. Go to More Actions, and then click Create Clone.

    In the Create Autonomous Database Clone dialog, enter the following:

    Clone Type

    Select the type of clone you want to create. Choose either Full Clone or Metadata Clone.

    Clone Source

    The clone source selection allows you to specify whether the clone is created from a running database or from a database backup. Select one of the following options:

    • Clone from running database: Creates a clone of a running database as it exists at the current moment.
    • Clone from a backup: Creates a clone from a database backup. If you choose this option, select one of the following options:

      • Specify a timestamp: Creates a point-in-time clone.
      • Select from a list of backups: Creates a clone using all data from the specified backup. To limit your list of backups to a specific date range, enter the starting date in the From field and the ending date in the To field.

        Note: You must select a backup that is at least 2 hours old, or the clone operation will fail.

    Database Information
    • Compartment:Your current compartment is the default selection.
    • Display Name: A user-friendly description or other information that helps you easily identify the resource. The display name does not have to be unique, and you can change it whenever you like. Avoid entering confidential information.
    • Database Name: The database name must consist of letters and numbers only, starting with a letter. The maximum length is 14 characters. Avoid entering confidential information.
    • Choose database version: Select a database version from the available versions.
    • CPU Core Count: You can enable up to 128 cores for your Autonomous Database. The actual number of available cores is subject to your tenancy's service limits.

      Auto Scaling: allows Autonomous Databaseto automatically increase the number of CPU cores by up to three times the assigned CPU core count value, depending on demand for processing. The auto scaling feature reduces the number of CPU cores when additional cores are not needed. For databases with up to 42 assigned cores, you can increase the maximum number of cores available through auto scaling by increasing the CPU core count value.

      Note

      The maximum number of cores that are available to any Autonomous Database database not using dedicated Exadata infrastructure is 128, regardless of whether auto scaling is enabled or not. This means that database with a CPU core count of 64 could auto scale up to two times the assigned number of cores (2 x 64 = 128). A database with 42 cores (or fewer) could auto scale up to three times the assigned number (3 x 42 = 126). For billing purposes, the database service determines the average number of CPUs used per hour.
    • Storage: Specify the storage you wish to make available to your Autonomous Database database, in terabytes. You can make up to 128 TB available. For full clones, the size of the source database determines the minimum amount of storage you can make available.
    • Enable Preview Version: (This option only displays during periods when a preview version of Autonomous Database is available) Select this option to provision the database with an Autonomous Database preview version. Preview versions of Autonomous Database are made available for limited periods for testing purposes. Do not select this option if you are provisioning a database for production purposes or if you will need the database to persist beyond the limited availability period of the preview version.
    Administrator Credential

    Set the password for the Autonomous Database Admin user by entering a password that meets the following criteria. You use this password when accessing the Autonomous Database service console and when using an SQL client tool.

    • Password cannot be one of the three most recently used passwords of the source database
    • Contains from 12 to 30 characters
    • Contains at least one lowercase letter
    • Contains at least one uppercase letter
    • Contains at least one number
    • Does not contain the double quotation mark (")
    • Does not contain the string "admin", regardless of casing
    License Type

    The type of license you want to use for the Autonomous Transaction Processing database. Your choice affects metering for billing. You have the following options:

    • My Organization Already Owns Oracle Database Software Licenses: This choice is used for the Bring Your Own License (BYOL) license type. If you choose this option, make sure you have proper entitlements to use for new service instances that you create.
    • Subscribe to New Database Software Licenses and the Database Cloud Service: This is used for the License Included license type. With this choice, the cost of the cloud service includes a license for the Database service.
  5. Click Create Autonomous Database Clone.

The Console displays the details page for the new clone of your database and the service begins provisioning the Autonomous Database. Note the following:

  • The new clone displays the Provisioning lifecycle state until the provisioning process completes.
  • The source database remains in the Available lifecycle state.
  • Backups associated with the source database are not cloned for either the full clone or the metadata clone option.
  • Oracle recommends that you evaluate the security requirements for the new database and implement them, as applicable. See Security Considerations for details.

WHAT NEXT?

To clone an Autonomous Database to dedicated Exadata infrastructure
  1. Open the navigation menu. Under Oracle Database, click Autonomous Data Warehouse, Autonomous JSON Database, or Autonomous Transaction Processing.
  2. If you are not already in the correct compartment, then choose one from the Compartment drop-down in the List Scope section that contains the database you want to clone.

  3. In the list of Autonomous Databases, click the display name of the database you want to clone.
  4. Click More Actions to display a list of actions.

  5. Click Create Clone to display the Create Autonomous Database Clone page.

    In the Clone Type section, select the type of clone you want to create. Choose either Full Clone or Metadata Clone.

    Provide basic information for the Autonomous Database

    • Create in Compartment: Your current compartment is the default selection but you can select a different compartment in which to create the clone from the drop-down list.
    • The name of the source database displays in the read-only Source database name field.

    • Display Name: Enter a description or other information to identify the database clone. You can change the display name any time and it does not have to be unique. Avoid entering confidential information.
    • Database Name: Enter a database name for the clone that contains only letters and numbers, begins with a letter, and does not exceed 14 characters. Avoid entering confidential information.
    • Autonomous Container Database in compartment: You can choose to create the database clone in the same compartment and container database as the source database, or you can choose a different compartment by clicking Change compartment, and a different container database by choosing one from the drop-down list.

    Configure the database

    • OCPU Count: You can enable up to 92 cores for your cloned Autonomous Database.
    • Storage: Specify the amount of storage, in terabytes, that you want to make available to your cloned Autonomous Database database, up to 128 TB. For full clones, the size of the source database determines the minimum amount of storage you can make available.

    Create administrator credentials

    Set the password for the Autonomous Database administrator user by entering a password that meets the following criteria.

    • Password cannot be one of the three most recently used passwords of the source database
    • Between 12 and 30 characters long
    • Contains at least one lowercase letter
    • Contains at least one uppercase letter
    • Contains at least one number
    • Does not contain the double quotation mark (")
    • Does not contain the string "admin", regardless of casing

    Use this password when accessing the service console and when using a SQL client tool.

  6. Click Create Autonomous Database Clone.

The Console displays the details page for the new clone of your database and the service begins provisioning the Autonomous Database. Note the following:

  • The new clone displays the Provisioning lifecycle state until the provisioning process completes.
  • The source database remains in the Available lifecycle state.
  • Backups associated with the source database are not cloned for either the full-clone or the metadata-clone option.
  • Oracle recommends that you evaluate the security requirements for the new database and implement them, as applicable. See Network Security Groups for Databases Resources That Use Private Endpoints for details.

WHAT NEXT?