Use DMS migration to AWS RDS Azure SQL

    This time to a practical operation, try DMS in the end is how migration, first of all we try to migrate from RDS AWS to Azure SQL

    We chose AWS Beijing area of ​​RDS, RDS using SQL Server 2014 Enterprise edition, Azure SQL Azure uses a north area, nothing in this version

    

    First look at before we've created a DMS, then only need to create any migration to the DMS, of course, before that, we need to ensure that the AWS RDS is accessible, and create some tests in the RDS use of data, because RDS is no way to access local data files, so the script generated test data before there is no way to use, we can only manually build up some test data


    Built after the test data, to DMS, you can create a migration project directly, migration project will define the migration source and destination

    1.png



You can see the option where you can choose AWS RDS for SQL Server, the corresponding target selection Azure SQL, where you can choose to do online migration, which is sustained migration can support an incremental, some migration scenarios are not supported by incremental

2.png


Information input source database and object libraries

3.png


Note that, whether RDS or Azure SQL, if you want DMS can access it, all you need to add the corresponding firewall rules, when in fact the DMS IP access restricted when there will be prompted to remind you of what is an IP DMS

4.png



Azure SQL can be added inside the firewall, AWS RDS can add sg in

5.png



You can select the source libraries and the corresponding target library when you can see the migration

6.png



DMS migration requirements are more stringent, the source library table must be in the target inventory, but these fields are also required, must have a primary key, the target table must be empty, and so on, people will feel a lot of trouble, but in fact, there is a simple way, then there will be introduced, the most important thing is to be open CDC

7.png


CDC first to open in the library level, you can run the following command

exec msdb.dbo.rds_cdc_enable_db Sample

8.png


After the turn at the table level

USE Sample

EXEC sys.sp_cdc_enable_table 

@source_schema = N'dbo', 

@source_name   = N'test_table', 

@role_name     = NULL, 

@supports_net_changes = 1

9.png



Then here are not prompted CDC can not open

10.png


Confirm the information previously entered

11.png


We can see already migrated in preparation

13.png



We try to increase the data in the source library

14.png



In DMS you can see the data in sync, this is an ongoing process, as long as there is new data will be synchronized, but please note that if there is a new table, it is not automatically synchronized, as it will by the user when the DMS Migration select to synchronize table

15.png


    If the confirmation is no longer a need to synchronize, you can choose cutover16.png



After the migration is complete, you can see the corresponding report

17.png




You can see it is quite simple to use, mainly for target libraries have when migrating a lot of restrictions, including a primary key, the table must exist and so, if it is a new environment can not be directly migrated to this question is actually a good solution program, look behind you

Guess you like

Origin blog.51cto.com/mxyit/2465308