Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to open a .db file (SQLite database file) from within Microsoft SQL Server Management Studio?

Right now we have a process that will grab the data from a Microsoft SQL Server database and put it into a SQLite database file that will be used by an application later on.

Is there a way to open the SQLite database file so that it can be compared to the data inside the SQL Server database... using only one SQL query?

Is there a plug-in for microsoft sql management studio? Or maybe there is another way to do this same task using only one query.

Right now we have to write two scripts... one for sql server database and one for sqlite database ... then take the output from each in the same format and put them each in their own OpenOffice spreadsheet file. Finally, we compare the two files to see if there are any differences. Perhaps there's a better way to do this.

Edit: The table columns and layouts are different so using the combo of and will not work here.

P.S. A lot of applications use SQLite internally: Well-Known Users Of SQLite

share|improve this question
Have you tried SQL Server Compact/SQLite Toolbox… – SarjanWebDev May 18 '15 at 23:53
Did you try it before asking us? If you don't have an Sqlite database to try it with, this is a good sample ... – Mawg Jun 8 '15 at 12:09
up vote 9 down vote accepted

Hi Yes it is possible to open any sql server from within management studio when you have the correct odbc driver to do so. Create an ODBC connection to the *.db3 file and call it something like SQLite then try this is a query window

-- needs to be a system odbc connection not user

EXEC sp_addlinkedserver 
   @server = 'SQLite', -- the name you give the server in studio 
   @srvproduct = '',
   @provider = 'MSDASQL', 
   @datasrc = 'SQLite' -- the name of the system odbc connection you created

This is how you get the data, you can create views using this sql as well if you like


share|improve this answer

You may want to create a linked server, if you have a provider for SQLite that SQL Server will accept.

Connect to your database and then navigate through "Server Objects", "Linked Servers" and add a new linked server. You can then use SQL Server to query the SQLite database, and compare the results directly.

Here is a tutorial for MySQL, so if you can create an ODBC connection for SQLite then you will be good to go.

share|improve this answer

It IS possible to open another type of database in Management Studio. I opened an Informix database, using a linked server to the Informix server.

share|improve this answer
This is better as a comment. Does it add to the accepted answer? – Dave M Oct 1 '15 at 17:27

If you cannot install a System DNS, then the following steps should work:

  1. Install SQLite ODBC driver from Ch. Werner (both 32 and 64 bit?)
  2. In SSMS, go to Server Objects > Linked Servers > New Linked Server... New linked server...
  3. In the window enter:
    • Linked server: EXAMPLE (or anything)
    • Provider: Microsoft OLE DB Provider for ODBC Drivers
    • Product name: example (or anything)
    • Provider string: Driver=SQLite3 ODBC Driver;Database=full-path-to-db; Linked Server Properties

You should now be able to query the SQLite DB with


as mentioned above.

share|improve this answer

You'll need an ODBC driver for SQLite before you can set up a linked server, but once you have one of those installed on your sql server, it's relatively easy to set up a linked server using it.

Example using "SpiceWorks" SQLite database

share|improve this answer

Since SQLite is an embedded database it is not possible to open it in Management Studio. And I don't believe any database server other than SQLServer can be opened from management studio!

As a solution you can use SQLite Ado.NET Provider from here

You can write a CLR Stored procedure for your database that uses above provider to do the conversions. In the end everything should be done in one query.

share|improve this answer
you can open SQL compact with SSMS at the very least. – m4tt1mus Feb 15 '12 at 6:51
@mattimus: We are talking about SQLite here!! not SQL Server Compact! – Salar Mar 5 '12 at 4:51
@ SalarKhalilzadeh and in your answer you said "And I don't believe any database server other than SQLServer can be opened from management studio!", you're incorrect. – m4tt1mus Mar 6 '12 at 20:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .