Create a DMS Migration Task


AWS DMS uses Database Migration Task to migrate the data from source to the target database.

  1. Click on Database migration tasks on the left-hand menu, then click on the Create task button on the top right corner.

    \[SqlServer-to-SqlServerRDS-14\]

  2. Create a data migration task with the following values for migrating the dms_sample database.

    Parameter Value
    Task identifier SampleMigrationTask
    Replication instance DMSReplication
    Source database endpoint sqlserver-source
    Target database endpoint sqlserver-target
    Migration type Migrate existing data and replicate ongoing changes
    CDC stop mode Don’t use custom CDC stop mode
    Target table preparation mode Do nothing
    Stop task after full load completes Don’t stop
    Include LOB columns in replication Limited LOB mode
    Max LOB size (KB) 32
    Enable validation Unchecked
    Enable CloudWatch logs Checked
  3. Expand the Table mappings section, and select Wizard for the editing mode.

  4. Click on Add new selection rule button and enter the following values in the form:

    Parameter Value
    Schema dbo
    Table name %
    Action Include

If the Create Task screen does not recognize any schemas, make sure to go back to endpoints screen and click on your endpoint. Scroll to the bottom of the page and click on Refresh Button (⟳) in the Schemas section. If your schemas still do not show up on the Create Task screen, click on the Guided tab and manually select ‘dbo’ schema and all tables.

  1. Next, expand the Transformation rules section, and click on Add new transformation rule using the following values:

    Parameter Value
    Target Schema
    Schema Name dbo
    Action Rename to: dms_recovery

    \[SqlServer-to-SqlServerRDS-15\]

  2. After entering the values, make sure Migration task startup configuration is set to start Automatically on create, then click on Create task. .

  3. At this point, the task should start running and replicating data from the dms_sample database running on EC2 to the Amazon RDS SQL Server instance.

    \[SqlServer-to-SqlServerRDS-16\]

  4. As the rows are being transferred, you can monitor the task progress:

    1. Click on your task (samplemigrationtask) and scroll to the Table statistics section to view the table statistics to see how many rows have been moved.
    2. If there is an error, the status color changes from green to red. Click on View logs link for the logs to debug.

You do not have to wait for all of the data to transfer before moving to the next step.