Cloning an Oracle Autonomous Database

Often times development and testing teams need a copy of a production database in order to develop or test using a representative dataset. Up until now, creating these cloned  environments has been a challenging and time consuming process for DBAs.

Oracle Autonomous Database makes it extremely easy for a DBA to clone a database in just a few mouse clicks, as I demonstrate in the video below.

When it comes to cloning an Autonomous Database  you have two options:

You can create a new database that is a complete copy of the original database, which includes all metadata (table and view definitions etc.) and all of the actual data. This is referred to as a FULL CLONE.

Or you can create a new database that only contains the metadata from the original database.  This is referred to as METADATA CLONE.

Either way the “cloned” database will have a completely new database name, admin password. It can also have different infrastructure criteria (CPU count and storage) from the original database.

The clone will also not have any of the AWR data  or any of the ML Worksheets from original database.

Of course you don’t need to use the UI every time you want to create a clone. All of the tasks that can be done via the UI can be done using REST APIs or CLI commands.


For example you can creates an Autonomous Database by cloning an existing one using the following REST API:

POST /20160918/autonomousDatabases
Host: DATABASE.us-phoenix-1.oraclecloud.com
 
{
"compartmentId" : "ocid.compartment.oc1..",
"displayName" : "sbatp2",
"dbName" : "sbatp2",
"adminPassword" : "**********",
"cpuCoreCount" : 2,
"dataStorageSizeInTBs" : 1,
"source" : "DATABASE",
"sourceId" : "ocid1.autonomousdatabase.oc1.phx..",
"cloneType" : "FULL"
}

Happy Cloning!

This entry was posted in Autonomous Database and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *