This documentation describes the installation and operation of the DataMigrate PRO Service Bus Listener as a Windows service under the name “DataMigrate PRO Synch Service”. The instructions are based on the available CLI references and the specifications for settings.json.
Overview
The command
DataMigratePro -t listen --install "DataMigrate PRO Synch-Service" --registration "<dein-registrierungsschlüssel>" --tenantid "<deine-tenant-id>"Carry out the following steps one after the other:
-t listenstarts the Azure Service Bus Listener of DataMigrate PRO. For productive operation, the connection settings are loaded fromsettings.json.--install "DataMigrate PRO Synch-Service DWP"installs the listener in the Windows service wrapper (launcher) and sets up the specified service name.--registration ... --tenantid ...checks and saves the registration/license key and the Azure AD client. Without a valid registration, the tool will refuse service operation after a short time.
Prerequisites
- Windows server with administrator rights (required for service installation).
- Copy of the DataMigratePro program folder (incl.
DataMigratePro.exe,settings.json). - Network access to:
- SQL Server of the Business Central databases.
- Business Central OData endpoint (
Upload_LoadData). - Azure Service Bus namespace for incoming orders.
- SQL authorizations for the service User
- At least db_reader on Business Central databases
- If the migration and mapping database has been created, give authorization to this db_owner
- Registration key (
--registration) and Azure AD Tenant ID (--tenantid).
Installation steps
- Prepare folder
- Copy the entire scope of delivery to
C:\Programme\DataMigratePro(or another destination without spaces in the path). - Make sure that
DataMigratePro.exeandsettings.jsonare accessible and that the service user is authorized to create the logs directory in the path and write log files there.
- Copy the entire scope of delivery to
- create/customize settings.json
- Create or update
settings.jsonin the installation folder according to the example in the Example configuration section.
- Create or update
- Prepare registration
- Open an administrative PowerShell.
- Navigate to the installation folder:
cd C:\Programme\DataMigratePro.
- Execute registration
- Execute the command above, but without
--install, to validate license and service bus data: - .\DataMigratePro.exe -t listen –registration “
” –tenantid “ “ - If successful, the service bus parameters (queue name, connection string) are added to
settings.json.
- Execute the command above, but without
- Install service
- Then start the final installation:.\DataMigratePro.exe -t listen –install “DataMigrate PRO Synch-Service” –registration “
” –tenantid “ “ - The launcher registers a Windows service. The log output is redirected to the Windows event log.
- Then start the final installation:.\DataMigratePro.exe -t listen –install “DataMigrate PRO Synch-Service” –registration “
- Start service
- Open
services.msc, search for DataMigrate PRO Synch-Service DWP, set the start type to Automatic and start the service.
- Open
Functionality of the service bus listener
- The listener monitors the configured
RequestQueueNamefor incoming messages. Each message triggers the DataMigrate PRO data processing pipeline. - Replies and status messages are written on
ResponseQueueName. - The loop runs continuously and uses short polling intervals (approx. 1 second) to detect new messages.
- Errors are written to the Windows event log; in the event of serious errors, the service stops with a corresponding error code.

Configuration in Business Central
- n the Business Central extension, the same
connectionIdmust be stored as in thesettings.jsonso that messages are clearly assigned to the listener. - If possible, use a uniquely generated identifier (e.g. GUID or generated password) as
connectionIdto prevent overlaps with other integrations. - The endpoint of the prepared Azure function, including the access key generated in Azure, is also stored in the Business Central configuration. This is the only way the application can successfully place messages in the service bus queue.
Example configuration (settings.json)
{
"SqlConnectionString": "Data Source=SQLSERVER;Initial Catalog=BC_PROD;Integrated Security=SSPI;",
"SourceCompany": "CRONUS AG",
"DestinationCompany": "CRONUS AG",
"SourceDatabase": "BC_PROD",
"MappingDatabase": "BC_PROD",
"MigrationDatabase": "BC_MIGRATION",
"EndpointUrl": "https://api.businesscentral.dynamics.com/v2.0/<deine-tenant-id>/Production/ODataV4/Upload_LoadData?company=CRONUS%20AG",
"BlobMagicSignature": [2, 69, 125, 91],
"IsSaaS": true,
"Environment": "Production",
"TenantInfo": {
"TenantId": "<deine-tenant-id>",
"ClientId": "<Azure AD App ID>",
"ClientSecret": "<Azure AD App Secret>"
},
"HttpClientTimeoutSeconds": 100,
"ServiceBus": {
"ServiceBusConnectionString": "Endpoint=sb://<namespace>.servicebus.windows.net/;SharedAccessKeyName=<Name>;SharedAccessKey=<Key>",
"RequestQueueName": "<deine-request-queue>",
"ResponseQueueName": "<deine-response-queue>",
"connectionId": "<deine-connection-id>"
}
}Notes:
- The
ServiceBussection is mandatory for-t listen. Missing values lead to a validation exception when the service is started. - Match the
connectionIdentered here with the configuration in Business Central. Use a unique identifier to avoid incorrect assignments. TenantInfois required for SaaS/OAuth. For on-premises operation, useIsSaaSonfalseand useBCUser/BCPasswordinstead ofTenantInfo.BlobMagicSignaturecan be adopted if there are no individual specifications.- Further optional settings such as
SqlConnectionStringMigrationorAppSourceEnabledcan be added if required.
Inspection and maintenance
- Check service status
Get-Service "DataMigrate PRO Synch-Service"in PowerShell.
- Check log outputs
- Event Viewer → Application and Service Logs → DataMigratePro.
- Adjust settings
- Stop the service beforehand, edit
settings.json, restart the service.
- Stop the service beforehand, edit
- Uninstall service
DataMigratePro.exe --uninstall "DataMigrate PRO Synch-Service"execute.
Troubleshooting
| Symptom | Cause | Solution |
|---|---|---|
| Service starts and stops immediately | Invalid or missing ServiceBus entries | settings.json check, execute registration again |
| Error message “Registration invalid” | Incorrect key or tenant ID | Check values, contact support if necessary |
| No message processing | Incorrect RequestQueueName or missing authorizations | Check queue names and SAS policy |
| OAuth authentication fails | TenantInfo Incomplete or app registration without BC authorizations | Check Azure AD app, renew secret |