DataMigrate Pro·Operation
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:
- Create Azure SQL resources for DataMigrate Pro.
- Remove Azure SQL resources when they are no longer needed.
- 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:
- Azure subscription with permissions to create/delete:
- Resource Groups
- Azure SQL Server
- Azure SQL Database
Azure CLI installed and authenticated (
az login).DataMigrate Pro executable available in the repository root:
DataMigratePro.exe
- Required access to your BC and SQL migration setup.
3. Files You Can Use
The repository provides these scripts:
create-azuresql.template.cmd
- Same flow with placeholders (safe template).
remove-azuresql.template.cmd
- Same flow with placeholders (safe template).
Important:
- End users should use template files only.
- 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:
- Provision an Azure SQL Server + Azure SQL Database for DataMigrate Pro staging transfers.
- Persist all required Azure SQL runtime settings into local
settings.jsonso follow-up runs can reuse them. - Open a firewall rule for the current client IP when possible.
Required call pattern:
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:
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.
AzureSqlTenantId: tenant used for Azure authentication and traceability.AzureSqlSubscriptionId: subscription used for create/remove operations.AzureSqlResourceGroup: default resource group for later Azure SQL commands.AzureSqlLocation: default Azure region for the provisioned resources.AzureSqlServerName: server identifier reused by add/remove flows.AzureSqlDatabaseName: database identifier reused by transfer/provisioning workflows.AzureSqlAdminUser: SQL admin login used for management and connection string generation.AzureSqlAdminPassword: SQL admin password used for generated connection strings.AzureSqlClientIp: resolved client IP that was used for firewall opening.AzureSqlConnectionStringRead: read connection string for staging reads.AzureSqlConnectionStringWrite: write connection string for staging uploads.AzureSqlChunkSize: persisted default chunk size for Azure SQL staging uploads.
Operational purpose of writing these settings:
- Avoid re-entering Azure SQL values on every run.
- Enable follow-up tasks (
putdata,putalldata,addazuresqlfirewallrule,removeazuresql) to use consistent defaults. - Keep staging transport reproducible across environments.
4.1 Recommended: Start from template
- Open
create-azuresql.template.cmd. - 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>
- Save as a working script (for example
create-azuresql.local.cmd). - Verify that all placeholder values were replaced with correct values for your environment.
- Run it from repository root:
.\create-azuresql.local.cmd4.2 What happens during create
The create task (-t createazuresql) does the following:
- Selects subscription.
- Creates resource group (if needed).
- Creates Azure SQL server.
- Creates Azure SQL database.
- Adds a firewall rule for the current client IP (best effort).
- Stores Azure SQL settings in local
settings.json. - 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:
- Remove Azure SQL resources that were provisioned for DataMigrate Pro.
- Clean Azure SQL values from local
settings.jsonto prevent stale connection usage.
Call with explicit values:
DataMigratePro.exe -t removeazuresql ^
--subscription "<SUBSCRIPTION_ID_GUID>" ^
--resourcegroup "<RESOURCE_GROUP_NAME>" ^
--azuresqlserver "<AZURE_SQL_SERVER_NAME>" ^
--azuresqldatabase "<AZURE_SQL_DATABASE_NAME>"Example:
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):
DataMigratePro.exe -t removeazuresql5.0.1 settings.json values cleared by removeazuresql
The command clears these Azure SQL fields after removal:
AzureSqlTenantIdAzureSqlSubscriptionIdAzureSqlResourceGroupAzureSqlLocationAzureSqlServerNameAzureSqlDatabaseNameAzureSqlAdminUserAzureSqlAdminPasswordAzureSqlClientIpAzureSqlConnectionStringReadAzureSqlConnectionStringWriteAzureSqlChunkSize(reset to0)AzureSqlTransferCodeunitId(reset to0)
Operational purpose of clearing these settings:
- Prevent accidental reuse of deleted Azure SQL endpoints.
- Avoid running staging transfers with outdated credentials/servers.
- Keep local environment state aligned with actual Azure resources.
5.1 Recommended: Start from template
- Open
remove-azuresql.template.cmd. - Replace placeholders:
<SUBSCRIPTION_ID_GUID><RESOURCE_GROUP_NAME><AZURE_SQL_SERVER_NAME><AZURE_SQL_DATABASE_NAME>
- Save as a working script (for example
remove-azuresql.local.cmd). - Verify that all placeholder values were replaced with correct values for your environment.
- Run:
.\remove-azuresql.local.cmd5.2 What happens during remove
The remove task (-t removeazuresql) does the following:
- Selects subscription.
- Deletes the Azure SQL database (if specified/found).
- Deletes the Azure SQL server.
- Clears persisted Azure SQL values from local
settings.json.
Notes:
- If database/server are already missing, the operation continues safely.
- 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:
[Use Azure SQL for PutData]
Compatibility behavior:
- If the new field is not present in older environments, fallback may use
[Synchronize to Database] = 3to enable Azure SQL staging.
Important distinction:
[Use Azure SQL for PutData]controls transport path (API vs Azure SQL staging).[Synchronize to Database]controls target database selection logic and legacy compatibility.
7. Typical End-User Workflow
- Prepare a local copy from
create-azuresql.template.cmdand fill all placeholders. - Run the local create script.
- Verify successful output/log lines for server/database creation.
- In migration configuration, enable Azure SQL transport for the tables that should stage through Azure SQL:
- Set
[Use Azure SQL for PutData] = 1for those tables. - Keep it
0for tables that should continue using API path.
- Execute migration tasks (
putdata/putalldata). - Prepare a local copy from
remove-azuresql.template.cmdand fill all placeholders. - When Azure SQL staging is no longer required, run the local remove script.
8. Validation Checklist
After create:
- Azure SQL server and database exist in the expected resource group.
- Local
settings.jsoncontains Azure SQL values. - BC client configuration has Azure SQL settings (when integration endpoint is configured).
After transport configuration:
- Target migration table row has
[Use Azure SQL for PutData] = 1for Azure SQL path. - Logs show Azure SQL staging mode for affected tables.
After remove:
- Azure SQL database/server are deleted.
- Local
settings.jsonAzure SQL entries are cleared.
9. Troubleshooting
- Azure CLI not found:
- Re-run script as Administrator.
- Verify
az --versionworks in terminal.
- 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.
- Invalid admin username/password:
- Azure SQL admin login name and password must meet Azure SQL requirements.
- Subscription/resource errors:
- Check that subscription, resource group, server, and database names are correct.
- Verify your Azure role permissions.
- BC configuration push failed after create:
- Azure resources can still be created successfully.
- Validate
-wendpoint and SaaS auth settings (--tenantid,--clientid,--clientsecret) and rerun if needed.