Synchronize DMS instances
The DMS instance sync feature allows you to quickly synchronize database instances registered in Data Management Service (DMS) to Agent Data Gateway. After a successful sync, the system creates corresponding data sources in Agent Data Gateway, initializes catalogs, and synchronizes metadata, eliminating the need to manually enter connection information.
Prerequisites
-
Agent Data Gateway is activated and accessible.
-
The target database instance is registered in DMS and is in a normal state.
-
Security management is enabled for the target instance in DMS. Instances without security management enabled appear in the sync list but cannot be selected.
-
You are the owner of the target instance or database, or have query permissions on the target instance or database.
-
Sensitive data protection is not enabled for the target instance. Instances with sensitive data protection enabled do not support synchronization.
-
The database network allows access from Agent Data Gateway. If you use a virtual private cloud (VPC), make sure the database whitelist allows the VPC CIDR block specified in the error message.
Billing
After a DMS instance is synchronized, a data source is created in Agent Data Gateway and consumes a data source quota. The system prioritizes subscription quotas. When the quota is exhausted or expires, pay-as-you-go pricing applies as displayed in the console.
Before you start synchronization, check your subscription quota and pay-as-you-go pricing on the Connection Management page. Billing rules and prices are subject to the latest console display.
Supported database types
The sync page supports filtering DMS instances by the following database types:
MySQL
PostgreSQL
AnalyticDB for PostgreSQL
SQL Server
PolarDB for MySQL
AnalyticDB for MySQL 3.0
PolarDB for PostgreSQL
PolarDB for Oracle
OceanBase MySQL
PolarDB-X
The supported range may vary by product version and region. Refer to the sync page for the actual list. For unsupported database types, the instance details in historical tasks display "Not supported".
Procedure
-
Log on to the AI Native Database Service console and go to Agent Data Gateway.
-
In the upper-left corner of the page, select the region where the target DMS instance is located.
The sync page only loads DMS instances in the current region. If the target instance is not found, verify that the selected region is correct.
-
In the left-side navigation pane, choose Data Sources > Connection Management.
-
On the Connection Management page, click DMS Instance Sync.
-
On the Synchronize DMS Instances page, find the target instance. You can narrow down the results by using the following methods:
-
Enter a connection address or instance name in the search box.
-
Click Filter and filter by database type.
The sync list displays the following information:
Column Description Instance Address The database connection address and port registered in DMS. Instance Name The instance name in DMS. Security Management Whether security management is enabled for the instance. Only instances displayed as "Yes" that meet other sync conditions can be selected. Status The current status of the DMS instance. Environment The environment to which the instance belongs, such as development, testing, staging, or production. -
-
Select one or more instances to synchronize.
-
(Optional) Select Sync knowledge that has been inventoried and adopted for this instance.
The system first synchronizes data sources and then starts knowledge synchronization. Only instances with successful data source synchronization trigger knowledge synchronization. Instances that fail or are skipped do not trigger knowledge synchronization. Successfully synchronized knowledge is stored in DataWiki.
-
Click Start Sync.
The system creates an asynchronous synchronization task. You can continue to monitor the task progress without staying on the current page.
View sync results
-
On the Synchronize DMS Instances page, click Historical Sync Tasks.
-
On the Data Sync Information tab, view the task ID, task status, and creation time.
The task may display the following statuses:
Status Description Completed All instances in the task have been synchronized or skipped based on idempotency rules. Partially Failed The task contains mixed results such as completed, failed, not supported, or skipped. Failed The task failed to complete synchronization. -
Expand the task to view the instance address, instance name, status, execution phase, and error summary for each instance.
-
If you selected knowledge synchronization when starting the task, switch to the Knowledge Sync Information tab to view the knowledge sync results.
Sync rules
-
After a successful sync, the DMS instance appears as a data source in the Connection Management list.
-
The system initializes a catalog for the data source and triggers metadata synchronization. Metadata synchronization takes some time. Refresh the Connection Management page later to view the results.
-
For instances that have been successfully synchronized and whose corresponding data sources are still valid, the system performs an idempotency check and marks the instance as Skipped during subsequent sync attempts. Data sources are not created again.
-
During batch synchronization, each instance is processed independently. A failure of one instance does not affect the execution results of other instances. Expand the task to view the results for each instance.
-
The current page does not provide a direct retry entry for failed tasks. After resolving the issues, select the instances again and start a new sync task.
FAQ
Why can I see an instance but cannot select it?
Check the Security Management column for the instance. Instances without security management enabled cannot be synchronized. Go to the DMS console, edit the instance, and enable security management. Then return to the sync page and refresh the list.
Why does the task report that the database type is not supported?
The database type of the target DMS instance is not in the currently supported range. Refer to the database type filter on the sync page for the supported types.
Why does the task report that sensitive data protection is enabled?
DMS instance synchronization does not support instances with sensitive data protection enabled. Evaluate whether this feature can be disabled based on your business security requirements. If it cannot be disabled, use the Add Data Source feature on the Connection Management page. The supported range for that method applies.
Why is an instance displayed as "Skipped"?
The instance has already been synchronized and the corresponding data source in Agent Data Gateway is still valid. The system skips the instance based on idempotency rules to avoid creating duplicate data sources.
Why does the connection test fail?
Check the network connectivity and database access whitelist based on the error summary. If the error message asks you to allow a specific VPC CIDR block, add the CIDR block to the database instance whitelist and start the synchronization again.
Why is no knowledge displayed after a successful data source sync?
Knowledge synchronization starts only after the data source synchronization succeeds, and only synchronizes knowledge that has been inventoried and adopted in DMS. Make sure you selected the knowledge sync option when starting the task. View the results in Historical Sync Tasks > Knowledge Sync Information.