tencent cloud

Data Transfer Service

Release Notes and Announcements
Release Notes
Announcements
Product Introduction
Overview
Data Migration
Data Sync
Data Subscription (Kafka Edition)
Strengths
Supported Regions
Specification Description
Purchase Guide
Billing Overview
Configuration Change Description
Payment Overdue
Refund
Getting Started
Data Migration Guide
Data Sync Guide
Data Subscription Guide (Kafka Edition)
Preparations
Business Evaluation
Network Preparation
Adding DTS IP Addresses to the Allowlist of the Corresponding Databases
DTS Service Permission Preparation
Database and Permission Preparation
Configuring Binlog in Self-Built MySQL
Data Migration
Databases Supported by Data Migration
Cross-Account TencentDB Instance Migration
Migration to MySQL Series
Migrating to PostgreSQL
Migrating to MongoDB
Migrating to SQL Server
Migrating to Tencent Cloud Distributed Cache
Task Management
Data Sync
Databases Supported by Data Sync
Cross-Account TencentDB Instance Sync
Sync to MySQL series
Synchronize to PostgreSQL
Synchronization to MongoDB
Synchronize to Kafka
Task Management
Data Subscription (Kafka Edition)
Databases Supported by Data Subscription
MySQL series Data Subscription
Data Subscription for TDSQL PostgreSQL
MongoDB Data Subscription
Task Management
Consumption Management
Fix for Verification Failure
Check Item Overview
Cutover Description
Monitoring and Alarms
Supported Monitoring Indicators
Supported Events
Configuring Metric Alarms and Event Alarms via the Console
Configuring Indicator Monitoring and Event Alarm by APIs
Ops Management
Configuring Maintenance Time
Task Status Change Description
Practical Tutorial
Synchronizing Local Database to the Cloud
Creating Two-Way Sync Data Structure
Creating Many-to-One Sync Data Structure
Creating Multi-Site Active-Active IDC Architecture
Selecting Data Sync Conflict Resolution Policy
Using CLB as Proxy for Cross-Account Database Migration
Migrating Self-Built Databases to Tencent Cloud Databases via CCN
Best Practices for DTS Performance Tuning
FAQs
Data Migration
Data Sync
FAQs for Data Subscription Kafka Edition
Regular Expressions for Subscription
Error Handling
Common Errors
Failed Connectivity Test
Failed or Alarmed Check Item
Inability to Select Subnet During CCN Access
Slow or Stuck Migration
Data Sync Delay
High Data Subscription Delay
Data Consumption Exception
API Documentation
History
Introduction
API Category
Making API Requests
(NewDTS) Data Migration APIs
Data Sync APIs
Data Consistency Check APIs
(NewDTS) Data Subscription APIs
Data Types
Error Codes
DTS API 2018-03-30
Service Agreement
Service Level Agreements
ドキュメントData Transfer ServicePractical TutorialMigrating Self-Built Databases to Tencent Cloud Databases via CCN

Migrating Self-Built Databases to Tencent Cloud Databases via CCN

PDF
フォーカスモード
フォントサイズ
最終更新日: 2026-03-13 18:03:23

Overview

This document describes how to use the data migration feature of DTS to migrate data from a self-built database to a TencentDB database through CCN.
CCN can interconnect a VPC with another VPC or a local IDC. To use CCN access, you must establish cross-VPC and VPC-IDC interconnections through CCN in advance.
In this scenario, you have used CCN to interconnect the three networks of VPC-Guangzhou, VPC-Chengdu, and VPC-Shanghai, have a self-built database in Guangzhou, and plan to migrate the data in the source database in Guangzhou to the target database in Nanjing. VPC-Chengdu is selected as the Accessed VPC.

Prerequisites

1. Prepare the target database.
2. Prepare and authorize the account that will execute the DTS task.
2.1 The source database must have the following permissions:
Migration of the entire instance:
CREATE USER 'migration account'@'%' IDENTIFIED BY 'migration password';
GRANT RELOAD,LOCK TABLES,REPLICATION CLIENT,REPLICATION SLAVE,SHOW DATABASES,SHOW VIEW,PROCESS ON *.* TO 'migration account'@'%';
GRANT ALL PRIVILEGES ON `__tencentdb__`.* TO 'migration account'@'%';
GRANT SELECT ON *.* TO 'migration account';
Migration of specified objects:
CREATE USER 'migration account'@'%' IDENTIFIED BY 'migration password';
GRANT RELOAD,LOCK TABLES,REPLICATION CLIENT,REPLICATION SLAVE,SHOW DATABASES,SHOW VIEW,PROCESS ON *.* TO 'migration account'@'%';
GRANT ALL PRIVILEGES ON `__tencentdb__`.* TO 'migration account'@'%';
GRANT SELECT ON `mysql`.* TO 'migration account'@'%';
GRANT SELECT ON database to be migrated.* TO 'migration account';
2.2 Permissions required of the target database: ALTER, ALTER ROUTINE, CREATE, CREATE ROUTINE, CREATE TEMPORARY TABLES, CREATE USER, CREATE VIEW, DELETE, DROP, EVENT, EXECUTE, INDEX, INSERT, LOCK TABLES, PROCESS, REFERENCES, RELOAD, SELECT, SHOW DATABASES, SHOW VIEW, TRIGGER, and UPDATE.

Migration Using the Same-Account CCN

Network Connectivity

Same-Account CCN: This refers to using the CCN under the primary account of the target database to connect with the source database.

1. Use CCN to establish network connectivity.
1.1 Connect the user's source database to VPC1. For detailed instructions, see Establishing a Connection from VPC to IDC.
1.2 Establish connectivity between VPC1 and VPC2. For detailed instructions, see Establishing interconnectivity between different networks under the same account through CCN.
Note:
CCN only provides bandwidth below 10 Kbps between all regions free of charge. However, DTS requires a higher bandwidth. Therefore, bandwidth configuration in the link is required.

Purchasing the DTS Task

1. Log in to the DTS console, select Data Migration on the left sidebar, and click Create Migration Task to enter the Create Migration Task page.
2. On the Create Migration Task page, select the types, regions, and specifications of the source and target instances and click Buy Now.
For Source Instance Region , select the region where the source database's connected VPC (VPC2) is located, which is Chengdu. For Target Instance Region , select the region where the target database is located, which is Beijing.

Configuring the DTS Task

1. On the Set source and target databases page, configure the task, source database, and target database settings. After the source and target databases pass the connectivity test, click Save.
In Source Database Settings, Access Type select "CCN",CCN Instance Account select "My Account",CCN Association VPC select "VPC2" and choose a subnet "subnet2"; In Target Database Settings, Access Type select "Database".
CCN Association VPC refers to the VPC within the CCN that is connected to the DTS linkage. You need to select a VPC from all the VPCs connected through the CCN, excluding the VPC that the source database is connected to.
When you select a subnet, if it cannot be pulled, it might be an account issue. The CCN Association VPC account and the DTS task account need to be the same. For example, if you want to migrate a database instance from Account A to Account B, the task should be created using Account B. Therefore, the CCN Association VPC should be under Account B.
VPC Region: No configuration is required, but the region needs to match the region of the CCN associated VPC . If the user did not select the correct region when purchasing the DTS task, DTS will automatically adjust it to ensure the consistency.
2. On the Set migration options and select migration objects page, configure the migration type and objects and click Save.
3. On the task verification page, verify the task. After the verification is passed, click Start Task. If the verification failed, fix the problem as instructed in Database Connection Check and initiate the verification task again.
Failed: It indicates that a check item fails and the task is blocked. You need to fix the problem and run the verification task again.
Alarm: It indicates that a check item doesn't completely meet the requirements, and the task can be continued, but the business will be affected. You need to assess whether to ignore the alarm or fix the problem and continue the task based on the alarm message.
4. Return to the data migration task list, and you can see that the task has entered the Creating status. After 1–2 minutes, the data migration task will be started.

Cross-Account CCN Migration Operation

Network Connectivity

Cross-Account CCN: This involves connecting the source database using a CCN under a different Tencent Cloud account.

1. Establish CCN network connectivity.
1.1 Connect the user's source database to VPC1. For detailed instructions, see Establishing a Connection from VPC to IDC.
1.2 Establish connectivity between VPC1 and VPC2. For detailed instructions, see Establishing interconnectivity between different networks under different accounts through CCN.
Note:
CCN only provides bandwidth below 10 Kbps between all regions free of charge. However, DTS requires a higher bandwidth. Therefore, bandwidth configuration in the link is required.

Authorizing Cross-Account CCN (Optional)

This step is required when using a CCN under a different account. It is not needed for the same-account CCN.
1. Create a DTS role carrier, and select DTS_QCSRole as the role name. For detailed instructions, see Authorize DTS to access resources of other cloud services.

Purchasing the DTS Task

1. Log in to the DTS console, select Data Migration on the left sidebar, and click Create Migration Task to enter the Create Migration Task page.
2. On the Create Migration Task page, select the types, regions, and specifications of the source and target instances and click Buy Now.
For Source Instance Region , select the region where the source database's connected VPC (VPC2) is located, which is Chengdu. For Target Instance Region , select the region where the target database is located, which is Beijing.

Configuring the DTS Task

1. After the purchase is completed, the page will automatically redirect to the data migration task list. Select the task you just purchased to start configuration.
2. On the set source and target database page, complete task settings, source database settings, and target database settings. Once the connectivity test between the source and target databases passes, click Save.
In the source library settings, select CCN for Access Type, select Other Account for CCN Instance Account Type , and select VPC2 and a subnet, subnet2 for CCN Instance Association VPC. In the target library settings, select Database for Access Type.
3. On the Set migration options and select migration objects page, configure the migration type and objects and click Save.
4. On the task verification page, verify the task. After the verification is passed, click Start Task. If the verification failed, fix the problem as instructed in Database Connection Check and initiate the verification task again.
Failed: It indicates that a check item fails and the task is blocked. You need to fix the problem and run the verification task again.
Alarm: It indicates that a check item doesn't completely meet the requirements, and the task can be continued, but the business will be affected. You need to assess whether to ignore the alarm or fix the problem and continue the task based on the alarm message.
5. Return to the data migration task list, and you can see that the task has entered the Creating status. After 1–2 minutes, the data migration task will be started.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック