az datamigration

Note

This reference is part of the datamigration extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az datamigration command. Learn more about extensions.

Manage Data Migration.

Commands

az datamigration get-assessment

Start assessment on SQL Server instance(s).

az datamigration get-sku-recommendation

Give SKU recommendations for Azure SQL offerings.

az datamigration performance-data-collection

Collect performance data for given SQL Server instance(s).

az datamigration register-integration-runtime

Register Database Migration Service on Integration Runtime.

az datamigration sql-db

Manage database migrations to SQL DB.

az datamigration sql-db cancel

Stop in-progress database migration to SQL DB.

az datamigration sql-db create

Create a new database migration to a given SQL DB.

az datamigration sql-db delete

Delete an in-progress or completed database migration to SQL DB.

az datamigration sql-db show

Retrieve the specified database migration for a given SQL DB.

az datamigration sql-db wait

Place the CLI in a waiting state until a condition of the datamigration sql-db is met.

az datamigration sql-managed-instance

Manage database migrations to SQL Managed Instance.

az datamigration sql-managed-instance cancel

Stop in-progress database migration to SQL Managed Instance.

az datamigration sql-managed-instance create

Create a new database migration to a given SQL Managed Instance.

az datamigration sql-managed-instance cutover

Initiate cutover for in-progress online database migration to SQL Managed Instance.

az datamigration sql-managed-instance show

Retrieve the specified database migration for a given SQL Managed Instance.

az datamigration sql-managed-instance wait

Place the CLI in a waiting state until a condition of the datamigration sql-managed-instance is met.

az datamigration sql-service

Manage Database Migration Service.

az datamigration sql-service create

Create Database Migration Service.

az datamigration sql-service delete

Delete Database Migration Service.

az datamigration sql-service delete-node

Delete the integration runtime node.

az datamigration sql-service list

Retrieve all Database Migration Services in the resource group. And Retrieve all Database Migration Services in the subscription.

az datamigration sql-service list-auth-key

Retrieve the List of Authentication Keys for Self Hosted Integration Runtime.

az datamigration sql-service list-integration-runtime-metric

Retrieve the registered Integration Runtine nodes and their monitoring data for a given Database Migration Service.

az datamigration sql-service list-migration

Retrieve the List of database migrations attached to the service.

az datamigration sql-service regenerate-auth-key

Regenerate a new set of Authentication Keys for Self Hosted Integration Runtime.

az datamigration sql-service show

Retrieve the Database Migration Service.

az datamigration sql-service update

Update Database Migration Service.

az datamigration sql-service wait

Place the CLI in a waiting state until a condition of the datamigration sql-service is met.

az datamigration sql-vm

Manage database migrations to SQL VM.

az datamigration sql-vm cancel

Stop in-progress database migration to SQL VM.

az datamigration sql-vm create

Create a new database migration to a given SQL VM.

az datamigration sql-vm cutover

Initiate cutover for in-progress online database migration to SQL VM.

az datamigration sql-vm show

Retrieve the specified database migration for a given SQL VM.

az datamigration sql-vm wait

Place the CLI in a waiting state until a condition of the datamigration sql-vm is met.

az datamigration get-assessment

Start assessment on SQL Server instance(s).

az datamigration get-assessment [--config-file-path]
                                [--connection-string]
                                [--output-folder]
                                [--overwrite]

Examples

Run SQL Assessment on given SQL Server using connection string.

az datamigration get-assessment --connection-string "Data Source=LabServer.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" --output-folder "C:\AssessmentOutput" --overwrite

Run SQL Assessment on given SQL Server using assessment config file.

az datamigration get-assessment --config-file-path "C:\Users\user\document\config.json"

Run SQL Assessment on multiple SQL Servers in one call using connection string.

az datamigration get-assessment --connection-string "Data Source=LabServer1.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" "Data Source=LabServer2.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" --output-folder "C:\AssessmentOutput" --overwrite

Optional Parameters

--config-file-path

Path of the ConfigFile.

--connection-string

SQL Server Connection Strings.

--output-folder

Output folder to store assessment report.

--overwrite

Enable this parameter to overwrite the existing assessment report.

az datamigration get-sku-recommendation

Give SKU recommendations for Azure SQL offerings.

az datamigration get-sku-recommendation [--config-file-path]
                                        [--database-allow-list]
                                        [--database-deny-list]
                                        [--display-result]
                                        [--elastic-strategy]
                                        [--end-time]
                                        [--output-folder]
                                        [--overwrite]
                                        [--scaling-factor]
                                        [--start-time]
                                        [--target-percentile]
                                        [--target-platform]
                                        [--target-sql-instance]

Examples

Get SKU recommendation for given SQL Server using command line.

az datamigration get-sku-recommendation --output-folder "C:\PerfCollectionOutput" --database-allow-list AdventureWorks1 AdventureWorks2 --display-result --overwrite

Get SKU recommendation for given SQL Server using assessment config file.

az datamigration get-sku-recommendation --config-file-path "C:\Users\user\document\config.json"

Optional Parameters

--config-file-path

Path of the ConfigFile.

--database-allow-list

Space separated list of names of databases to be allowed for SKU recommendation consideration while excluding all others. Only set one of the following or neither: databaseAllowList, databaseDenyList. Default: null.

--database-deny-list

Space separated list of names of databases to not be considered for SKU recommendation. Only set one of the following or neither: databaseAllowList, databaseDenyList. Default: null.

--display-result

Whether or not to print the SKU recommendation results to the console. Enable this parameter to display result.

--elastic-strategy

Whether or not to use the elastic strategy for SKU recommendations based on resource usage profiling. Enable this parameter to use elastic strategy.

--end-time

UTC end time of performance data points to consider during aggregation, in YYYY-MM-DD HH:MM format. Only used for baseline (non-elastic) strategy. Default: all data points collected will be considered.

--output-folder

Output folder where performance data of the SQL Server is stored. The value here must be the same as the one used in PerfDataCollection.

--overwrite

Whether or not to overwrite any existing SKU recommendation reports. Enable this paramater to overwrite.

--scaling-factor

Scaling (comfort) factor used during SKU recommendation. For example, if it is determined that there is a 4 vCore CPU requirement with a scaling factor of 150%, then the true CPU requirement will be 6 vCores.

default value: 100
--start-time

UTC start time of performance data points to consider during aggregation, in YYYY-MM-DD HH:MM format. Only used for baseline (non-elastic) strategy. Default: all data points collected will be considered.

--target-percentile

Percentile of data points to be used during aggregation of the performance data. Only used for baseline (non-elastic) strategy.

default value: 95
--target-platform

Target platform for SKU recommendation: either AzureSqlDatabase, AzureSqlManagedInstance, AzureSqlVirtualMachine, or Any. If Any is selected, then SKU recommendations for all three target platforms will be evaluated, and the best fit will be returned.

default value: Any
--target-sql-instance

Name of the SQL instance for which SKU should be recommendeded. Default: outputFolder will be scanned for files created by the PerfDataCollection action, and recommendations will be provided for every instance found.

az datamigration performance-data-collection

Collect performance data for given SQL Server instance(s).

az datamigration performance-data-collection [--config-file-path]
                                             [--connection-string]
                                             [--number-of-iteration]
                                             [--output-folder]
                                             [--perf-query-interval]
                                             [--static-query-interval]
                                             [--time]

Examples

Collect performance data of a given SQL Server using connection string.

az datamigration performance-data-collection --connection-string "Data Source=LabServer.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" --output-folder "C:\PerfCollectionOutput" --number-of-iteration 5 --perf-query-interval 10 --static-query-interval 60

Collect performance data of multiple SQL Servers in one call using connection string.

az datamigration performance-data-collection --connection-string "Data Source=LabServer1.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" "Data Source=LabServer2.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" --output-folder "C:\PerfCollectionOutput" --number-of-iteration 5 --perf-query-interval 10 --static-query-interval 60

Collect performance data of a given SQL Server using assessment config file.

az datamigration performance-data-collection --config-file-path "C:\Users\user\document\config.json"

Collect performance data of a given SQL Server by specifying a time limit. If the time limit specified is before the complition of a iteration cycle, the process will end without saving the last cycle performance data.

az datamigration performance-data-collection --connection-string "Data Source=LabServer.database.net;Initial Catalog=master;Integrated Security=False;User Id=User;Password=password" --output-folder "C:\PerfCollectionOutput" --number-of-iteration 5 --perf-query-interval 10 --static-query-interval 60 --time 60

Optional Parameters

--config-file-path

Path of the ConfigFile.

--connection-string

SQL Server Connection Strings.

--number-of-iteration

Number of iterations of performance data collection to perform before persisting to file. For example, with default values, performance data will be persisted every 30 seconds * 20 iterations = 10 minutes. Minimum: 2.

default value: 20
--output-folder

Output folder to store performance data.

--perf-query-interval

Interval at which to query performance data, in seconds.

default value: 30
--static-query-interval

Interval at which to query and persist static configuration data, in seconds.

default value: 3600
--time

Time after which the command execution automatically stops, in seconds. If this parameter is not specified manual intervention will be required to stop the command execution.

az datamigration register-integration-runtime

Register Database Migration Service on Integration Runtime.

az datamigration register-integration-runtime --auth-key
                                              [--installed-ir-path]
                                              [--ir-path]

Examples

Register Sql Migration Service on Self Hosted Integration Runtime.

az datamigration register-integration-runtime --auth-key "IR@00000-0000000-000000-aaaaa-bbbb-cccc"

Install Integration Runtime and register a Sql Migration Service on it.

az datamigration register-integration-runtime --auth-key "IR@00000-0000000-000000-aaaaa-bbbb-cccc" --ir-path "C:\Users\user\Downloads\IntegrationRuntime.msi"

Read the Integration Runtime from given installation location.

az datamigration register-integration-runtime --auth-key "IR@00000-0000000-000000-aaaaa-bbbb-cccc" --installed-ir-path "D:\My Softwares\Microsoft Integration Runtime\5.0"

Required Parameters

--auth-key

AuthKey of SQL Migration Service.

Optional Parameters

--installed-ir-path

Version folder path in the Integration Runtime installed location. This can be provided when IR is installed but the command is failing to read it. Format: "Microsoft Integration Runtime".

--ir-path

Path of Integration Runtime MSI.