Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/datamigration/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
Release History
===============

0.3.0
++++++
* [BREAKING CHANGES] Removing parameters provisioing-error and migration-operation-id from commands az datamigration sql-managed-instance create and az datamigration sql-vm create, as they are unnecessary parameters.
* [BREAKING CHANGES] Typo correction for parameters --number-of-interation to --number-of-iteration in command az datamigration performance-data-collection
* [NEW SUBGROUP] az datamigration sql-db - Manage database migrations to SQL DB instance.
Comment thread
ashutoshsuman99 marked this conversation as resolved.
Outdated

0.2.0
++++++
* Bug fix for Multiple connection strings in az datamigration get-assessment command.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def cf_datamigration_cl(cli_ctx, *_):
DataMigrationManagementClient)


def cf_database_migration_sqldb(cli_ctx, *_):
return cf_datamigration_cl(cli_ctx).database_migrations_sql_db


def cf_database_migration_sqlmi(cli_ctx, *_):
return cf_datamigration_cl(cli_ctx).database_migrations_sql_mi

Expand Down
136 changes: 123 additions & 13 deletions src/datamigration/azext_datamigration/generated/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,110 @@
short-summary: Manage Data Migration
'''

helps['datamigration sql-db'] = """
type: group
short-summary: Manage database migrations to SQL DB.
"""

helps['datamigration sql-db show'] = """
type: command
short-summary: "Retrieve the specified database migration for a given SQL DB."
examples:
- name: Get Sql DB database Migration with the expand parameter.
text: |-
az datamigration sql-db show --expand "MigrationStatusDetails" --resource-group "testrg" \
--sqldb-instance-name "sqldbinstance" --target-db-name "db1"
- name: Get Sql DB database Migration without the expand parameter.
text: |-
az datamigration sql-db show --resource-group "testrg" --sqldb-instance-name "sqldbinstance" \
--target-db-name "db1"
"""

helps['datamigration sql-db create'] = """
type: command
short-summary: "Create a new database migration to a given SQL DB."
parameters:
- name: --source-sql-connection
short-summary: "Source SQL Server connection details."
long-summary: |
Usage: --source-sql-connection data-source=XX authentication=XX user-name=XX password=XX \
encrypt-connection=XX trust-server-certificate=XX

data-source: Data source.
authentication: Authentication type.
user-name: User name to connect to source SQL.
password: Password to connect to source SQL.
encrypt-connection: Whether to encrypt connection or not.
trust-server-certificate: Whether to trust server certificate or not.
- name: --target-sql-connection
short-summary: "Target SQL DB connection details."
long-summary: |
Usage: --target-sql-connection data-source=XX authentication=XX user-name=XX password=XX \
encrypt-connection=XX trust-server-certificate=XX

data-source: Data source.
authentication: Authentication type.
user-name: User name to connect to source SQL.
password: Password to connect to source SQL.
encrypt-connection: Whether to encrypt connection or not.
trust-server-certificate: Whether to trust server certificate or not.
examples:
- name: Create or Update Database Migration resource with Maximum parameters.
text: |-
az datamigration sql-db create --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/\
resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" --scope \
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/servers/sqldbinstanc\
e" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \
encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --table-list \
"[Schema1].[TableName1]" "[Schema2].[TableName2]" --target-sql-connection authentication="SqlAuthentication" \
data-source="sqldbinstance" encrypt-connection=true password="placeholder" trust-server-certificate=true \
user-name="bbb" --resource-group "testrg" --sqldb-instance-name "sqldbinstance" --target-db-name "db1"
- name: Create or Update Database Migration resource with Minimum parameters.
text: |-
az datamigration sql-db create --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/\
resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" --scope \
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql/servers/sqldbinstanc\
e" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \
encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --target-sql-connection \
authentication="SqlAuthentication" data-source="sqldbinstance" encrypt-connection=true password="placeholder" \
trust-server-certificate=true user-name="bbb" --resource-group "testrg" --sqldb-instance-name "sqldbinstance" \
--target-db-name "db1"
"""

helps['datamigration sql-db delete'] = """
type: command
short-summary: "Delete an in-progress or completed database migration to SQL DB."
examples:
- name: Delete Database Migration resource.
text: |-
az datamigration sql-db delete --resource-group "testrg" --sqldb-instance-name "sqldbinstance" \
--target-db-name "db1"
"""

helps['datamigration sql-db cancel'] = """
type: command
short-summary: "Stop in-progress database migration to SQL DB."
examples:
- name: Stop ongoing migration for the database.
text: |-
az datamigration sql-db cancel --migration-operation-id "9a90bb84-e70f-46f7-b0ae-1aef5b3b9f07" \
--resource-group "testrg" --sqldb-instance-name "sqldbinstance" --target-db-name "db1"
"""

helps['datamigration sql-db wait'] = """
type: command
short-summary: Place the CLI in a waiting state until a condition of the datamigration sql-db is met.
examples:
- name: Pause executing next line of CLI script until the datamigration sql-db is successfully created.
text: |-
az datamigration sql-db wait --resource-group "testrg" --sqldb-instance-name "sqldbinstance" \
--target-db-name "db1" --created
- name: Pause executing next line of CLI script until the datamigration sql-db is successfully deleted.
text: |-
az datamigration sql-db wait --resource-group "testrg" --sqldb-instance-name "sqldbinstance" \
--target-db-name "db1" --deleted
"""

helps['datamigration sql-managed-instance'] = """
type: group
short-summary: Manage database migrations to SQL Managed Instance.
Expand All @@ -26,7 +130,11 @@
type: command
short-summary: "Retrieve the specified database migration for a given SQL Managed Instance."
examples:
- name: Get Database Migration resource.
- name: Get Sql MI database Migration with the expand parameter.
text: |-
az datamigration sql-managed-instance show --expand "MigrationStatusDetails" --managed-instance-name \
"managedInstance1" --resource-group "testrg" --target-db-name "db1"
- name: Get Sql MI database Migration without the expand parameter.
text: |-
az datamigration sql-managed-instance show --managed-instance-name "managedInstance1" --resource-group \
"testrg" --target-db-name "db1"
Expand Down Expand Up @@ -82,11 +190,10 @@
--source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\bbb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\
\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" storage-account-resource-id="account.database.win\
dows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Micr\
osoft.DataMigration/sqlMigrationServices/testagent" --offline-configuration last-backup-name="last_backup_file_name" \
offline=true --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.Sql\
/managedInstances/instance" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication"\
data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \
--resource-group "testrg" --target-db-name "db1"
osoft.DataMigration/sqlMigrationServices/testagent" --scope "/subscriptions/00000000-1111-2222-3333-444444444444/resour\
ceGroups/testrg/providers/Microsoft.Sql/managedInstances/instance" --source-database-name "aaa" \
--source-sql-connection authentication="WindowsAuthentication" data-source="aaa" encrypt-connection=true \
password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" --target-db-name "db1"
"""

helps['datamigration sql-managed-instance cancel'] = """
Expand Down Expand Up @@ -130,7 +237,11 @@
type: command
short-summary: "Retrieve the specified database migration for a given SQL VM."
examples:
- name: Get Database Migration resource.
- name: Get Sql VM database Migration with the expand parameter.
text: |-
az datamigration sql-vm show --expand "MigrationStatusDetails" --resource-group "testrg" --sql-vm-name \
"testvm" --target-db-name "db1"
- name: Get Sql VM database Migration without the expand parameter.
text: |-
az datamigration sql-vm show --resource-group "testrg" --sql-vm-name "testvm" --target-db-name "db1"
"""
Expand Down Expand Up @@ -184,12 +295,11 @@
az datamigration sql-vm create --source-location "{\\"fileShare\\":{\\"path\\":\\"C:\\\\\\\\aaa\\\\\\\\b\
bb\\\\\\\\ccc\\",\\"password\\":\\"placeholder\\",\\"username\\":\\"name\\"}}" --target-location account-key="abcd" \
storage-account-resource-id="account.database.windows.net" --migration-service "/subscriptions/00000000-1111-2222-3333-\
444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" \
--offline-configuration last-backup-name="last_backup_file_name" offline=true --scope "/subscriptions/00000000-1111-222\
2-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVirtualMachines/testvm" \
--source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" data-source="aaa" \
encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" --resource-group "testrg" \
--sql-vm-name "testvm" --target-db-name "db1"
444444444444/resourceGroups/testrg/providers/Microsoft.DataMigration/sqlMigrationServices/testagent" --scope \
"/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/testrg/providers/Microsoft.SqlVirtualMachine/sqlVir\
tualMachines/testvm" --source-database-name "aaa" --source-sql-connection authentication="WindowsAuthentication" \
data-source="aaa" encrypt-connection=true password="placeholder" trust-server-certificate=true user-name="bbb" \
--resource-group "testrg" --sql-vm-name "testvm" --target-db-name "db1"
"""

helps['datamigration sql-vm cancel'] = """
Expand Down
Loading