MirraSQL is a Windows command-line utility that imports Dataverse entities directly into SQL Server tables. It handles the connection to both systems, creates or updates your SQL schema to match Dataverse, and imports your records — all from a single command.
MirraSQL is currently in beta. Download it here and send us your thoughts to help shape what gets built next.
MirraSQL connects to your Dataverse environment and your SQL Server database using a saved configuration profile. When you run an import, it:
You don't need to pre-create your tables or define schemas. MirraSQL takes care of that, just make sure you have a database ready to hold the tables.
Below you can see a couple of use cases where we think MirraSQL will prove beneficial.
| Use Case | Benefit |
|---|---|
| Reporting and BI | Run Power BI, SSRS, or Excel reports against SQL instead of your live Dataverse — meaning faster reports and lower API usage |
| Data Backup and Archiving | Maintain a queryable SQL snapshot of your Dataverse data that doesn't depend on Dataverse availability |
| Feeding a Data Warehouse | Get your raw Dataverse entities into a staging schema ready for transformation into your dimensional model |
| Custom Reporting | Give your teams access to Dataverse data via standard SQL queries, without Dataverse API access or additional licences |
| Audit and Compliance | Keep a SQL-based historical record of Dataverse data that can be queried and reported on with standard database tooling |
| Cross-System Analytics | Join Dataverse data with ERP, HR, and finance records by getting everything in the same SQL database |
| Performance Offloading | Move heavy analytical queries off Dataverse entirely to avoid API throttling and reduce load on your live environment |
| Supporting Legacy Systems | Feed Dataverse data into older internal systems that can query SQL Server but cannot connect to Dataverse directly |
| Development and Testing | Quickly populate DEV or UAT databases with a copy of production Dataverse data for integration testing or report development |
| Disaster Recovery Preparation | Ensure a recent, queryable copy of your critical entities is always available in SQL Server if Dataverse becomes temporarily unavailable |
MirraSQL is available as a downloadable package for Windows Machines, making installation quick and easy. Dowload the installer package here to get up and running straight away.
Once installed open a command prompt and type MirraSQL to confirm it's working. You should see the help output with usage instructions and available commands. If it doesn't just search for the MirraSQL.cmd program to open it.
Before running your first import you need to tell MirraSQL where to connect. You'll need two things:
If you're already running DataSync then you can grab these connection details from your Data Sync Connections.
For the Dataverse Connection String you will need:
AuthType=ClientSecrethttps://yourorg.api.crm4.dynamics.comClient ID and Client Secret from the Azure Active Directory (EntraID) App used to access Dataverse. See the Microsoft Webpage here for more information on how to create this app.The final connection string should look like the following:
AuthType=ClientSecret;url=https://yourorg.api.crm4.dynamics.com;ClientId=[CLIENT_ID];ClientSecret=[CLIENT_SECRET]
You can find more examples of connection strings for different authentication types in the Microsoft Dataverse documentation.
For the SQL Database Connection String you will need:
data sourceinitial catalogIntegrated Security=true;encrypt=True;trustservercertificate=TrueTo get your SQL Server database connection string details open SQL Server Management Studio and go to database properties -> Connection details. Alternatively speak to your DBA who will be able to get it for you.
This should look something like the following:
data source=.\SQLEXPRESS;initial catalog=MirraSqlDb;Integrated Security=true;encrypt=True;trustservercertificate=True
The above example is where the server is a local SQL Express instance and the database "MirraSqlDb".
Once you have both connection strings, set them in MirraSQL with these two commands:
MirraSQL config set source="AuthType=ClientSecret;url=https://yourorg.api.crm4.dynamics.com;ClientId=[CLIENT_ID];ClientSecret=[CLIENT_SECRET]"
MirraSQL config set target="data source=.\SQLEXPRESS;initial catalog=MirraSqlDb;Integrated Security=true;encrypt=True;trustservercertificate=True"
To confirm your settings were saved correctly:
MirraSQL config show
This will present the source and target connection strings with the Client Secret being hidden.
That's all the configuration you need to get started.
With your connections set up, importing entities is a single command. Pass the logical names of the Dataverse entities you want to import:
MirraSQL import account contact systemuser
MirraSQL will connect to both systems, create the SQL tables if they don't exist, and import the records.
The codeblock below shows the output for the first time sync of the account, contact and systemuser entities. MirraSQL will fetch the schema, create the tables, and then import the records to these tables:
MirraSql Version 1.0.0 - Demo Mode (Expires 10/05/2026)
Copyright 2026 Simego Ltd
Using profile: [default]
√ Connected to Dataverse
√ Connected to SQL Server
Importing 3 entities...
[1/3] [account] 186 inserted, 0 updated, 0 deleted (4.6s)
[2/3] [contact] 570 inserted, 0 updated, 0 deleted (3.14s)
[3/3] [systemuser] 202 inserted, 0 updated, 0 deleted (2.13s)
√ Import complete
√ 3 entities, total records 958 inserted, 0 updated, 0 deleted
√ Total time: 9.87 seconds
Note: Deletes are hard deletes as it is replicating the Dataverse environment into your Database.
You can pass as many entity names as you need in a single command:
MirraSQL import account contact lead opportunity product systemuser team
Each entity is then processed in sequence with its own record count and timing, and a summary is shown at the end.
MirraSql Version 1.0.0 - Demo Mode (Expires 10/05/2026)
Copyright 2026 Simego Ltd
Using profile: [default]
√ Connected to Dataverse
√ Connected to SQL Server
Importing 7 entities...
[1/7] [account] 0 inserted, 3 updated, 0 deleted (3.91s)
[2/7] [contact] 1 inserted, 4 updated, 0 deleted (2.5s)
[3/7] [lead] 0 inserted, 0 updated, 0 deleted (0.29s)
[4/7] [opportunity] 2 inserted, 0 updated, 0 deleted (2.57s)
[5/7] [product] 1 inserted, 0 updated, 0 deleted (1.18s)
[6/7] [systemuser] 0 inserted, 0 updated, 0 deleted (1.28s)
[7/7] [team] 41 inserted, 0 updated, 0 deleted (2.53s)
√ Import complete
√ 7 entities, total records 45 inserted, 7 updated, 0 deleted
√ Total time: 14.26 seconds
Once your tables are populated from a full import, you can switch to incremental mode to pull only new and modified records by keeping track of the 'versionnumber' in the MirraSql metadata table rather than reloading everything. Use --incremental or -i:
MirraSQL import account contact systemuser --incremental
MirraSql Version 1.0.0 - Demo Mode (Expires 10/05/2026)
Copyright 2026 Simego Ltd
Using profile: [default]
√ Connected to Dataverse
√ Connected to SQL Server
Importing 3 entities...
[1/3] [account] 0 inserted, 0 updated, 0 deleted (1.74s)
[2/3] [contact] 0 inserted, 0 updated, 0 deleted (0.2s)
[3/3] [systemuser] 0 inserted, 0 updated, 0 deleted (0.2s)
√ Import complete
√ 3 entities, total records 0 inserted, 0 updated, 0 deleted
√ Total time: 2.15 seconds
Incremental mode is particularly useful when you want to minimise the time and load of each run. The typical pattern is to run a full import first to populate your tables, then use --incremental for all subsequent runs.
To extend the functionality you can combine it with a profile and log file:
MirraSQL import account contact lead opportunity --incremental --profile prod --log-file "C:\Logs\mirrasql_log"
Note the log file will be overwritten if the command is run again writing to the same output.
Once you're comfortable with the basics, profiles let you store multiple named connection configurations. This is useful when you're working across different environments such as development, UAT, and production.
Create a named profile by adding --profile [PROFILENAME] to the config set commands. For example:
MirraSQL config set source="AuthType=ClientSecret;url=https://yourorg.api.crm4.dynamics.com;ClientId=[CLIENT_ID];ClientSecret=[CLIENT_SECRET]" --profile dev
MirraSQL config set target="Server=DEVSQL;Database=MirraSqlDb;Integrated Security=true" --profile dev
MirraSQL config set source="AuthType=ClientSecret;url=https://yourorg.api.crm4.dynamics.com;ClientId=[CLIENT_ID];ClientSecret=[CLIENT_SECRET]" --profile prod
MirraSQL config set target="Server=PRODSQL;Database=MirraSqlDb;Integrated Security=true" --profile prod
To check what's stored in a profile:
MirraSQL config show --profile prod
To see all configured profiles:
MirraSQL config list
You can then use --profile or -p on any import command to target that environment:
MirraSQL import account contact --profile dev
MirraSQL import account contact --profile prod
This makes it easy to test imports against a development database before running against production.
By default MirraSQL creates tables in the dbo schema. Use --schema to target a different one:
This creates tables as crm.account, crm.contact, and crm.systemuser. Useful if you want to keep your Dataverse data isolated from other tables in the same database.
By default MirraSQL fetches records from Dataverse in pages of 5,000. For very large entities you may want to reduce this:
Reducing the page size can help with entities with large string data like attachments and files.
If your SQL tables already exist and you don't want MirraSQL to check or modify the schema, use --skip-schema-sync:
This can speed up repeated imports once your tables are set up correctly.
Arguments:
<entities> One or more Dataverse entity logical names to import (required)
Options:
-s, --schema <schema> Database schema [default: dbo]
--skip-schema-sync Skip schema synchronisation
-i, --incremental Incremental mode — only import new and modified records
--source-page-size <number> Records per Dataverse API page [default: 5000]
-p, --profile <profile> Configuration profile [default: default]
-l, --log-file <path> Path to write log output
-?, -h, --help Show help and usage
--version Show version information
MirraSQL and Data Synchronisation Studio serve different purposes and work well alongside each other.
A common pattern is to use MirraSQL for nightly full Dataverse imports into a reporting database, while Data Sync handles specific integrations that require custom logic.
MirraSQL is currently in beta, but you can download it here and give it a try against your own Dataverse environment. We're actively collecting feedback on which features matter most, so your input can directly shape what gets built next.
If you have questions or run into anything unexpected, get in touch at support@simego.com.