Migrate the Data

Run the migrate database command with the -eval flag to validate the migration components and output. When the precheck completes successfully, use the same command without the -eval flag to begin migrating to the cloud.

Perform a Precheck

Run a precheck to validate the migration process components and evaluate the output to determine if adjustments are needed.

It is highly recommended that for each migration you run migrate database in evaluation mode first. The evaluation allows you to correct any potential problems in the setup and configuration before performing the actual migration on a production database. In evaluation mode, the migration process runs without effecting the changes. It is safe to run the command with the -eval option as many times as needed before running the actual migration job.
  1. Log in to the Zero Downtime Migration service host and switch to the zdmuser installed user, then change to the Zero Downtime Migration home /bin directory.
    For example, the Zero Downtime Migration home directory might be /oracle/zdm/grid.
    su - zdmuser
    zdmuser> cd /u01/app/oracle/zdm/grid/bin
  2. Run the zdmcli migrate database command using the -eval flag. Define the source database, source node, target node, target home, the Oracle Cloud Infrastructure Object Storage login user name, the location of the response file, and the target database server login user name.
    When defining the source database, use -sourcedb database_unique_name. If a source single instance database is deployed without a Grid Infrastructure home, then use -sourcesid source_oracle_sid instead of -sourcedb. Use the fully qualified domain name (FQDN) for the source and target database server names.
    If a source database is configured for a PASSWORD based wallet, then add the -tdekeystorepasswd option to the command, and for the prompt, specify the source database TDE keystore password value.
    The backup user is the Oracle Cloud Infrastructure user. To find the backup user name or ID in the Console, go to User, then Profile.
    zdmuser> ./zdmcli migrate database -sourcesid source_oracle_sid \.
    -sourcenode source_FQDN_database_server_name 
    -srcauth zdmauth \
    -srcarg1 user: opc \
    -srcarg2 identity file: /home/zdmuser/.ssh/zdm_service_tool.ppk
    -srcarg3 sudo_location: /usr/bin/sudo \
    -targetnode target_FQDN_database_server_name \
    -targethome target_database_ORACLE_HOME \  
    -backupuser Object_store_login_user_name \  
    -rsp response_file_location
    -tgtauth zdmauth 
    -tgtarg1 user:target_database_server_login_user_name 
    -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_tool.ppk \
    -tgtarg3 sudo_location:/usr/bin/sudo 
    -ignore ALL -eval
  3. When prompted, enter the source database SYS password and the source database server root user password. For the backup destination (bucket), enter the Oracle Cloud Infrastructure user authentication token.
    The DB SYSDBA password to access both source and target databases. The password must be the same for both databases. The user password is the AUTH TOKEN.
    Enter source database zdmsdb SYS password:
    Enter source user "root" password:
    Enter user "backup_user@example.com" password:
    A jobID displays in the command output when you submit a database migration job. Save the jobID to use to query the job status.
  4. (Optional) Use the query job command to check the status of a job.
    ./ zdmcli query job -jobid job-id-number
  5. Review the output status.
    Service logs are available on the source and target databases. The location is listed in the output.

Migrate the Data with the ZDM Service

Run the migration command to begin the data migration. The command and parameters are the same as the precheck, without the -eval flag.

  1. Log in to the Zero Downtime Migration service host and switch to the zdmuser installed user, then change to the Zero Downtime Migration home /bin directory.
    For example, the Zero Downtime Migration home directory might be /oracle/zdm/grid.
    su - zdmuser
    zdmuser> cd /u01/app/oracle/zdm/grid/bin
  2. Run the zdmcli migrate database command. Define the source database, source node, target node, target home, the Oracle Cloud Infrastructure Object Storage login user name, the location of the response file, and the target database server login user name.
    When defining the source database, use -sourcedb database_unique_name. If a source single instance database is deployed without a Grid Infrastructure home, then use -sourcesid source_oracle_sid instead of -sourcedb. Use the fully qualified domain name (FQDN) for the source and target database server names.
    If a source database is configured for a PASSWORD based wallet, then add the -tdekeystorepasswd option to the command, and for the prompt, specify the source database TDE keystore password value.
    The backup user is the Oracle Cloud Infrastructure user. To find the backup user name or ID in the Console, go to User, then Profile.
    zdmuser> ./zdmcli migrate database -sourceid source_db_ID \.
    -sourcenode source_database_server_name 
    -srcauth zdmauth \
    -srcarg1 user: opc \
    -srcarg2 identity file: /home/zdmuser/.ssh/zdm_service_tool.ppk
    -srcarg3 sudo_location: /usr/bin/sudo \
    -targetnode target_database_server_name \
    -targethome target_database_ORACLE_HOME \  
    -backupuser Object_store_login_user_name \  
    -rsp response_file_location
    -tgtauth zdmauth 
    -tgtarg1 user:target_database_server_login_user_name 
    -tgtarg2 identity_file:/home/zdmuser/.ssh/zdm_service_tool.ppk \
    -tgtarg3 sudo_location:/usr/bin/sudo \
    -ignore ALL
  3. When prompted, enter the source database SYS password and the source database server root user password. For the backup destination (bucket), enter the Oracle Cloud Infrastructure user authentication token.
    The DB SYSDBA password to access both source and target databases. The password must be the same for both databases.
    Enter source database zdmsdb SYS password:
    Enter source user "root" password:
    Enter user "backup_user@example.com" password:
    A jobID displays in the command output when you submit a database migration job. Save the jobID to query the job status.
  4. (Optional) Use the query job command to check the status of a job.
    Service logs are available on the source and target databases. The location is listed in the output.
    ./ zdmcli query job -jobid job-id-number

Troubleshoot the Migration

If your migration job encounters an error, refer to the migration job output logs, Zero Downtime Migration service logs, and server-specific operational phase logs present at the respective source or target database servers.

If the migration job encounters an exception, then the logs can provide some indication of the nature of the fault. The logs for the migration procedures executed in the source and target environments are stored on the servers in the respective source and target environments. The log file location is included in the migration output and in the output when you query a job status.

The following table lists the migration phases and the description for each phase name.

Phase Name Description
ZDM_GET_SRC_INFO Discover information about the source database
ZDM_GET_TGT_INFO Discover information about the target database
ZDM_SETUP_SRC Setup ZDM helper modules on the source server
ZDM_SETUP_TGT Setup ZDM helper modules on the target server
ZDM_PREUSERACTIONS Execute migration pre-user actions, if any, at the source
ZDM_PREUSERACTIONS_TGT Execute migration pre-user actions, if any, at the target
ZDM_OBC_INST_SRC Install Oracle Database Cloud Backup Module at the source
ZDM_OBC_INST_TGT Install Oracle Database Cloud Backup Module at the target
ZDM_GEN_RMAN_PASSWD Generate random password for encrypting Oracle Recovery Manager (RMAN) backup
ZDM_BACKUP_FULL_SRC Perform full backup of the source database
ZDM_BACKUP_INCREMENTAL_SRC Perform incremental backup of the source database
ZDM_VALIDATE_SRC Perform validations at the source
ZDM_VALIDATE_TGT Perform validations at the target
ZDM_DISCOVER_SRC Perform database discovery at the source for setting up Oracle Data Guard
ZDM_COPYFILES Copy Oracle password file and Transparent Data Encryption (TDE) wallets from source to target
ZDM_OSS_STANDBY_SETUP_TDE_TGT Copy TDE wallet files from the source to the target keystone location
ZDM_PREPARE_TGT Prepare target for Oracle Data Guard standby creation
ZDM_CLONE_TGT Create Oracle Data Guard standby from the cloud backup
ZDM_FINALIZE_TGT Finalize Oracle Data Guard standby preparation of the target
ZDM_CONFIGURE_DG_SRC Register the cloud standby with the source
ZDM_SWITCHOVER_SRC Initiate switchover actions at the source
ZDM_SWITCHOVER_TGT Complete switchover actions at the target
ZDM_POSTUSERACTIONS Perform any post migration user actions at the source
ZDM_POSTUSERACTIONS_TGT Perform any post migration user actions at the target
ZDM_CLEANUP_SRC Perform cleanup at the source
ZDM_CLEANUP_TGT Perform cleanup at the target
ZDM_POSTUSERACTIONS_TGT Perform any post migration user actions at the target
  1. If the Zero Downtime Migration service does not start, then check the Zero Downtime Migration service logs for process startup errors to determine the cause of the error reported. The Zero Downtime Migration service log are located at $ZDM_BASE/crsdata/zdm_service_node/rhp/rhpserver.log.0.
  2. Use the query job command to check the status of a job.
    Service logs are available on the source and target databases. The location is listed in the output.
    ./ zdmcli query job -jobid job-id-number
  3. Determine which operational phase the migration job was in at time of failure, and whether the phase belongs to the source or target database.
    Check the Zero Downtime Migration service host log at $ZDM_BASE/crsdata/zdm_service_node/rhp/rhpserver.log.0 and access the respective source or target server to check the log associated with the operational phase in the /tmp/zdm-unique id/zdm/log directory.

For more information about troubleshooting Zero Downtime Migration and known issues in the current release, see the Zero Downtime Migration Release Notes.