How do I create a task in AWS DMS and enable control tables?
Last updated: 2019-06-26
How do I create an AWS Database Migration Service (AWS DMS) and then enable control tables for my task?
Before you create a task and enable control tables, be sure that you created a replication instance, source endpoint, and target endpoint for your task. Control tables are for change data capture (CDC) operations only. If you experience issues during a full load, you might not be able to see any information in the control tables.
- Open the AWS DMS console, and then choose Database migration tasks from the navigation pane.
- Choose Create task.
- From the Create data migration task section, choose the replication instance, source, and target endpoints that you created.
- For Migration type, choose one of the following:
Migrate existing data
Migrate existing data and replicate ongoing changes
Replicate data changes only
- From the Task settings section, from Target table preparation mode, choose one of the following:
Do nothing - This creates the table if a table isn't on the target. If a table exists, this leaves the data and metadata unchanged.
Drop tables on target - This drops the table at the target and recreates the table.
Truncate - This truncates the data and leaves the table and metadata intact.
- From the Task settings section, from Include LOB columns in replication, choose one of the following:
Don't include LOB columns
Full LOB mode - Specify the LOB chunk size. If you have large binary objects (LOBs), this can slow your migration because AWS DMS doesn't know the exact size of the LOBs. AWS DMS fetches LOBs in chunks as specified by the LOB chunk size until the full size is recovered. Then, AWS DMS migrates the LOBs to the target.
Limited LOB mode - Specify the maximum LOB size. This is the size of the largest LOB you are migrating, so you must query your source database for this information.
- Choose Enable Cloudwatch logs.
Note: If you choose Enable validation, the task requires additional time to complete.
- From the Table mappings section, add your schemas and tables.
- Expand Advanced task settings.
- In the Create control table in target using schema field, enter a schema for your control table. If you don't enter any information in the schema field, the tables are copied to the default location in the database. See the following default locations for each database engine:
PostgreSQL - Public
Oracle - the target schema
SQL Server - dbo in target database
MySQL - awsdms_control
MariaDB - awsdms_control
Amazon Redshift - Public
Amazon DynamoDB - created as individual tables in the database
- In the History timeslot (minutes) field, enter the number of minutes that each record remains in the replication history table.
- For the following control tables, enable the following:
Apply exceptions - This table can't be disabled, and it contains the exceptions, errors, and information on the statement that was running when the error occurred.
Replication status - This table provides details about the current task, including task status, amount of memory consumed by the task, and the number of changes not yet applied to the target. This table also gives the position in the source database where AWS DMS is reading, and the table indicates if the task is a full load or CDC.
Suspended tables - This table provides a list of suspended tables and the reason that the tables were suspended.
Replication history - This table provides information about replication history. This information includes the number and volume of records processed during the task, latency at the end of a CDC task, and other statistics.
- Choose Create task.
- Run the task, and then check the target database for the schema and tables.
To change the control table settings for your task, choose Database migration tasks from the navigation pane. Select your task, choose Actions, and then choose Modify. From the Advanced task settings section, you can change the Control table settings. When done, choose Save.