wizer_oracle_autonomous_db
Oracle Tips Quick Tips tech suggestions

Creating refreshable clone on Oracle autonomous database

One of the most widely used features in Autonomous Database on shared Infrastructure (ADB-S) today is the ability to clone your database. This feature enables you to clone your source database easily and create another environment which can be used for development or testing purpose.

There are three types of cloning methods available in ADB such as

  1. Full Clone – This creates a new database with the source database’s data & metadata.
  2. Refreshable Clone – This creates a read only copy of the source database’s data and metadata.  This can be refreshed with source database’s data periodically as per requirement
  3. Metadata Clone –    This creates a new database with only metadata of source database. 
Here in this topic I would be talking about Refreshable Clone on Autonomous Database
Refreshable Clone Features

A refreshable cloned instance is a read-only database, which basically stays connected with the source instance and when required it can pull data from the source instance just by simply clicking on “Refresh Clone” button. The entire cloning operating can take place without knowing much of cloning process nitty gritty.

A refreshable clone has a one week refresh age limit. If one do not perform a refresh on the refreshable cloned instance, the cloned instance would no longer be refreshable further. However, the instance can be disconnected from source database and open the database as read write mode.

Steps to create a refreshable Autonomous DB:

Setting up and autonomous database:

Login to OCI console. Assuming we already have an autonomous dabase created, we are using autonomous transaction processing database ATP- PROD.

Navigate to Tools, and open SQL Developer Web. We can use SQL Developer which if available on your local PC. Just make sure the connection towards the ATP-D is working properly. From SQL Developer we would first make some changes into the database.

Provide username: Admin and password to login into SQL Developer Web

Now that we have created a table and inserted data into it. Lets begin the cloning process.

Creating refreshable clone from autonomous database

Navigate to More Actions -> Click on “Create Clone” option.

Here Select the clone type as “Refreshable Clone” and for display name choose a name as per your convenience. In our case we chose Clone of ATP-PROD.

For database name we choose UAT. Note – the cloned refreshable instance name can’t be same as source database’s name in same OCI region.

Choose the desired Network access type. In our case we choose “Allow secure access from everywhere”. If there is a VCN configured, this can be used as well for private access.

Choose a license type. We choose BYOL in our case.

Note:- For refreshable clone , there is no ADMIN password option available, as the password is inherited from the source database.

Insert additional data into the source database

Now once refreshable clone instance is created open the  SQL developer Web and lets check the data

Now we can see the data has been cloned successfully into the refreshable cloned instance. Now let’s insert few more rows into source instance.

Refresh the clone to view the data

In above screenshot it shows the time by which cloned instance must be refreshed, else the instance won’t be able to refreshed further

while we hit the “Refresh Clone” button it asks for timestamp from where instance would get refreshed. In our case , we provided the timestamp after the time when we added a row into the table in source instance.

So after querying the table t1 from refreshable instance , we can see the data has been updated into the refreshable cloned instance.

This concludes the testing of refreshable cloned feature in autonomous database.

Few Focus Points:

  • Oracle ADB refreshable clone feature is not available in always Free Autonomous database. The Oracle ADB refreshable clone feature is available from Oracle Database 19c onwards in OCI.
  • To create a refreshable clone, the source database workload type must be either ATP (Autonomous Transaction Processing) or ADW (Autonomous Data Warehousing). Creation of refreshable clone from Autonomous JSON Database is not supported.
  • It is not possible to create a refreshable clone from another refreshable clone. But creation of  a full or Metadata clone is possible.
  • If its required to change the ADMIN password in refreshable clone, this must be done on source database followed by a refresh, which would eventually change the ADMIN password in the clone instance
  • Oracle Machine Learning is disabled in a refreshable clone read-only database. In addition, the OML User Administration URLs are disabled in the Oracle Cloud Infrastructure console and in the Autonomous Database Service Console.
  • Oracle APEX URL’s do not work in a refreshable clone, as the database runs in read/write mode. The APEX URL’s are disabled in OCI Console and Autonomous database Service Console. The URL are enabled when the database is open in read write mode when the cloned instance is disconnected from source database.
  • You cannot rename a refreshable cloned instance or database

Business cases where the Refreshable clone can be implemented: –

  • Creating billing or workload separation for your databases between business units within the organization
  • Providing up-to-date read-only test database environments to internal teams
  • Providing a routinely updated clone to a different business unit within your organization for             reporting and analysis

Source: https://dbasoumya.blogspot.com

One thought on “Creating refreshable clone on Oracle autonomous database”

Comments are closed.