az dms project task

Manage Tasks for a Data Migration Service instance's Project.

Commands

az dms project task cancel Cancel a Task if it's currently queued or running.
az dms project task check-name Check if a given Task name is available within a given instance of DMS as well as the name's validity.
az dms project task create Create and start a migration Task.
az dms project task delete Delete a migration Task.
az dms project task list List the Tasks within a Project. Some tasks may have a status of Unknown, which indicates that an error occurred while querying the status of that task.
az dms project task show Show the details of a migration Task. Use the "--expand" to get more details.

az dms project task cancel

Cancel a Task if it's currently queued or running.

az dms project task cancel --name
--project-name
--resource-group
--service-name
[--subscription]

Required Parameters

--name -n

The name of the Task.

--project-name

The name of the Project.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name

The name of the Service.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az dms project task check-name

Check if a given Task name is available within a given instance of DMS as well as the name's validity.

az dms project task check-name --name
--project-name
--resource-group
--service-name
[--subscription]

Required Parameters

--name -n

The Task name to check.

--project-name

The name of the Project.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name

The name of the Service.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az dms project task create

Create and start a migration Task.

az dms project task create --database-options-json
--name
--project-name
--resource-group
--service-name
--source-connection-json
--target-connection-json
[--enable-data-integrity-validation]
[--enable-query-analysis-validation]
[--enable-schema-validation]
[--subscription]

Examples

Create and start a Task which performs no validation checks.

az dms project task create --database-options-json "C:\CLI Files\databaseOptions.json" -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json "{'dataSource': 'myserver', 'authentication': 'SqlAuthentication', 'encryptConnection': 'true', 'trustServerCertificate': 'true'}" --target-connection-json "C:\CLI Files\targetConnection.json"

Create and start a Task which performs all validation checks.

az dms project task create --database-options-json "C:\CLI Files\databaseOptions.json" -n mytask --project-name myproject -g myresourcegroup --service-name mydms --source-connection-json "C:\CLI Files\sourceConnection.json" --target-connection-json "C:\CLI Files\targetConnection.json" --enable-data-integrity-validation --enable-query-analysis-validation --enable-schema-validation

The format of the database options JSON object.

[
                            {
                                "name": "source database",
                                "target_database_name": "target database",
                                "make_source_db_read_only": false|true,
                                "table_map": {
                                    "schema.SourceTableName1": "schema.TargetTableName1",
                                    "schema.SourceTableName2": "schema.TargetTableName2",
                                    ...n
                                }
                            },
                            ...n
                        ]

The format of the connection JSON object.

{
                            "userName": "user name",    // if this is missing or null, you will be prompted
                            "password": null,           // if this is missing or null (highly recommended) you will be prompted
                            "dataSource": "server name[,port]",
                            "authentication": "SqlAuthentication|WindowsAuthentication",
                            "encryptConnection": true,      // highly recommended to leave as true
                            "trustServerCertificate": true  // highly recommended to leave as true
                        }

Required Parameters

--database-options-json

Database and table information. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format.

--name -n

The name of the Task.

--project-name

The name of the Project.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name

The name of the Service.

--source-connection-json

The connection information to the source server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format.

--target-connection-json

The connection information to the target server. This can be either a JSON-formatted string or the location to a file containing the JSON object. See example below for the format.

Optional Parameters

--enable-data-integrity-validation

Whether to perform a checksum based data integrity validation between source and target for the selected database and tables.

--enable-query-analysis-validation

Whether to perform a quick and intelligent query analysis by retrieving queries from the source database and executing them in the target. The result will have execution statistics for executions in source and target databases for the extracted queries.

--enable-schema-validation

Whether to compare the schema information between source and target.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

az dms project task delete

Delete a migration Task.

az dms project task delete --name
--project-name
--resource-group
--service-name
[--delete-running-tasks]
[--subscription]
[--yes]

Required Parameters

--name -n

The name of the Task.

--project-name

The name of the Project.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name

The name of the Service.

Optional Parameters

--delete-running-tasks

If the Task is currently running, cancel the Task before deleting the Project.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--yes -y

Do not prompt for confirmation.

az dms project task list

List the Tasks within a Project. Some tasks may have a status of Unknown, which indicates that an error occurred while querying the status of that task.

az dms project task list --project-name
--resource-group
--service-name
[--subscription]
[--task-type]

Examples

List all Tasks within a Project.

az dms project task list --project-name myproject -g myresourcegroup --service-name mydms

List only the SQL to SQL migration tasks within a Project.

az dms project task list --project-name myproject -g myresourcegroup --service-name mydms --task-type Migrate.SqlServer.SqlDb

Required Parameters

--project-name

The name of the Project.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name

The name of the Service.

Optional Parameters

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--task-type

Filters the list by the type of task. For the list of possible types see "az dms check-status".

az dms project task show

Show the details of a migration Task. Use the "--expand" to get more details.

az dms project task show --name
--project-name
--resource-group
--service-name
[--expand]
[--subscription]

Required Parameters

--name -n

The name of the Task.

--project-name

The name of the Project.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--service-name

The name of the Service.

Optional Parameters

--expand

Expand the response to provide more details. Use with "command" to see more details of the Task. Use with "output" to see the results of the Task's migration.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.