Migrating between SQLite and SQL Server
Published 08 March 2019
SmartAssembly 7.0 introduced SQLite database support to store information about error and feature usage reports, builds, and obfuscation.
SQLite database is used by default but you can switch to SQL Server anytime.
If you switch to a SQL Server database after using the default database for some time, you must transfer the data from your SQLite database into the SQL Server database. If you don't transfer the data, you won't be able to view any of your old error/feature reports, receive new reports, or decode a stack trace for any previously released builds.
Getting the migration tool
We have created a command-line migration tool to help move your SmartAssembly database from SQLite to SQL Server, SQL Server Express, SQL Server Developer Edition or LocalDB, and vice versa. Moving from SQLite to SQL Server may be useful if you want to use SmartAssembly on multiple computers.
To download SQLite migration tool, please contact our support.
To confirm what database is currently used by SmartAssembly, go to Tools => Options and look for Database Options section.
Using the migration tool
Once you downloaded the migration tool, you need to run the executable MigrateDataCore.exe to perform the migration. You can copy data from SQLite to SQL Server or from SQL Server to SQLite.
Moving from SQLite to SQL Server
Run the following in the command line:
MigrateDataCore.exe /source=SQLite /sourceLocation="C:\ProgramData\Red Gate\SmartAssembly 8\SmartAssemblySQLite.db" /target=SQLServer /targetLocation=".\SQLEXPRESS"
You should see the migration taking place, and finally a Transfer completed
message will appear:
Moving from SQL Server to SQLite
Run the following in the command line:
MigrateDataCore.exe /source=SQLServer /sourceLocation=".\SQLEXPRESS" /target=SQLite /targetLocation="C:\ProgramData\Red Gate\SmartAssembly 8\SmartAssemblySQLite.db"
You should see the migration taking place, and finally a Transfer completed
message will appear:
Migration tool options
/source | Required. Type of database you're migrating from. Valid values are: SQLite or SQLServer. |
/sourceLocation | This option is required if Points to a location of the database you're migrating from. For SQLite it is a path of the database file, for example: C:\ProgramData\Red Gate\SmartAssembly 8\SmartAssemblySQLite.db For SQL Server it's a host and instance name, for example: .\SQLEXPRESS |
/sourceConnectionString | This option is required if Connection string of the database you're migrating from. For example, password-protected SQLite file: Data Source=c:\mydb.db;Version=3;Password=myPassword; For example, SQL Server with standard authentication: Server=localhost;Database=SQLEXPRESS;User Id=sa; Password=password; |
/target | Required. Type of database you're migrating to. Valid values are: SQLite or SQLServer. |
/targetLocation | This option is required if Points to a location of the database you're migrating to. For SQLite it is a path of the database file, for example: C:\ProgramData\Red Gate\SmartAssembly 8\SmartAssemblySQLite.db For SQL Server it's a host and instance name, for example: .\SQLEXPRESS |
/targetConnectionString | This option is required if Connection string of the database you're migrating to. For example, password-protected SQLite file: Data Source=c:\mydb.db;Version=3;Password=myPassword; For example, SQL Server with standard authentication: Server=localhost;Database=SQLEXPRESS;User Id=sa; Password=password; |