DocumentationDataMigrate ProOperation

DataMigrate ProOperation

DataMigrate Pro End-User Guide: Azure SQL Create, Remove, and Configuration

This guide shows how to create and remove Azure SQL resources for DataMigrate Pro and set each migration table to API transfer or Azure SQL staging.

Date: 2026-03-29

1. Purpose

This guide explains how to:

  1. Create Azure SQL resources for DataMigrate Pro.
  2. Remove Azure SQL resources when they are no longer needed.
  3. Configure migration-table behavior so each table uses API transfer or Azure SQL staging as intended.

The guide is written for end users and operations users.

2. Prerequisites

Before you start:

  1. Azure subscription with permissions to create/delete:
  • Resource Groups
  • Azure SQL Server
  • Azure SQL Database
  1. Azure CLI installed and authenticated (az login).

  2. DataMigrate Pro executable available in the repository root:

  • DataMigratePro.exe
  1. Required access to your BC and SQL migration setup.

3. Files You Can Use

The repository provides these scripts:

  1. create-azuresql.template.cmd
  • Same flow with placeholders (safe template).
  1. remove-azuresql.template.cmd
  • Same flow with placeholders (safe template).

Important:

  1. End users should use template files only.
  2. Do not share or distribute scripts that already contain real tenant IDs, subscription IDs, server names, usernames, or passwords.

4. Create Azure SQL

4.0 Command documentation: -t createazuresql

Purpose:

  1. Provision an Azure SQL Server + Azure SQL Database for DataMigrate Pro staging transfers.
  2. Persist all required Azure SQL runtime settings into local settings.json so follow-up runs can reuse them.
  3. Open a firewall rule for the current client IP when possible.

Required call pattern:

CMD
DataMigratePro.exe -t createazuresql ^
	--tenant "<TENANT_ID_GUID>" ^
	--subscription "<SUBSCRIPTION_ID_GUID>" ^
	--resourcegroup "<RESOURCE_GROUP_NAME>" ^
	--location "<AZURE_REGION>" ^
	--azuresqlserver "<AZURE_SQL_SERVER_NAME>" ^
	--azuresqldatabase "<AZURE_SQL_DATABASE_NAME>" ^
	--azuresqladminuser "<AZURE_SQL_ADMIN_USER>" ^
	--azuresqladminpassword "<AZURE_SQL_ADMIN_PASSWORD>" ^
	--azuresqlchunksize "5000"

Example:

CMD
DataMigratePro.exe -t createazuresql --tenant "11111111-1111-1111-1111-111111111111" --subscription "22222222-2222-2222-2222-222222222222" --resourcegroup "DataMigrateProRG" --location "westeurope" --azuresqlserver "srv-dmp-prod-001" --azuresqldatabase "DMP" --azuresqladminuser "dmpadmin" --azuresqladminpassword "StrongPassword!123" --azuresqlchunksize "5000"

4.0.1 settings.json values written by createazuresql

The command writes these fields through the DataConnectionManager save flow.

  1. AzureSqlTenantId: tenant used for Azure authentication and traceability.
  2. AzureSqlSubscriptionId: subscription used for create/remove operations.
  3. AzureSqlResourceGroup: default resource group for later Azure SQL commands.
  4. AzureSqlLocation: default Azure region for the provisioned resources.
  5. AzureSqlServerName: server identifier reused by add/remove flows.
  6. AzureSqlDatabaseName: database identifier reused by transfer/provisioning workflows.
  7. AzureSqlAdminUser: SQL admin login used for management and connection string generation.
  8. AzureSqlAdminPassword: SQL admin password used for generated connection strings.
  9. AzureSqlClientIp: resolved client IP that was used for firewall opening.
  10. AzureSqlConnectionStringRead: read connection string for staging reads.
  11. AzureSqlConnectionStringWrite: write connection string for staging uploads.
  12. AzureSqlChunkSize: persisted default chunk size for Azure SQL staging uploads.

Operational purpose of writing these settings:

  1. Avoid re-entering Azure SQL values on every run.
  2. Enable follow-up tasks (putdata, putalldata, addazuresqlfirewallrule, removeazuresql) to use consistent defaults.
  3. Keep staging transport reproducible across environments.
  1. Open create-azuresql.template.cmd.
  2. Replace all placeholders:
  • <TENANT_ID_GUID>
  • <SUBSCRIPTION_ID_GUID>
  • <AZURE_SQL_ADMIN_USER>
  • <AZURE_SQL_ADMIN_PASSWORD>
  • <RESOURCE_GROUP_NAME>
  • <AZURE_REGION>
  • <AZURE_SQL_SERVER_NAME>
  • <AZURE_SQL_DATABASE_NAME>
  • <CHUNK_SIZE_INT>
  1. Save as a working script (for example create-azuresql.local.cmd).
  2. Verify that all placeholder values were replaced with correct values for your environment.
  3. Run it from repository root:
CMD
.\create-azuresql.local.cmd

4.2 What happens during create

The create task (-t createazuresql) does the following:

  1. Selects subscription.
  2. Creates resource group (if needed).
  3. Creates Azure SQL server.
  4. Creates Azure SQL database.
  5. Adds a firewall rule for the current client IP (best effort).
  6. Stores Azure SQL settings in local settings.json.
  7. Pushes Azure SQL configuration to Business Central client configuration (if endpoint setup is valid).

5. Remove Azure SQL

5.0 Command documentation: -t removeazuresql

Purpose:

  1. Remove Azure SQL resources that were provisioned for DataMigrate Pro.
  2. Clean Azure SQL values from local settings.json to prevent stale connection usage.

Call with explicit values:

CMD
DataMigratePro.exe -t removeazuresql ^
	--subscription "<SUBSCRIPTION_ID_GUID>" ^
	--resourcegroup "<RESOURCE_GROUP_NAME>" ^
	--azuresqlserver "<AZURE_SQL_SERVER_NAME>" ^
	--azuresqldatabase "<AZURE_SQL_DATABASE_NAME>"

Example:

CMD
DataMigratePro.exe -t removeazuresql --subscription "22222222-2222-2222-2222-222222222222" --resourcegroup "DataMigrateProRG" --azuresqlserver "srv-dmp-prod-001" --azuresqldatabase "DMP"

Call using values already stored in settings.json (only command/task):

CMD
DataMigratePro.exe -t removeazuresql

5.0.1 settings.json values cleared by removeazuresql

The command clears these Azure SQL fields after removal:

  1. AzureSqlTenantId
  2. AzureSqlSubscriptionId
  3. AzureSqlResourceGroup
  4. AzureSqlLocation
  5. AzureSqlServerName
  6. AzureSqlDatabaseName
  7. AzureSqlAdminUser
  8. AzureSqlAdminPassword
  9. AzureSqlClientIp
  10. AzureSqlConnectionStringRead
  11. AzureSqlConnectionStringWrite
  12. AzureSqlChunkSize (reset to 0)
  13. AzureSqlTransferCodeunitId (reset to 0)

Operational purpose of clearing these settings:

  1. Prevent accidental reuse of deleted Azure SQL endpoints.
  2. Avoid running staging transfers with outdated credentials/servers.
  3. Keep local environment state aligned with actual Azure resources.
  1. Open remove-azuresql.template.cmd.
  2. Replace placeholders:
  • <SUBSCRIPTION_ID_GUID>
  • <RESOURCE_GROUP_NAME>
  • <AZURE_SQL_SERVER_NAME>
  • <AZURE_SQL_DATABASE_NAME>
  1. Save as a working script (for example remove-azuresql.local.cmd).
  2. Verify that all placeholder values were replaced with correct values for your environment.
  3. Run:
CMD
.\remove-azuresql.local.cmd

5.2 What happens during remove

The remove task (-t removeazuresql) does the following:

  1. Selects subscription.
  2. Deletes the Azure SQL database (if specified/found).
  3. Deletes the Azure SQL server.
  4. Clears persisted Azure SQL values from local settings.json.

Notes:

  1. If database/server are already missing, the operation continues safely.
  2. Remove is destructive. Confirm names before running.

6. Configuration Usage (API vs Azure SQL)

Per migration table, DataMigrate Pro decides transport mode using SQL table [BC Migration Tables].

Primary transport control field:

  1. [Use Azure SQL for PutData]
  • 0 = use normal API transfer path.
  • 1 = use Azure SQL staging path.

Compatibility behavior:

  1. If the new field is not present in older environments, fallback may use [Synchronize to Database] = 3 to enable Azure SQL staging.

Important distinction:

  1. [Use Azure SQL for PutData] controls transport path (API vs Azure SQL staging).
  2. [Synchronize to Database] controls target database selection logic and legacy compatibility.

7. Typical End-User Workflow

  1. Prepare a local copy from create-azuresql.template.cmd and fill all placeholders.
  2. Run the local create script.
  3. Verify successful output/log lines for server/database creation.
  4. In migration configuration, enable Azure SQL transport for the tables that should stage through Azure SQL:
  • Set [Use Azure SQL for PutData] = 1 for those tables.
  • Keep it 0 for tables that should continue using API path.
  1. Execute migration tasks (putdata / putalldata).
  2. Prepare a local copy from remove-azuresql.template.cmd and fill all placeholders.
  3. When Azure SQL staging is no longer required, run the local remove script.

8. Validation Checklist

After create:

  1. Azure SQL server and database exist in the expected resource group.
  2. Local settings.json contains Azure SQL values.
  3. BC client configuration has Azure SQL settings (when integration endpoint is configured).

After transport configuration:

  1. Target migration table row has [Use Azure SQL for PutData] = 1 for Azure SQL path.
  2. Logs show Azure SQL staging mode for affected tables.

After remove:

  1. Azure SQL database/server are deleted.
  2. Local settings.json Azure SQL entries are cleared.

9. Troubleshooting

  1. Azure CLI not found:
  • Re-run script as Administrator.
  • Verify az --version works in terminal.
  1. Placeholder text still visible in script:
  • If values such as <SUBSCRIPTION_ID_GUID> or <AZURE_SQL_SERVER_NAME> are still present, stop and replace all placeholders before running.
  1. Invalid admin username/password:
  • Azure SQL admin login name and password must meet Azure SQL requirements.
  1. Subscription/resource errors:
  • Check that subscription, resource group, server, and database names are correct.
  • Verify your Azure role permissions.
  1. BC configuration push failed after create:
  • Azure resources can still be created successfully.
  • Validate -w endpoint and SaaS auth settings (--tenantid, --clientid, --clientsecret) and rerun if needed.

10. Security Recommendations

  1. Do not commit real credentials to source control.
  2. Prefer template scripts with placeholders for shared documentation.
  3. Rotate Azure SQL admin credentials regularly.
  4. Use least-privilege Azure roles for create/remove operations.