Use Data Transmission Service (DTS) to migrate data from an ApsaraDB RDS for PPAS instance to a PolarDB for PostgreSQL (Oracle compatible) cluster. DTS supports schema migration, full data migration, and incremental data migration. You can combine these migration types for seamless migration with minimal downtime.
Prerequisites
We recommend the new console for this operation. Migrate ApsaraDB RDS for PPAS to PolarDB for Oracle.
-
A PolarDB for Oracle cluster is created. Create a PolarDB for Oracle cluster.
-
The PolarDB for Oracle cluster has more available storage than the source RDS PPAS instance uses.
-
If database, table, or column names in the source RDS PPAS instance contain uppercase letters, enclose them in double quotation marks ("") when creating these objects in the target PolarDB for Oracle cluster.
-
For incremental data migration, grant superuser permissions to the migration account on the source RDS PPAS instance.
Precautions
-
A full data migration consumes read and write resources on both the source and destination databases, increasing their server load. This added load can degrade performance or cause service unavailability, especially if your databases have poor performance, low specifications, or are already busy (for example, with many slow SQL queries, tables without primary keys, or deadlocks in the destination database). Before you start the migration, evaluate the performance of both databases and perform the migration during off-peak hours, for example, when CPU utilization is below 30%.
-
If a source table to be migrated lacks a primary key or unique constraint, duplicate data may occur in the destination database.
-
A single data migration task can migrate only one database. To migrate multiple databases, create a separate task for each.
-
If a data migration task fails, DTS automatically retries. Stop or release the task before switching workloads to the destination instance to prevent automatic retries from overwriting destination data.
- Sequences in the destination database do not continue from the source maximum after switchover. Before switching, query each sequence's maximum value in the source and set it as the starting value in the destination. Query sequence values:
do language plpgsql $$ declare nsp name; rel name; val int8; begin for nsp,rel in select nspname,relname from pg_class t2 , pg_namespace t3 where t2.relnamespace=t3.oid and t2.relkind='S' loop execute format($_$select last_value from %I.%I$_$, nsp, rel) into val; raise notice '%', format($_$select setval('%I.%I'::regclass, %s);$_$, nsp, rel, val+1); end loop; end; $$; -
When migrating from RDS PPAS to PolarDB for Oracle, we recommend the following:
-
Ensure the PolarDB for Oracle cluster specifications meet or exceed those of the RDS PPAS instance to avoid slow queries or OOM errors on the PolarDB for Oracle cluster after migration. Recommended PolarDB for Oracle cluster specifications are listed in Mapping between ApsaraDB RDS for PPAS and recommended PolarDB for Oracle cluster specifications.
-
For specific post-migration requirements such as connections or IOPS, compare and Compute node specifications to select a suitable PolarDB for Oracle cluster specification.
-
Use a cluster endpoint for application connections to enable automatic read/write splitting, which distributes read requests to read-only nodes and reduces load on the PolarDB for Oracle cluster. View or apply for an endpoint.
-
Recommended PolarDB for Oracle specifications
Ensure the PolarDB for Oracle cluster specifications are at least equal to those of the RDS PPAS instance to prevent slow SQL queries and OOM errors from insufficient CPU and memory. The following table lists recommended specifications for PolarDB for Oracle clusters.
|
RDS for PPAS specifications |
PolarDB for Oracle specifications |
||
|
Instance type |
CPU and memory |
Instance type |
CPU and memory |
|
rds.ppas.t1.small |
1 core, 1 GB |
polar.o.x4.medium |
2 cores, 8 GB |
|
ppas.x4.small.2 |
1 core, 4 GB |
polar.o.x4.medium |
2 cores, 8 GB |
|
ppas.x4.medium.2 |
2 cores, 8 GB |
polar.o.x4.medium |
2 cores, 8 GB |
|
ppas.x8.medium.2 |
2 cores, 16 GB |
polar.o.x4.large |
4 cores, 16 GB |
|
ppas.x4.large.2 |
4 cores, 16 GB |
polar.o.x4.large |
4 cores, 16 GB |
|
ppas.x8.large.2 |
4 cores, 32 GB |
polar.o.x4.xlarge |
8 cores, 32 GB |
|
ppas.x4.xlarge.2 |
8 cores, 32 GB |
polar.o.x4.xlarge |
8 cores, 32 GB |
|
ppas.x8.xlarge.2 |
8 cores, 64 GB |
polar.o.x8.xlarge |
8 cores, 64 GB |
|
ppas.x4.2xlarge.2 |
16 cores, 64 GB |
polar.o.x8.2xlarge |
16 cores, 128 GB |
|
ppas.x8.2xlarge.2 |
16 cores, 128 GB |
polar.o.x8.2xlarge |
16 cores, 128 GB |
|
ppas.x4.4xlarge.2 |
32 cores, 128 GB |
polar.o.x8.4xlarge |
32 cores, 256 GB |
|
ppas.x8.4xlarge.2 |
32 cores, 256 GB |
polar.o.x8.4xlarge |
32 cores, 256 GB |
|
rds.ppas.st.h43 |
60 cores, 470 GB |
polar.o.x8.8xlarge |
64 cores, 512 GB |
Migration types
|
Migration type |
Description |
|
Schema migration |
DTS migrates object schemas to the destination PolarDB cluster. Supported objects: tables, views, synonyms, triggers (incompatible), stored procedures, stored functions, packages, and user-defined types. Important
Migrating triggers may cause data inconsistency. |
|
Full data migration |
DTS migrates historical data from the source database to the destination PolarDB cluster. Important
Do not perform DDL operations on migrated objects until schema and full data migration completes. Otherwise, the migration may fail. |
|
Incremental data migration |
After full data migration, DTS reads the redo log from the source database to replicate incremental changes to the destination PolarDB cluster in real time. Supported DML operations: INSERT, UPDATE, and DELETE. DDL operations are not synchronized. Incremental data migration enables seamless migration with minimal downtime. |
Billing
|
Migration type |
Task configuration fee |
Internet traffic fee |
|
Schema migration and full data migration |
Free of charge. |
DTS charges an Internet traffic fee when the Access Method of the destination database is set to Public IP Address. For more information, see Billing overview. |
|
Incremental data migration |
Charged. For more information, see Billing overview. |
Database account permissions
Create a migration account on the source database and grant the required permissions.
|
Database |
Schema migration |
Full migration |
Incremental migration |
|
ApsaraDB RDS for PPAS |
read permissions |
read permissions |
superuser permissions |
|
PolarDB for Oracle cluster |
schema owner permissions |
schema owner permissions |
schema owner permissions |
To create a database account and grant permissions:
To create an account and grant permissions for a PolarDB for Oracle cluster: Create database accounts.
Procedure
-
Log on to the DTS console.
NoteIf you are automatically redirected to the Data Management (DMS) console, you can click the
icon in the lower-right corner and then click
to return to the classic DTS console. -
In the left-side navigation pane, click Data Migration.
-
At the top of the Migration Tasks page, select the region of the destination cluster.
-
In the upper-right corner of the page, click Create Data Migration Task.
-
Configure the connection settings for the source and destination databases.
Category
Parameter
Description
N/A
Task Name
DTS auto-generates a task name. Specify a descriptive name for easy identification. Uniqueness is not required.
Source Database
Instance Type
Select Self-managed Database Connected over Express Connect, VPN Gateway, or Smart Access Gateway. DTS does not directly support RDS PPAS instances as a source.
Instance Region
Select the region of the RDS PPAS instance.
VPC Connected to the Source Database
Select the VPC ID of the RDS PPAS instance.
Database Type
Select PPAS.
Version
Select the version of the RDS PPAS instance.
IP Address
Enter the private IP address of the RDS PPAS instance.
Port
Enter the service port of the RDS PPAS instance. Default: 3433.
Database Name
Enter the name of the source database to migrate.
Database Account
Enter the RDS PPAS database account. Permissions required for database accounts.
Database Password
Enter the password for the database account.
NoteAfter you enter the source database information, you can click Test Connectivity next to Database Password to verify that the information is correct. If the information is correct, the message Passed is displayed. If the message Failed is displayed, click Diagnose next to the Failed message and adjust the source database information based on the prompts.
Destination Database
Instance Type
Select PolarDB.
Instance Region
Select the region of the destination PolarDB for PostgreSQL (Oracle Compatible) cluster.
PolarDB Instance ID
Select the destination PolarDB for PostgreSQL (Oracle Compatible) cluster.
Database Name
Enter the name of the destination database.
Database Account
Enter the database account of the destination PolarDB for PostgreSQL (Oracle Compatible) cluster. Permissions required for database accounts.
Database Password
Enter the password for the database account.
NoteAfter you enter the destination database information, you can click Test Connectivity after Database Password to verify that the entered information is correct. If the information is correct, a Passed message is displayed. If a Failed message is displayed, click Diagnose after Failed and adjust the destination database information based on the prompts.
-
Click Set Whitelist and Next in the lower-right corner.
If the source or destination database is an Alibaba Cloud database instance, such as ApsaraDB for RDS or ApsaraDB for MongoDB, DTS automatically adds the CIDR blocks of the DTS server in the corresponding region to the whitelist of the database instance. If the source or destination database is a self-managed database on an ECS instance, DTS automatically adds the CIDR blocks of the DTS server in the corresponding region to the security rules of the ECS instance. You must also make sure that the self-managed database does not restrict access from the ECS instance. If the database is deployed in a cluster on multiple ECS instances, you must manually add the CIDR blocks of the DTS server in the corresponding region to the security rules of each ECS instance. If the source or destination database is a self-managed database in an on-premises data center or a database from another cloud provider, you must manually add the CIDR blocks of DTS servers to allow access. For more information about the CIDR blocks of DTS servers, see IP addresses of DTS servers.
WarningAdding public IP addresses of DTS servers, whether automatically or manually, may introduce security risks. By using this product, you acknowledge and accept these potential risks. You are responsible for implementing basic security measures, such as using strong passwords, restricting open ports, using authentication for internal APIs, regularly reviewing and limiting unnecessary network segments, or connecting by using private connections such as Express Connect, VPN Gateway, or Smart Access Gateway.
-
Select the migration types and objects.

Parameter
Description
Migration Types
-
For a one-time migration, select Schema Migration and Full Data Migration.
-
For a migration with minimal downtime, select Schema Migration, Full Data Migration, and Incremental Data Migration.
Important-
To ensure data consistency, if you do not select Incremental Data Migration, do not write new data to the source database during the schema migration or full data migration.
-
Do not perform DDL operations on the migration objects before the schema and full data migrations are complete. Otherwise, the migration task may fail.
Migration Objects
In the Available box, click the objects that you want to migrate, and then click
to move them to the Selected Objects box.Note-
You can select objects at the database, table, or column level.
-
By default, migrated object names remain the same in the destination database. To rename objects, use Object name mapping.
-
If you use object name mapping, migration of dependent objects may fail.
Map Object Name
To rename objects in the destination instance, use Object name mapping.
Connection Retry Duration
Default: 12 hours. You can specify a custom duration. If DTS reconnects to both databases within this period, the task resumes automatically. Otherwise, the task fails.
NoteYou are charged during retries. Set the retry duration based on your needs, or release the DTS instance after the source and destination instances are released.
-
After you complete the configuration, click Precheck and Start in the lower-right corner of the page.
Note-
Before the migration task starts, DTS runs a precheck. The task can start only after it passes the precheck.
-
If the precheck fails, click the
icon next to the failed item to view details.-
Fix the issues as prompted and run the precheck again.
-
If you do not need to fix the warning items, you can select Ignore and then click Ignore Warnings and Rerun Precheck to run the precheck again.
-
-
-
After the task passes the precheck, click Next.
-
In the Confirm Settings dialog box that appears, select a Instance Class and select the Data Transmission Service (pay-as-you-go) Service Terms checkbox.
-
Click Buy and Start to begin the migration.
-
Schema migration + Full data migration
Allow the task to complete automatically. Stopping it manually may result in incomplete data.
-
Schema migration + Full data migration + Incremental data migration
The migration task does not stop automatically. You must stop it manually.
ImportantChoose an appropriate time to stop the task manually, such as during off-peak hours or when you are ready to switch your business to the destination cluster.
-
Wait until the migration task enters the Incremental Data Migration phase and the status shows Undelayed. Then, stop writing data to the source database for several minutes. During this time, the status of Incremental Data Migration may show a latency.
-
Wait for the Incremental Data Migration status to show Undelayed again. Then, manually stop the migration task.

-
-