Data Transmission Service (DTS) migrates data from a self-managed Oracle database to a PolarDB-X 2.0 instance using full data migration, incremental data migration, or both. Combining both migration types keeps your source database online throughout the migration.
Prerequisites
Before you begin, make sure that:
-
The Oracle database version is 9i, 10g, 11g, 12c, 18c, or 19c
-
Supplemental logging (SUPPLEMENTAL_LOG_DATA_PK and SUPPLEMENTAL_LOG_DATA_UI) is enabled on the Oracle database. For more information, see Supplemental Logging
-
The Oracle database runs in ARCHIVELOG mode, archived log files are accessible, and a suitable retention period is set. For more information, see Managing Archived Redo Log Files
-
The service port of the Oracle database is accessible over the Internet
-
The destination PolarDB-X 2.0 instance is created and the database engine is MySQL 5.x. For more information, see Create PolarDB-X instances
-
Databases in the destination PolarDB-X 2.0 instance are created based on ApsaraDB RDS for MySQL instances. DTS does not support PolarDB-X 2.0 databases created based on PolarDB for MySQL clusters
-
The available storage space of the ApsaraDB RDS for MySQL instances is larger than the total data size of the Oracle database
-
Databases and tables are manually created in the destination PolarDB-X 2.0 instance based on the data types of tables to be migrated from the source Oracle database. Schema migration is not supported between Oracle databases and PolarDB-X 2.0 instances. For more information, see Create a database and Basic SQL operations
Oracle and PolarDB-X data types do not have one-to-one correspondence. Define the corresponding data types in the destination PolarDB-X instance before migration. For more information, see Data type mapping between heterogeneous databases.
Limitations
-
Performance impact: DTS consumes read and write resources on both databases during full data migration. Run the migration during off-peak hours when CPU utilization is below 30% on both databases.
-
Primary key or unique constraint required: Tables to be migrated must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Otherwise, the destination database may contain duplicate records.
-
Oracle RAC with VPC: If the Oracle database uses a Real Application Cluster (RAC) architecture and connects to DTS over a virtual private cloud (VPC), connect the Single Client Access Name (SCAN) IP address and the virtual IP address (VIP) of each RAC node to the VPC and configure routes. For more information, see Connect a data center to DTS by using VPN Gateway.
ImportantWhen configuring the source Oracle database in the DTS console, specify the SCAN IP address as the database endpoint or IP address.
-
Auto-resume risk: If a migration task fails and DTS automatically resumes it, stop or release the task before switching workloads to the destination. Otherwise, resumed task activity overwrites destination data with source data.
-
VARCHAR2 empty string: If a VARCHAR2 field in Oracle contains an empty string (evaluated as null in Oracle) and the corresponding field in the destination has a NOT NULL constraint, the migration task fails.
-
Foreign keys: Schema migration migrates foreign keys from the source to the destination. During full and incremental data migration, DTS temporarily disables foreign key constraint checks and cascade operations at the session level. If you run cascade update or delete operations on the source during migration, data inconsistency may occur.
Billing
| Migration type | Task configuration fee | Internet traffic fee |
|---|---|---|
| Schema migration and full data migration | Free | Charged only when migrating from Alibaba Cloud over the Internet. See Billing overview. |
| Incremental data migration | Charged. See Billing overview. | — |
Choose a migration path
Select a migration path based on whether you can tolerate downtime:
| Path | Migration types to select | Use when |
|---|---|---|
| Full migration only | Schema Migration + Full Data Migration | Downtime is acceptable; stop writes to the source before migrating |
| Zero-downtime migration | Schema Migration + Full Data Migration + Incremental Data Migration | The source must stay online throughout the migration |
Incremental data migration supports INSERT, DELETE, and UPDATE operations only. DDL operations cannot be migrated incrementally.
How incremental data migration works
DTS retrieves redo log files from the Oracle database and applies changes to PolarDB-X 2.0 in real time. This keeps the destination in sync while the source continues to serve traffic, enabling a near-zero-downtime cutover.
For full migration without incremental migration, avoid writing to the source Oracle database during migration to keep data consistent between the source and destination.
Required permissions
Oracle database account permissions
| Migration type | Required permission |
|---|---|
| Full data migration | Schema owner permissions |
| Incremental data migration | Database administrator (DBA) permissions |
For instructions on creating an Oracle account and granting permissions, see CREATE USER and GRANT.
PolarDB-X 2.0 account permissions
For both full and incremental data migration, the database account must have write permissions on the destination database. For more information, see Manage accounts.
Create a migration task
-
Go to the Data Migration Tasks page.
-
Log on to the Data Management (DMS) console.
-
In the top navigation bar, move the pointer over DTS.
-
Choose DTS (DTS) > Data Migration.
The navigation options vary based on the DMS console mode and layout. For more information, see Simple mode and Customize the layout and style of the DMS console. You can also go directly to the Data Migration page of the DTS console.
-
-
From the drop-down list on the right side of Data Migration Tasks, select the region where your migration instance resides.
In the new DTS console, select the region in the upper-left corner.
-
Click Create Task and configure the source and destination databases.
Source Database
Parameter Description Task Name A name for the DTS task. DTS generates a name automatically. Use a descriptive name for easy identification. The name does not need to be unique. Database Type Select Oracle. Connection Type Select the access method based on where the source database is deployed. This example uses Self-managed Database on ECS. For deployment network requirements, see Preparation overview. Instance Region The region where the source Oracle database resides. ECS Instance ID The ID of the ECS instance hosting the Oracle database. Port Number The service port of the Oracle database. Default: 1521. Oracle Type The Oracle architecture type. This example uses RAC or PDB Instance. Select Non-RAC Instance to specify a SID, or RAC or PDB Instance to specify a Service Name. Database Account The database account for the source Oracle database. Database Password The password for the database account. Destination Database
Parameter Description Database Type Select PolarDB-X 2.0. Connection Type Select Alibaba Cloud Instance. Instance Region The region where the destination PolarDB-X 2.0 instance resides. Instance ID The ID of the destination PolarDB-X 2.0 instance. Database Account The database account for the destination instance. Database Password The password for the database account. -
Click Test Connectivity and Proceed.
WarningDTS automatically adds its server CIDR blocks to the security settings of Alibaba Cloud database instances and ECS security groups. For self-managed databases in data centers or third-party clouds, manually add DTS server CIDR blocks to the database whitelist. For the CIDR blocks to add, see Add the CIDR blocks of DTS servers. Adding DTS CIDR blocks to whitelists or security groups introduces security exposure. Before proceeding, take preventive measures such as strengthening account credentials, limiting exposed ports, authenticating API calls, and auditing whitelist rules regularly. You can also connect the database to DTS using Express Connect, VPN Gateway, or Smart Access Gateway. After the migration task is complete or released, remove the DTS CIDR blocks from the whitelist or security group rules.
-
Select objects to migrate and configure task settings.
Basic settings
Parameter Description Synchronization Types Select the migration types based on your chosen path: Schema Migration + Full Data Migration for full migration only, or add Incremental Data Migration for zero-downtime migration. Processing Mode of Conflicting Tables Precheck and Report Errors: Checks for tables in the destination with the same names as source tables. The precheck fails if conflicts exist, preventing the task from starting. Use the object name mapping feature to rename conflicting tables. Ignore Errors and Proceed: Skips the name conflict check. During full migration, conflicting records are skipped and existing destination records are retained. During incremental migration, conflicting records overwrite destination records. Use with caution. Source Objects Select objects from the Source Objects section and click the arrow icon to move them to Selected Objects. Selected Objects To rename a single object, right-click it in Selected Objects. To rename multiple objects at once, click Batch Edit. For details, see Map object names. Renaming an object may cause dependent objects to fail migration. Advanced settings
Parameter Description Monitoring and Alerting Select Yes to receive notifications when the task fails or migration latency exceeds the threshold. Configure the alert threshold and notification settings. Select No to skip alerting. For configuration details, see Configure monitoring and alerting. Retry Time for Failed Connections The time range during which DTS retries failed connections. Range: 10–1440 minutes. Default: 120 minutes. We recommend that you set this parameter to a value greater than 30 minutes. If DTS reconnects within the retry window, the task resumes automatically; otherwise, it fails. Different retry settings across tasks that share a source or destination instance use the most recently set value. DTS charges for the instance during retry periods. Configure ETL Select Yes to configure extract, transform, and load (ETL) processing and enter data processing statements. Select No to skip ETL. For more information, see What is ETL? and Configure ETL in a data migration or data synchronization task. -
Click Next: Save Task Settings and Precheck.
DTS runs a precheck before starting the migration. If any item fails, click View Details to identify the cause, fix the issue, and run the precheck again. If an item triggers an alert that can be safely ignored, click Confirm Alert Details, then Ignore in the dialog box, and click Precheck Again. Ignoring alert items may cause data inconsistency.
-
Wait until the Success Rate reaches 100%, then click Next: Purchase Instance.
-
On the Purchase Instance page, configure the instance class.
Parameter Description Resource Group The resource group for the migration instance. Default: default resource group. See What is Resource Management? Instance Class The instance class determines migration speed. Choose based on your data volume and performance requirements. See Instance classes of data migration instances. -
Read and select Data Transmission Service (Pay-as-you-go) Service Terms.
-
Click Buy and Start. In the confirmation dialog box, click OK.
Track task progress on the Data Migration page.
What's next
The database accounts used for migration have read and write permissions. After migration is complete, delete the accounts from both the source Oracle database and the destination PolarDB-X 2.0 instance to reduce security exposure.