DMS - Migration Task & Migration

Let’s now create a new Migration Task, which will do the actual migration

  1. In the main area of Database Migration Service, click on Database migration tasks on the left-hand menu, then click on Create Task on the upper right:

    • On the next screen, refer to these settings:

      Setting Value
      Task identifider DMS-MigrationTask
      Replication instance (choose existing instance )
      Source database endpoint (choose existing source endpoint)
      Target database endpoint (choose existing target endpoint)
      Migration type Migrate existing data
      Start task on create yes
      Target table preparation mode Drop tables on target
      Include LOB columns in replication Limited LOB Mode
      Enable validation no
      Enable CloudWatch logs yes

  2. Let’s now setup a generic mapping to select the tables to migrate:

    • Here are the table mapping rules:

      Setting Value
      Schema dbo
      Table name %
      Action Include
    • We will also need to setup a transformation rule to rename the schema from dbo to sampledb:

      Setting Value
      Target Schema
      Schema name dbo
      Action Rename to - sampledb

    • Click on Create Task

  3. Once the Task has been created, it should start migrating the data as well, if not, you can start/restart the task via the Actions menu.

  4. To get more details on the Task, click on the Task, and you’ll see detailed statistics under Table statistics, and log metrics under Cloudwatch metrics.

    Cloudwatch Metrics:

If you get any errors on viewing the logs, it means that the logs haven’t initialized yet since the task has just been started. Wait a few minutes and try again