I have been part of various Proof of Concepts (PoC) involving Oracle database migration to Exadata Database on Dedicated Infrastructure and I have used various tools including Oracle Zero Downtime Migration (ZDM) for the migration and they are really good for migration.

However , some times the success criteria of PoC is not focused on the migration and all you need is to get a test database migrated to the target as quickly as possible with out much preparation so that other tests that are included in the PoC can progress.

This time you can use another command that can help you to get the job done with very little preparation.

Let’s dive in to find out how the simple dbaascli (command line in ExaDB-D) can be used to do get a clone of your on-premise database in ExaDB-D.

Below is my environment.

Source Platform : OCI IAAS

Source Database: ORCL

Source DB Version : 19.26

Source TDE : Not enabled.

Target Platform : (Oracle ExaDB-D)

Target Database : ORCLC

Target DB version : 19.29

Let’s explore how we can achieve this.

Step 0 – Prerequisites

There are very few things that we need to take care before proceeding with migration.

a. Source Database archivelog Mode

Source database should be in archive log mode.

b.SQL*Net connectivity

Ensure that you have SQL*Net connectivity to source database listener port from Target VM node.

c. Creation of Oracle Home

Create an Oracle Home on ExaDB-D using console or dbaascli.

The Oracle home version must be the same as the source database or of a higher RU version

d. Check the version of dbaascli

We require a minimum dbaastools RPM version of 23.3.2.00 , however it is always recommended to update to latest version.

Check the current version using below command.

 dbaascli --version

Below is sample output.

e. Perform pre-requisite checks

Execute below command as root from Target ExaDB-D VM to perform prerequisites.

dbaascli database duplicate --sourceDBConnectionString 10.0.0.59:1521/ORCL --dbName orclc --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_8 --executePrereqs --waitForCompletion false

–sourceDBConnectionString  – specifies source database connection string in the format of <scan_name_or_ip>:<scan_port>/<database_service_name>

–dbName – Target Database Name.

–oracleHome – Specifies the Target Oracle Home Path.

We have to provide Source database SYS password and SYS and TDE password for the target database (which is going to be created) when asked.

Below is sample output.

You can monitor the progress of the job using command mentioned in the output of the command.

Below is sample output of successful prerequisite job.

Step 1 – Perform migration

We are now ready to kick off the offline migration.

We can use below command similar to the one used for prerequisites.

dbaascli database duplicate --sourceDBConnectionString 10.0.0.59:1521/ORCL --dbName orclc --oracleHome /u02/app/oracle/product/19.0.0.0/dbhome_8 --waitForCompletion false

Below is sample output.

We have to provide source database SYS password and SYS and TDE password for the target database (which is going to be created).

We can monitor the progress of the job using the command given in above output.

Below is sample output after successful completion of the job.

Step 2 – Verify the database (Optional)

I have quickly checked the TDE , RUs and Cluster services of the migrated database and everything looks good.

No specific action required.

How to Troubleshoot ?

You can check the logfile for dbaascli under below location.

/var/opt/oracle/log/<dbname>/database/duplicate

You can also check the logfile for dbca since some of the operations use dbca. dbca logs are under below directories.

/u02/app/oracle/cfgtoollogs/dbca 

/u02/app/oracle/cfgtoollogs/dbca/<dbuniquename>

Tips :

You can use the same method for a source database with TDE , remember to provide additional details in the command.

dbasscli is flexible to migrate a specific PDB from source to the target as well.

You can even use dbaascli for migrating existing OCI databases to ExaDB-D . Refer relevant section of documentation.

Do we need downtime while doing this process ?

While the process allows source database to be accessed by application during the migration or duplication , you need to shutdown application in case you are going to use this method for an actual migration since you can’t bring any changes done by application while the duplication is in progress.

Leave a Reply

Discover more from Lessons from my journey with databases

Subscribe now to keep reading and get access to the full archive.

Continue reading