This topic describes how to migrate data from a self-managed SQL Server database to an Alibaba Cloud ApsaraDB RDS for SQL Server instance by using the physical gateway-based migration feature of Data Transmission Service (DTS). Different migration solutions are provided based on whether the server where the self-managed database resides has Internet access, including direct Internet access and network communication through a bastion host. This feature uses the physical gateway protocol for connection, offering advantages such as high speed, simple operation, and high stability. It can flexibly adapt to various network environments and significantly improve migration efficiency.
Select a migration solution
Select an appropriate migration solution based on your network environment. For more information, see Appendix: Comparison between backup gateway-based migration and logical data migration.
Migration solution | Solution description |
Scenario 1: The server where the self-managed SQL Server database resides has direct Internet access |
|
|
Prerequisites
Different migration solutions have different requirements. Check the corresponding requirements based on your selected migration solution.
Scenario 1: With Internet access
The self-managed SQL Server database runs SQL Server 2019, SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, or SQL Server 2005.
NoteThe self-managed SQL Server database can reside on an Alibaba Cloud ECS instance, in a data center, or on a third-party cloud server. Cloud databases are not supported.
The RDS for SQL Server instance meets the following requirements:
The RDS instance runs SQL Server 2019, SQL Server 2017, SQL Server 2016, SQL Server 2012, or SQL Server 2008 R2.
The RDS instance runs the same or a later engine version than the self-managed SQL Server database.
The following permissions are granted by using your Alibaba Cloud account:
You have created an AccessKey pair and obtained the AccessKey ID and AccessKey Secret for client gateway identification and registration.
If you want to perform operations by using a RAM user, you must grant the AliyunDBSFullAccess permission to the RAM user.
Scenario 2: Without Internet access
The self-managed SQL Server database meets the following requirements:
The self-managed SQL Server database runs SQL Server 2019, SQL Server 2017, SQL Server 2016, SQL Server 2014, SQL Server 2012, SQL Server 2008 R2, or SQL Server 2005.
NoteThe self-managed SQL Server database can reside on an Alibaba Cloud ECS instance, in a data center, or on a third-party cloud server. Cloud databases are not supported.
Do not set the
HTTP_PROXYandHTTPS_PROXYenvironment variables on the server where the self-managed database resides.ImportantIf you configure the preceding environment variables, the system preferentially uses the proxy gateway that is specified by the environment variables. As a result, the proxy gateway that is installed on the bastion host is not used, and network connections fail.
The RDS for SQL Server instance meets the following requirements:
The RDS instance runs SQL Server 2019, SQL Server 2017, SQL Server 2016, SQL Server 2012, or SQL Server 2008 R2.
The RDS instance runs the same or a later engine version than the self-managed SQL Server database.
If the operating system of the bastion host is Linux, you must first install Java Runtime Environment (JRE) 1.8 on the server where the self-managed database resides. You can visit the official website to download and install JRE.
The following permissions are granted by using your Alibaba Cloud account:
You have created an AccessKey pair and obtained the AccessKey ID and AccessKey Secret for client gateway identification and registration.
If you want to perform operations by using a RAM user, you must grant the AliyunDBSFullAccess permission to the RAM user.
Limits
The following limits apply when you migrate data by using DTS. Pay attention to these limits. Otherwise, the migration task may fail or report errors:
Source database limits
Only SQL Server on Windows is supported. The version of the desktop operating system cannot be earlier than Windows XP. The version of the server operating system cannot be earlier than Windows Server 2003.
The size of the source database cannot exceed the remaining storage of the destination RDS instance. Otherwise, the cloud migration fails.
The name of the source database cannot be the same as the name of the destination database on the RDS instance.
The name of the source database cannot be the same as the names of some system databases or other database names that cannot be used. Examples:
reserved_dbname = ["master", "tempdb", "msdb", "model", "distribution","rdscore","sys_info"]The network settings of the source database must meet the following requirements:
If the firewall for the source database is disabled and the source database is a self-managed database on an ECS instance, you can connect the source database and the destination database over a virtual private cloud (VPC) or the Internet.
If the firewall for the source database is disabled and the source database is a self-managed database that does not reside on an ECS instance, you can connect the source database and the destination database over the Internet.
If the firewall for the source database is enabled, you must allow requests from
*.aliyuncs.comto ensure that the source database can communicate with the destination database.
Database version and other limits
The engine version of the destination database must be the same or later than the engine version of the source database:
2019 > 2017 > 2016 > 2012 > 2008 R2 > 2005
Enterprise Edition (Developer) > Standard Edition > Web > Express
Different RDS instance types support different numbers of databases. When migrating multiple databases, make sure to evaluate the number of databases supported by the target RDS instance to ensure that the number of migrated databases does not exceed the limit.
Other limits
During data migration, data can be incrementally written to the self-managed SQL Server database. We recommend that you do not write data to the self-managed SQL Server database during the workload switchover to prevent data inconsistency.
During incremental migration, the RDS instance becomes temporarily unavailable. Wait until the incremental migration task is complete and use the RDS instance after the workloads are switched over to the RDS instance.
When a physical migration task is in progress, you cannot back up databases. If you want to back up databases during physical migration, you must enable COPY_ONLY.
You can migrate a single database, multiple databases, or the entire instance.
Fields of the FileStream and FileTables types cannot be migrated.
Memory tables cannot be migrated.
The in-memory online transaction processing (OLTP) and mirroring features of SQL Server are incompatible with each other. If you enable in-memory databases for the source database, you must make sure that the destination database does not reside on an RDS instance that runs RDS High-availability Edition.
Scenario 1: Self-managed database with Internet access
1. Install the backup gateway (database server)
You need to first install the backup gateway on the server where the source self-managed database resides. This section describes how to install the backup gateway.
Visit the Data Transmission Service (DTS) console.
In the left-side navigation pane, click Data Migration and select a region at the top of the page.
Click Create Task. On the Configure Source And Destination Databases page, select , and then click Create Physical Protocol Gateway.
In the Installation Command dialog box, configure the Region Of Backup Gateway and Network Type Of Backup Gateway parameters. Then, copy the gateway installation command and download the installation package.
NoteSelect Public Network if you want to access the gateway over the Internet. Select ECS Private Network/VPC if you want to access the gateway over an Alibaba Cloud Express Connect circuit.
Install the DBS backup gateway (AliyunDBSAgent) on a local Windows device or server.
Double-click the setup.exe file in the downloaded file.
Select the installation language, click OK, and then click Next.
Read and accept the terms of the agreement, and click Next.
Select DBS Backup Gateway and click Next.
Select an installation directory, click Next, and then click OK.
Select Backup Gateway Region, enter the AccessKey ID and AccessKey Secret, and then click Next.
ImportantMake sure that the region in which the backup gateway is installed is the same as the region of the RDS for SQL Server instance.
The AccessKey pair information is stored in the plaintext format in the
.\config\dbs-agent.conffile of the installation directory.
Confirm the component package that you want to install and click Next.
The backup gateway starts to be installed. The installation takes about 1 to 5 minutes.
Click Done.
You can view the installation status of the gateway in the
C:\Program Files\aliyun\dbs_agent\logs\agent.loginstallation directory. If information similar to the following figure is displayed, the gateway is installed.
After the backup gateway is installed, click Installed in the Installation Command dialog box of the DTS console.
Check whether the backup gateway is started.
In the Run dialog box of Windows, enter
services.mscand click OK.The service manager dialog box of the system appears.
In the service manager dialog box, check whether the service is started. If the service is not started, right-click AliyunDBSAgent and select Start from the shortcut menu.
NoteBy default, the system starts the backup gateway. You can also start and stop the AliyunDBSAgent service in the service manager.
View the new backup gateway.
On the Backup Gateways page of the Data Disaster Recovery console, click Refresh in the upper-right corner to view the new backup gateway.
NoteThe name of the new backup gateway starts with
DTS_.
2. Create a DTS migration task
Visit the Data Transmission Service (DTS) console.
In the left-side navigation pane, click Data Migration and select a region at the top of the page.
Click Create Task and configure the source and destination databases.
Category
Parameter
Description
N/A
Task Name
Configure a task name that has business significance (no uniqueness requirement) for easy identification. You can also use the task name that is automatically generated by the system.
Source Database
Select Existing Connection
If you have added the source database information to the Database Connection Management page of DTS, you can select the database from the drop-down list. This way, you do not need to enter the source database information again.
Database Type
Select SQL Server.
Access Method
Select Physical Protocol.
Instance Region
The region in which the self-managed SQL Server database resides.
Physical Protocol Gateway (DBS Backup Gateway)
Select the backup gateway that you installed in 1. Install the backup gateway (database server).
Domain Name Or IP
Default value: localhost.
Port
Enter the service port of the self-managed SQL Server database. Default value: 1433.
Destination Database
Select Existing Connection
If you have added the destination database information to the Database Connection Management page of DTS, you can select the database from the drop-down list. This way, you do not need to enter the destination database information again.
Database Type
Default value: SQL Server.
Access Method
Default value: Alibaba Cloud Instance.
Instance Region
The region in which the RDS for SQL Server instance resides.
Instance ID
The ID of the RDS for SQL Server instance.
Database Account
Enter the account of the RDS for SQL Server instance. The account must have read and write permissions.
NoteYou can create a standard account or a privileged account in the RDS console and modify the permissions of the account as needed.
Database Password
Enter the password of the account that is used to connect to the database of the destination RDS instance.
Connection Method
If Secure Sockets Layer (SSL) encryption is disabled for the destination database, select Non-encrypted.
If SSL encryption is enabled for the destination database, select SSL-encrypted. DTS automatically trusts the server certificate.
After you complete the configuration, click Test Connectivity and Proceed at the bottom of the page.
ImportantMake sure that you have added the CIDR blocks of DTS servers to the whitelist of the self-managed SQL Server database. Adding the CIDR blocks of DTS servers may pose security risks. Make sure that you have implemented security measures such as enhancing password strength and limiting ports.
Configure the objects for the task.
Parameter
Description
Task Stages
If you want to perform only full data migration, select Full Data Migration. Full Data Migration is selected by default.
To ensure business continuity during data migration, select Full Data Migration and Incremental Data Migration.
NoteIf you do not select Incremental Data Migration, we recommend that you do not write data to the source instance during data migration to ensure data consistency.
Source Objects
Select one or more objects from the Source Objects section. Click the
icon to add the objects to the Selected Objects section.NoteYou can migrate a single database, multiple databases, or the entire instance.
Selected Objects
The objects that you want to migrate.
Click Next: Advanced Settings to configure advanced settings.
Parameter
Description
Monitoring and Alerting
Specifies whether to configure alerting for the data migration task. If the task fails or the migration latency exceeds the specified threshold, the alert contacts receive notifications. Valid values:
No: does not configure alerting.
Yes: configures alerting. In this case, you must also configure the alert threshold and alert notification settings. For more information, see the Configure monitoring and alerting when you create a DTS task section of the Configure monitoring and alerting topic.
Retry Time For Failed Connections
The retry time range for failed connections. If the source or destination database fails to be connected after the data migration task is started, DTS immediately retries a connection within the retry time range. Valid values: 10 to 1,440. Unit: minutes. Default value: 720. We recommend that you set the parameter to a value greater than 30. If DTS is reconnected to the source and destination databases within the specified retry time range, DTS resumes the data migration task. Otherwise, the data migration task fails.
NoteIf you specify different retry time ranges for multiple data migration tasks that share the same source or destination database, the value that is specified later takes precedence.
When DTS retries a connection, you are charged for the DTS instance. We recommend that you specify the retry time range based on your business requirements. You can also release the DTS instance at the earliest opportunity after the source database and destination instance are released.
In the lower-right corner of the page, click Next: Save Task Settings and Precheck.
NoteDTS performs a precheck before a data migration task starts. You can start a data migration task only after the task passes the precheck.
If the precheck fails, click View Details next to the failed item, fix the issue based on the instructions, and then run the precheck again.
If an alert is generated during the precheck:
For items that cannot be ignored, click View Details next to the failed item, fix the issue based on the instructions, and then run the precheck again.
For items that can be ignored without fixing, click View Alert Details, Confirm And Ignore, OK, and Run Precheck Again in sequence to skip the alert item and run the precheck again. If you ignore the alert item, data inconsistency may occur and your business may be exposed to potential risks.
Success Rate 100% Next: Purchase InstanceYou can migrate your workloads to the RDS for SQL Server instance.
On the Purchase page, read and select Data Transmission Service (Pay-as-you-go) Terms Of Service.
Click Buy And Start, and in the OK dialog box that appears, click OK.
You can click the target migration instance on the Data Migration page, and on the Task Management page, view the migration progress.
NoteYou can also view the progress of full or incremental migration on the page of the destination instance in the RDS console.
When the full migration task progress reaches 100% and the incremental migration task is in progress, go to the page of the target migration task, and click the Migrate To Cloud button.
In the Are You Sure You Want To Migrate To The Cloud dialog box, click Switch Now and wait until the migration task is complete.
ImportantTo ensure data consistency, stop writing data to the source instance before you trigger the workload switchover. Wait for the migration task to complete and then switch over your business connections. The entire process requires several minutes.
Scenario 2: Self-managed database without public network access but with a bastion host
1. Install a proxy gateway (bastion host)
The following sections describe how to install a proxy gateway on a bastion host that runs Windows or Linux.
Windows operating system
Visit the Data Transmission Service (DTS) console.
In the left-side navigation pane, click Data Migration and select a region in the top navigation bar.
Click Create Task. On the Configure Source And Destination Databases page, select , and then click Create Physical Protocol Gateway.
In the Installation Command dialog box, configure the Region Of Backup Gateway and Network Type Of Backup Gateway parameters. Then, copy the gateway installation link and download the installation package.
ImportantMake sure to save this link separately for later use in Step 2: Install a backup gateway (database host).
If you want to access the gateway over the Internet, select Public Network. If you want to access the gateway over an Alibaba Cloud Express Connect circuit, select ECS Private Network/VPC.
Install a proxy gateway on the Windows bastion host.
Double-click the setup.exe file in the downloaded file.
Select an installation language and click OK.
Click Next.
Read and accept the terms of the agreement and click Next.
Select Proxy Gateway and click Next.
Select an installation path for the proxy gateway, click Next, and then click Yes.
NoteBy default, the proxy gateway is installed in
C:\Program Files (x86)\aliyun\dbs_agent.Click Next to prepare for the installation of the proxy gateway base file.
After the base file is installed, click .
Open the Task Manager in Windows to check whether the proxy gateway is installed.
After the proxy gateway is installed on the bastion host, you need to install a backup gateway on the database host.
Linux operating system
You need to go to the Data Disaster Recovery console to obtain the download link for the proxy gateway and install the proxy gateway on the Linux bastion host.
Log on to Data Management (DMS) 5.0.
Move the pointer over the
icon in the upper-left corner and choose . NoteIf you use the DMS console in normal mode, choose in the top navigation bar.
Click Install Backup Gateway in the upper-right corner of the page.
Select Network Type Of Backup Gateway, copy the backup gateway installation command, and then run the installation command on the database server.
ImportantMake sure to save this link separately for later use in Step 2: Install a backup gateway (database host).
If you want to access the gateway over the Internet, select Public Network. If you want to access the gateway over an Alibaba Cloud Express Connect circuit, select ECS Private Network/VPC.
Run the installation command in the Linux CLI. The system downloads and runs the installation package. The following sample code provides an example:
[root@iZbp****** ~]# wget -O aliyunDBSAgentInstaller.jar https://aliyun-dbs.oss-cn-hangzhou-internal.aliyuncs.com/installer/0.0.141/aliyunDBSAgentInstaller-0.0.141.jar && sudo java -Dregion=cn-hangzhou -jar aliyunDBSAgentInstaller.jar --2023-08-25 16:04:52-- https://aliyun-dbs.oss-cn-hangzhou-internal.aliyuncs.com/installer/0.0.141/aliyunDBSAgentInstaller-0.0.141.jar Resolving aliyun-dbs.oss-cn-hangzhou-internal.aliyuncs.com (aliyun-dbs.oss-cn-hangzhou-internal.aliyuncs.com)... 100.XXX.XX.XX, 100.XXX.XX.XX, 100.XXX.XX.XX, ... Connecting to aliyun-dbs.oss-cn-hangzhou-internal.aliyuncs.com (aliyun-dbs.oss-cn-hangzhou-internal.aliyuncs.com)|100.XXX.XX.XX|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 247955671 (236M) [application/x-java-archive] Saving to: 'aliyunDBSAgentInstaller.jar' 100%[=======================================================================================================>] 247,955,671 19.9MB/s in 11s 2023-08-25 16:05:03 (21.4 MB/s) - 'aliyunDBSAgentInstaller.jar' saved [247955671/247955671]Select an installation language. Enter 0 to select Chinese. Enter 1 to select English.
Select your language 0 [x] chn 1 [ ] eng Input selection: 0Enter 1 and read the gateway protocol.
Press 1 to continue, 2 to quit, 3 to redisplay 1Enter 1 to agree to the gateway protocol.
Press 1 to accept, 2 to reject, 3 to redisplay 1Select the component that you want to install. If you enter Y, the component is a backup gateway (Agent). If you enter N, the component is a proxy gateway (database gateway DG). In this example, a proxy gateway is installed. Enter N and then enter Y to confirm the component information.
Enter Y for Yes, N for No: N -- DG -- Enter Y for Yes, N for No: Y Done!Enter 1 to continue the installation.
Press 1 to continue, 2 to quit, 3 to redisplay 1Select an installation path. Press Enter to install the proxy gateway in the default path
/usr/local/aliyun/dbs_agent.If you want to use a custom path, enter the custom path and enter 1 to confirm it. In this example, the proxy gateway is installed in the
/usr/local/aliyun/daili_dbs_agentdirectory.Select installation path: [/usr/local/aliyun/dbs_agent] /usr/local/aliyun/daili_dbs_agent Press 1 to continue, 2 to quit, 3 to redisplay 1Confirm the component that you want to install, and then enter 1 to start the installation.
The installation takes about one to five minutes to complete.
Select the package you want to install: [x] Pack 'Proxy gateway base file' required Done! Press 1 to continue, 2 to quit, 3 to redisplay 1 ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Installing ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── ==================== Installation started Platform: linux,version=3.10.0-1XXX.XX.X.el7.x86_64,arch=x64,symbolicName=null,javaVersion=1.8.0_372 [ Starting to unpack ] [ Processing package: Proxy gateway base file (1/1) ] Cleaning up the target folder ... [ Unpacking finished ] Installation finished ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Installed ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Installation was successful Application installed on /usr/local/aliyun/daili_dbs_agent [ Writing the uninstaller data ... ] [ Console installation done ]
Run the following command to check whether the proxy gateway is installed:
ps aux | grep app_aliyun_proxyThe following command output indicates that the proxy gateway is installed. If an error occurs and you cannot resolve the error, join the Data Disaster Recovery DingTalk group (group ID: 35585947) for assistance.
[root@iZbp****** ~]# ps aux | grep app_aliyun_proxy root 1**** 0.0 0.5 7***** 9*** ? Ssl 16:06 0:00 /usr/local/aliyun/daili_dbs_agent/dist/app_aliyun_proxy/app_aliyun_proxy -addr :9797 -logdir /usr/local/aliyun/daili_dbs_agent/logs root 2**** 0.0 0.0 1***** 9** pts/1 S+ 16:08 0:00 grep --color=auto app_aliyun_proxyAfter the proxy gateway is installed on the bastion host, you need to install a backup gateway on the database host.
2. Install a backup gateway (database host)
Install a DBS backup gateway on the server where the self-managed database is deployed and specify the IP address of the proxy gateway (the internal IP address of the bastion host) during the installation.
Copy the gateway download link from Step 4 in 1. Install a proxy gateway (bastion host) and download the gateway on the server where the self-managed database is deployed.
ImportantThe backup gateway download link must be the same as the link in Step 4 of Install a proxy gateway. Otherwise, the database host cannot connect to the external network.
Install the DBS backup gateway (AliyunDBSAgent) on a local Windows device or server.
Double-click the setup.exe file in the downloaded file.
Select the installation language, click OK, and then click Next.
Read and accept the terms of the agreement, and click Next.
Select DBS Backup Gateway and click Next.
Select an installation directory, click Next, and then click OK.
Select Agent Region and specify AccessKey ID, AccessKey Secret, Proxy Gateway Address, and Proxy Gateway Port. Then, click Next.
ImportantMake sure that the region in which the DBS backup gateway is installed is the same as the region of the destination RDS instance.
The AccessKey pair information is stored in the plaintext format in the
.\config\dbs-agent.conffile of the installation directory.For Proxy Gateway Address, enter the IP address of the proxy gateway (the internal IP address of the bastion host). For Proxy Gateway Port, the default value is 9797.
After the configuration is complete, the system attempts to connect to the proxy gateway that is configured in Step 1. If the connection fails, the system reports an error. In this case, check the installation of the proxy gateway.
Confirm the component package that you want to install and click Next.
The backup gateway starts to be installed. The installation takes about 1 to 5 minutes.
Click Done.
You can view the installation status of the gateway in the
C:\Program Files\aliyun\dbs_agent\logs\agent.loginstallation directory. If information similar to the following figure is displayed, the gateway is installed.
After the DBS backup gateway is installed, click Installed in the Installation Command dialog box of the DTS console.
Check whether the DBS backup gateway is started.
In the Run dialog box of Windows, enter
services.mscand click OK.The service manager dialog box of the system appears.
In the service manager dialog box, check whether the service is started. If the service is not started, right-click AliyunDBSAgent and select Start from the shortcut menu.
NoteBy default, the system starts the backup gateway. You can also start and stop the AliyunDBSAgent service in the service manager.
View the new DBS backup gateway.
On the Backup Gateways page of the Data Disaster Recovery console, click Refresh in the upper-right corner to view the new DBS backup gateway.
NoteThe name of the new DBS backup gateway starts with
DTS_.
3. Create a DTS migration task
Visit the Data Transmission Service (DTS) console.
In the left-side navigation pane, click Data Migration and select a region in the top navigation bar.
Click Create Task and configure the source and destination databases.
Section
Parameter
Description
N/A
Task Name
Enter a task name that helps identify the task. The task name does not need to be unique. You can also use the default task name that is generated by the system.
Source Database
Select Existing Connection
If you have added the source database to the DTS Database Connection Management page, you can select the database from the drop-down list. This way, you do not need to manually enter the information about the source database.
Database Type
Select SQL Server.
Access Method
Select Physical Protocol.
Instance Region
The region in which the self-managed SQL Server database resides.
Physical Protocol Gateway (DBS Backup Gateway)
Select the DBS backup gateway that is installed in 2. Install a backup gateway (database host).
Domain Name Or IP
Default value: localhost.
Port
The port number of the self-managed SQL Server database. Default value: 1433.
Destination Database
Select Existing Connection
If you have added the destination database to the DTS Database Connection Management page, you can select the database from the drop-down list. This way, you do not need to manually enter the information about the destination database.
Database Type
Default value: SQL Server.
Access Method
Default value: Alibaba Cloud Instance.
Instance Region
The region in which the RDS instance resides.
Instance ID
The ID of the RDS instance.
Database Account
The username of the account of the RDS instance. The account must have read and write permissions.
NoteYou can create a standard account or a privileged account for the RDS instance in the ApsaraDB RDS console and modify the permissions of the account as needed.
Database Password
The password of the account.
Connection Method
If Secure Sockets Layer (SSL) encryption is disabled for the destination database, select Non-encrypted.
If SSL encryption is enabled for the destination database, select SSL-encrypted. By default, DTS trusts the server certificate.
After the configuration is complete, click Test Connectivity and Proceed at the bottom of the page.
ImportantMake sure that you have added the IP addresses of DTS servers to the whitelist of the self-managed SQL Server database. Adding the IP addresses of DTS servers may pose security risks. Make sure that you take security measures, such as enhancing the password strength and limiting the port range.
Select objects for the task.
Parameter
Description
Task Stages
If you want to perform only full data migration, select Full Data Migration. Full Data Migration is selected by default.
To ensure business continuity during data migration, select Full Data Migration and Incremental Data Migration.
NoteIf you do not select Incremental Data Migration, we recommend that you do not write data to the source database during data migration to ensure data consistency.
Source Objects
Select one or more objects from the Source Objects section. Click the
icon to add the objects to the Selected Objects section.NoteYou can migrate a single database, multiple databases, or the entire instance.
Selected Objects
The objects that you want to migrate.
Click Next: Advanced Settings to configure advanced settings.
Parameter
Description
Monitoring and Alerting
Specifies whether to configure alerting for the data migration task. If the task fails or the migration latency exceeds the specified threshold, the alert contacts receive notifications. Valid values:
No: does not configure alerting.
Yes: configures alerting. In this case, you must also configure the alert threshold and alert notification settings. For more information, see the Configure monitoring and alerting when you create a DTS task section of the Configure monitoring and alerting topic.
Retry Time For Failed Connections
The retry time range for failed connections. If the source or destination database fails to be connected after the data migration task is started, DTS immediately retries a connection within the retry time range. Valid values: 10 to 1,440. Unit: minutes. Default value: 720. We recommend that you set the parameter to a value greater than 30. If DTS is reconnected to the source and destination databases within the specified retry time range, DTS resumes the data migration task. Otherwise, the data migration task fails.
NoteIf you specify different retry time ranges for multiple data migration tasks that share the same source or destination database, the value that is specified later takes precedence.
When DTS retries a connection, you are charged for the DTS instance. We recommend that you specify the retry time range based on your business requirements. You can also release the DTS instance at the earliest opportunity after the source database and destination instance are released.
After you complete the preceding configurations, click Next: Save Task Settings and Precheck in the lower-right corner of the page.
NoteDTS performs a precheck before a data migration task starts. You can start a data migration task only after the task passes the precheck.
If the precheck fails, click View Details next to the failed check item, and fix the issue according to the instructions before running the precheck again.
If an alert is generated for an item during the precheck, perform the following operations based on the scenario:
For check items that cannot be ignored, click View Details after the failed check item, and fix the issue according to the prompts before running the precheck again.
For check items that can be ignored without fixing, you can click View Alert Details, Confirm Ignore, OK, and Run Precheck Again in sequence to skip the alert check items and run the precheck again. If you ignore the alert item, data inconsistency may occur and your business may be exposed to potential risks.
When Success Rate shows 100%, click Next: Purchase Instance.
On the Purchase page, read and select Data Transmission Service (Pay-as-you-go) Terms Of Service.
Click Buy And Start, and in the OK dialog box that appears, click OK.
You can click the target migration instance on the data migration interface, and view the instance migration progress on the Task Management page.
NoteYou can also view the progress of full migration or incremental migration tasks on the page of the destination instance in the RDS console.
When the full migration task progress reaches 100% and the incremental migration task is in progress, go to the page of the target migration task, and click the Migrate To Cloud button.
In the Do You Want To Migrate To Cloud dialog box, click Start Now and wait for the migration task to complete.
ImportantTo ensure data consistency, stop writing data to the source instance before you trigger the workload switchover. Wait for the migration task to complete and then switch over business connections. The entire process requires several minutes.
Appendix: Comparison between physical gateway-based migration and logical data migration
Item | Backup gateway migrationBackup gateway migration to cloud | Logical data migration |
Migration principle | The native physical backup protocol is used to write data to the destination database as data blocks. | The JDBC protocol is used to obtain SQL statements and write the statements to the destination database. |
Operating system requirements | Only SQL Server on Windows is supported. The version of the desktop operating system cannot be earlier than Windows XP. The version of the server operating system cannot be earlier than Windows Server 2003. | No limits. |
Deployment requirements | A physical protocol gateway must be installed on the server on which the database resides. | You do not need to install a gateway. |
Network connectivity | Whether the server on which the self-managed database is deployed can connect to the network of Alibaba Cloud. Suitable solutions are provided based on the current network status: | The port to connect to the database must be enabled, or leased line-based connections must be established. |
Source database permissions | The sysadmin role is required. | The SELECT permission is required for schema migration and full migration. The sysadmin permission is required for incremental migration. For more information, see Permissions required for database accounts. |
Destination database version | The engine version of the destination database must be the same or later than the engine version of the source database. | Supports migration between versions, whether upgrading to higher versions or downgrading to lower versions. |
Destination database accessibility | The destination database is inaccessible during data migration. | You can read data from or write data to the destination database during data migration. |
Limits on tables that can be migrated from the source database | Memory tables cannot be migrated. Fields of the FileStream and FileTables types cannot be migrated. | For more information, see Limits on the source database. |
Migration scenarios | Data can be migrated from self-managed databases to the cloud. Note The self-managed SQL Server databases can reside on ECS instances, in data centers, or on third-party cloud servers. | Data can be migrated from self-managed databases or cloud-hosted databases to the cloud. |
Migration efficiency | High. | Medium. |
Data processing extract, transform, load (ETL) | Not supported. | Supported. |
Table-level data filtering | Not supported. | Supported. |
Database-level data filtering | Supported. | Supported. |