Best way to export SQL Server database to sqlite (or SQL Server Compact)

Ronan Lamour picture Ronan Lamour · Sep 26, 2014 · Viewed 14.3k times · Source

Do someone know what would be the best way to transform a big SQL Server database to sqlite or SQL Server compact ?

SQL Server database should be around 50-70Gb.

There are some examples on internet (script schema) but I didn't find anything concluding about data.

Answer

ErikEJ picture ErikEJ · Sep 26, 2014

You can use my Exportsqlce tool to create .sql files in sqlite format from a SQL Server database. Then run them using sqlite3.exe

Download command line tools from https://github.com/ErikEJ/SqlCeToolbox/releases/tag/3.5.2

Export2SQLCE.exe "Data Source=(local);Initial Catalog=Northwind;Integrated Security=True" Northwind.sql sqlite

Good luck!

(I also have SSMS and VS extensions that allow you to do this from a GUI)