When your DB infrastructure move to ExaCC, it’s a good option to appropriate the tools offer by it to facilitate your life. And for ExaCC, this tool is dbaascli. It manages many aspects of the ExaCC layers. And in this blog, we focus on the clone remote PDB with dbaascli!

The environment used for this blog is :

Server NameCDB NamePDB NameScan name
SourceExaCC-1CDBORA1PDBORA1ExaCC-1-scan.mydomain.ch
TargetExaCC-2CDBORA2PDBORA2ExaCC-2-scan.mydomain.ch

The target PDB (PDBORA2) must not exist on the target CDB (CDBORA2). Unless it, an error will be raised.

And in addition, the SYS password will be asked for the remote CDB.

You must connect on the target server with the root or oracle OS account. In my case, I will use the oracle account.

The dbaascli syntax is simple and friendly :

dbaascli pdb remoteClone --pdbName <value> --dbName <value> --sourceDBConnectionString <value> [--targetPDBName <value>] [--powerLimit <value>] [--maxCPU <value>] [--maxSize <value>] [--resume [--sessionID <value>]] [--executePrereqs] [--waitForCompletion <value>] [--sourcePDBExportedTDEKeyFile <value>]
        {
            [--blobLocation <value>]
            | [--standbyBlobFromPrimary <value>]
        }
[--excludeUserTablespaces <value>] 
[--excludePDBData <value>] 
[--pdbAdminUserName <value>] 
[--lockPDBAdminAccount <value>] 
[--sourcePDBServiceConvertList <value>] 
[--refreshablePDB --refreshMode <value> [--refreshIntervalInMinutes <value>] --dblinkUsername <value> 
[--honorCaseSensitiveUserName]] 
[--updateDBBlockCacheSize]

Where mandatory parameters are :

--pdbName specifies the name of the source PDB that you want to clone

--dbname specifies the name (DB_NAME) of the CDB that hosts the newly cloned PDB

--sourceDBConnectionString specifies the source database connection string in the format scan_name:scan_port/database_service_name

--targetPDBName specifies the name for the target PDB (new cloned PDB)

For this blog, we must use this command :

oracle@ExaCC-2:~/ [CDBORA2] dbaascli pdb remoteclone --pdbname PDBORA1 --dbname CDBORA2 --targetPDBName PDBORA2 --sourceDBConnectionString ExaCC-1-scan.mydomain.ch:1521/CDBORA1.mydomain.ch
DBAAS CLI version 24.3.2.0.0
Executing command pdb remoteclone --pdbname PDBORA1 --dbname CDBORA2 --targetPDBName PDBORA2 --sourceDBConnectionString ExaCC-1-scan.mydomain.ch:1521/CDBORA1.mydomain.ch
Job id: 688a8b27-40b1-4115-9fbb-deabc741a235
Session log: /var/opt/oracle/log/CDBORA2/pdb/remoteClone/dbaastools_2025-01-28_11-27-30-AM_153668.log
Enter REMOTE_DB_SYS_PASSWORD:

Enter REMOTE_DB_SYS_PASSWORD (reconfirmation):

Loading PILOT...
Session ID of the current execution is: 689
Log file location: /var/opt/oracle/log/CDBORA2/pdb/remoteClone/pilot_2025-01-28_11-33-38-AM_178552
-----------------
Running Plugin_initialization job
Enter TDE_PASSWORD:
****************
Enter REMOTE_DB_SYS_PASSWORD
****************
Completed Plugin_initialization job
-----------------
Running Validate_input_params job
Completed Validate_input_params job
-----------------
Running Validate_target_pdb_service_name job
Completed Validate_target_pdb_service_name job
-----------------
Running Perform_dbca_prechecks job
Completed Perform_dbca_prechecks job
-----------------
Running Perform_pdb_cross_release_prechecks job
Completed Perform_pdb_cross_release_prechecks job
Acquiring read lock: _u02_app_oracle_product_19.0.0.0_dbhome_1
Acquiring read lock: CDBORA2
Acquiring write lock: PDBORA2
-----------------
Running PDB_creation job
Completed PDB_creation job
-----------------
Running Load_pdb_details job
Completed Load_pdb_details job
-----------------
Running Configure_pdb_service job
Completed Configure_pdb_service job
-----------------
Running Configure_tnsnames_ora job
Completed Configure_tnsnames_ora job
-----------------
Running Set_pdb_admin_user_profile job
Completed Set_pdb_admin_user_profile job
-----------------
Running Lock_pdb_admin_user job
Completed Lock_pdb_admin_user job
-----------------
Running Register_ocids job
Skipping. Job is detected as not applicable.
-----------------
Running Prepare_blob_for_standby_in_primary job
Skipping. Job is detected as not applicable.
Releasing lock: PDBORA2
Releasing lock: CDBORA2
Releasing lock: _u02_app_oracle_product_19.0.0.0_dbhome_1
-----------------
Running Generate_dbsystem_details job
Acquiring native write lock: global_dbsystem_details_generation
Releasing native lock: global_dbsystem_details_generation
Completed Generate_dbsystem_details job

dbaascli execution completed

And from now a new PDB has been created on the target CDB :

oracle@ExaCC-2:~/ [] CDBORA2
*******************************************************
 INSTANCE_NAME   : CDBORA21
 DB_NAME         : CDBORA2
 DB_UNIQUE_NAME  : CDBORA2
 STATUS          : OPEN READ WRITE 
 LOG_MODE        : ARCHIVELOG
 USERS/SESSIONS  : Normal: 0/0, Oracle-maintained: 2/16
 DATABASE_ROLE   : PRIMARY
 FLASHBACK_ON    : YES
 FORCE_LOGGING   : YES
 VERSION         : 19.25.0.0.0
 NLS_LANG        : AMERICAN_AMERICA.WE8ISO8859P15
 CDB_ENABLED     : YES
 PDBs            : PDBORA2  PDB$SEED  
 *******************************************************