DataMigration.exe Missing from 4.0.x Packages

I have set up a new server using version 4.0.9. When it came to migrating the database to SQL, I was unable to find the DataMigration.exe tool.

I didn’t check every download, but versions 4.0.1, 4.0.8, and 4.0.9 don’t have this file included. It is in the root of the 3.9.15 ZIP file.

Can the tool included with 3.9.15 be used to migrate a v4 database?

Product: PowerShell Universal
Version: 4.0.9

Same issue here. I have tried the DataMigration.exe from 3.9.15 without any issue.
Always create a backup of your server before doing such a task.

Of course be sure that the service account has DB_Owner rights on the SQL Database. You have to create the DB by yourself.

Stop the service first.

I have use the following command, since the one on the docs page doesn’t work.

DataMigration.exe -l C:\ProgramData\UniversalAutomation\database.db -s Server=<SQL_SERVER>;Database=<DB_NAME>;Trusted_Connection=True;TrustServerCertificate=True

After succesfully migration your DB to SQL, you have to change your appsettings.json (C:\ProgramData\PowerShellUniversal).

  • Replace plugin to SQL.
  • Replace ConnectionString to “Server=<SQL_SERVER>;Database=<DB_NAME>;Trusted_Connection=True;TrustServerCertificate=True”

Replace/Rename the SQL Lite DB (C:\ProgramData\UniversalAutomation\database).

Start service.

Open systemLog file (C:\ProgramData\PowerShellUniversal). It must contain the following line:
2023-08-12 15:23:30.413 +02:00 [INF] Starting Hangfire Server using job storage: ‘SQL Server: <SQL_SERVER>@<DB_NAME>

Thanks for your reply.

I migrated the database but had a couple of problems, so I have reverted to the LiteDB database.

The first problem I had was that I could not log in after migrating. I thought it might be because I hadn’t changed the password (this is brand new install). However, after going back to the LiteDB database, changing the password, dropping and recreating the SQL database, then migrating again, I still couldn’t log in. I had to create an authentication.ps1 file to log in.

The second problem I had was that after logging in, the product was showing as unlicensed.