---
title: "Command Overview DataMigrate Pro"
id: "997952"
type: "post"
slug: "command-overview-datamigrate-pro"
published_at: "2025-09-12T12:30:32+00:00"
modified_at: "2026-09-02T06:07:13+00:00"
url: "https://ioi.gmbh/en/2025/09/12/command-overview-datamigrate-pro/"
markdown_url: "https://ioi.gmbh/en/2025/09/12/command-overview-datamigrate-pro.md"
excerpt: "Register the product You receive the secret-key with the demo license or by email once you have placed an official order Define the interfaces Both the SQL Server database and the Business Central instance have to be made known to..."
taxonomy_category:
  - "DataMigrate Pro"
  - "Support &amp; Documentation"
---

Contents

- [Register product](#register-product)
- [Define interfaces](#define-interfaces)
- [Transfer of the mapping configuration](#transfer-of-the-mapping-configuration)
- [Transfer of all master and setup data](#transfer-of-all-master-and-setup-data)
- [Transfer of all posted documents and entries](#transfer-of-all-posted-documents-and-entries)
- [Transfer of changed data](#transfer-of-changed-data)
- [Transfer of individual tables](#transfer-of-individual-tables)
- [Receiving data](#receiving-data)
- [Deleting data in Business Central](#deleting-data-in-business-central)
- [Running codeunits](#running-codeunits)
- [Running DataMigratePro as a service](#running-datamigratepro-as-a-service)
- [Import of images and files into Business Central (not yet implemented)](#import-of-images-and-files-into-business-central-not-yet-implemented)
- [How it works:](#how-it-works)
- [Example:](#example)
- [Requirements:](#requirements)
- [Supported file formats:](#supported-file-formats)

### Register product

You receive the `secret-key` with the demo license or by e-mail after an official order

```
DataMigratePro --registration <secret-key> --tenantid <TenantID>
```

### Define interfaces

Both the SQL Server database and the Business Central instance have to be made known to the program for further work.

To enable a data transfer, a so-called app resource must be created, configured in Business Central and given the corresponding permissions. Further details are provided in the documentation [How to Register Business Central App with API Permissions in Azure Portal – NAVUSER](https://www.navuser.com/how-to-register-business-central-app-with-api-permissions-in-azure-portal/)

```
DataMigratePro /
  --sqlconnection "Data Source=localhost;Initial Catalog=Demo Database NAV (6-0);Integrated Security=SSPI;" /
  -w "https://api.businesscentral.dynamics.com/v2.0/<TenantID>/<Environment>/ODataV4/Upload_LoadData?company=<Company>" /
  --tenantid <TenantID> --clientid <ClientID> /
  --clientsecret <Client Secret> /
  --sourcecompany <Source Company> /
  --mappingdatabase <Mappin
  --destinationcompany <Destination Company>
```

After the interfaces have been defined with the command above, DataMigratePro has created the file `settings.json`.

```
{
  "SqlConnectionString": "Data Source=localhost;Initial Catalog=Demo Database NAV (6-0);Integrated Security=SSPI;",
  "SourceDatabase": "Demo Database NAV (6-0)",
  "SourceCompany": "<Source Company>",
  "DestinationCompany": "<Destination Company>",
  "TenantInfo": {
    "TenantId": "<TenantID>",
    "ClientId": "<ClientID>",
    "ClientSecret": "<Client Secret>"
  },
  "BlobMagicSignature": [ 2, 69, 125, 91 ],
  "EndpointUrl": "https://api.businesscentral.dynamics.com/v2.0/<TenantID>/<Environment>/ODataV4/Upload_LoadData?company=<Company>",
  "MappingDatabase": "Migration"
}
```

### Transfer of the mapping configuration

The following command transfers the mapping configurations from the source system to the target system

```
DataMigratePro -t saveconfiguration
```

The following command transfers the mapping configurations from the target system to the source system

```
DataMigratePro -t loadconfiguration
```

### Transfer of all master and setup data

Once the Navision database has been extended with the configuration tables, the first transfer can be started.

```
DataMigratePro -t putalldata --automapping
```

The switch `putalldata`sends all table contents whose category is **master data** or **setup** to Business Central.

### Transfer of all posted documents and entries

With `putalldata`, the data in the target table is deleted before the data is transferred even if the option `Delete before Transfer` has been set in the configuration for the respective table.

```
DataMigratePro -t putalldata --tablegroup "3,4" --automapping
```

### Transfer of changed data

If the change log is active for tables in Navision, the following command sends only the changes to Business Central.

```
DataMigratePro -t putalldata --changesonly 1 --automapping
```

### Transfer of individual tables

If data is to be generated from your own queries and sent to Business Central, a mapping file must be created beforehand in addition to the actual command. Here is the command first.

```
DataMigratePro -t putdata -s 50149  -i "SELECT Feld1,Feld2 FROM Datenbank.dbo.MeineTabelle"  -m mappingMeineTabelle.mapping.json
```

A matching mapping file could then look like this:

```
{
    "MeineTabelle": [
        {
            "FieldNo": 1,
            "FieldName": "Feld 1",
            "MappedName": "Feld1",
            "Validate": false
        },
        {
            "FieldNo": 2,
            "FieldName": "Feld 2",
            "MappedName": "Feld2",
            "Validate": false,
            "Format": "yyyy-MM-ddTHH:mm:ss"
        }
    ],
    "ValidateOnInsert": false,
    "ValidateOnModify": false,
    "ValidateOnDelete": false
}
```

### Receiving data

If you want to determine what was last sent to Business Central, you first have to query this information with a command:

```
DataMigratePro -t getdata -s 50005 -n "BC Table Statistics" -m mapping/TableStatistics.mapping.json
```

You can likewise read the current structure of the tables in Business Central into the configuration database

```
DataMigratePro -t getdata -s 2000000058 -v "WHERE(Field1=1(1))" -n "BC Table" -m mappingAllObjWithCaption.mapping.json
```

```
DataMigratePro -t getdata -s 2000000041 -n "BC Field" -m mappingField.mapping.json
```

The first command loads all available tables, while the second reads out the associated fields. The corresponding tables `BC Table` and `BC Field` are updated afterwards.

### Deleting data in Business Central

Complete content or a filtered set of records can be deleted with `deletedata`. In the following command, the record of the Payment Terms table with the primary key LM is deleted.

```
DataMigratePro -t deletedata -s 3 -v "WHERE(Field1=1(LM)"
```

### Running codeunits

The following command runs codeunit 50001.

```
DataMigratePro -t execute -s 50001
```

### Running DataMigratePro as a service

You can either run DataMigratePro as a permanent background service by installing it as a service.

```
sc create DataMigrateProService binPath= ""C:\path\to\DataMigratePro.exe" --service 8000" start= auto
```

Or you can initiate this temporarily on the command line

```
DataMigratePro --service 8000
```

The port number can be chosen freely. When you call the function `SendDataToBusinessCentral` in the supplied codeunit `BC Migration Manager` with RecordRef as the only parameter, exactly this record is sent to Business Central immediately, but asynchronously. Beforehand, the local configuration in Navision specified the PC name and the port on which this service runs.

### Import of images and files into Business Central (not yet implemented)

The parameter `-t importimages` allows a directory structure to be read in automatically and files to be uploaded into the Business Central system. These files are assigned to a **Media** or **Mediaset** field of a specific table. After the import, the field in question contains a GUID that references the **Tenant Media** table, in which the actual files are stored.

**Command syntax:**

```
DataMigratePro -t importimages -s <TableNo> --field <FieldName> --sourcepath "<path to directory structure>"
```

**Parameter description:**

- -s <TableNo>: Specifies the target table in Business Central into which the images are imported.
- --field <FieldName>: Specifies the target field in the table that is configured as Media or Mediaset.
- --sourcepath "<path to the directory structure>": specifies the source directory with the files to be imported.

### How it works:

1. Scan directory: The specified source directory is searched recursively in order to identify all supported file types. The respective directory name determines the primary key of the target table.
2. Upload files: every file is uploaded as a blob into the Tenant Media table. A new GUID is created for the file in the process.
3. Link to the target table: the generated GUID is entered in the specified media or media set field of the target table.
4. Storage in a tenant media set: if a media set is used, the uploaded files are linked to a tenant media set.

### Example:

```
DataMigratePro -t importimages -s 50000 --field "Produktbild" --sourcepath "C:\Produktbilder"
```

- This command imports all images from C:\Produktbilder into the media field Produktbild of table 50000 (e.g. items).
- The images are stored in Tenant Media, and after the import the field values in the item table contain the corresponding GUIDs.

### Requirements:

- The target table must contain a Media or Mediaset field.
- The Business Central instance must be configured for the use of media/mediaset fields.

### Supported file formats:

- Images: jpg, png, gif, bmp, tiff
- Documents: pdf, txt, docx

About the author

#### Sascha Marquardt

Responsible for the partner programme, the licensing business and commercial project delivery.

Keep reading## More from the IOI blog

[DataMigrate Pro DataMigrate PRO Synch-Service Setting up and running the service bus listener as a Windows service – from the prerequisites to settings.json 24. October 2025 · 4 minutes](https://ioi.gmbh/en/2025/10/24/datamigrate-pro-synch-service/)
[DataMigrate Pro Working with Configuration Data Six ways to move configurations between Business Central, the local installation and a ZIP archive – with the matching commands 23. October 2025 · 2 minutes](https://ioi.gmbh/en/2025/10/23/working-with-configuration-data/)
[DataMigrate Pro Step-by-Step Guide for the Migration to Business Central From the AppSource install to the first migration run – the complete DataMigrate Pro sequence 9. October 2025 · 3 minutes](https://ioi.gmbh/en/2025/10/09/step-by-step-guide-migration-to-business-central/)

## From reading to action. Book your upgrade check.

In the free upgrade check we analyse your current Navision or NAV version and show you the direct path to Business Central – including effort, sequence and a fixed-price range.

[Book a free Upgrade-Check →](/en/business-central-upgrade-check/)
[Give us a quick call: +49 214 8402 3000](tel:+4921484023000)

✓ Directly from any Navision or NAV version

✓ Live test while the legacy system keeps running

✓ C/AL→AL conversion included

✓ Fixed-price range and timeline afterwards
