Happy new year everyone!
So over the last few weeks I needed to import a lot of GIS and geographical data from a .db file into an existing Sql database.
After asking “the oracle” aka Google for an option on what the best approach would be I found a few posts that led nowhere safe.
Some of the options deals with SqLite ODBC drivers then mapping it as a linked server. Normally this would not be a bad idea, but having then to write a bunch of queries to port the data over to my database just seems like too much work. Besides for that, you might not always have access to set up a linked server.
The best option that I found was a tool called “esf database migration toolkit” but it turns out that you have to buy it. With our South African exchange rate it just seems a little steep, otherwise it would have been an excellent tool.
So as any good developer would do, I wrote my own little tool. In just 4 hours I had a tool that can read the schema from my SqLite database, create the structure with the correct data types on the MS Sql Database and then transport the data for me. The tool is not perfect, but it works.
If you want to use the tool for your own project, or just have a peek at my code you can find it on my GitHub https://github.com/TechnoDezi/SqLiteToMSSqlConvert