How do you open an SDF file (SQL Server Compact Edition)?

agsamek picture agsamek · Dec 23, 2009 · Viewed 388.8k times · Source

I have an SDF file and I would like to retrieve its schema and query it with some UI. How can I do this? I have no Visual Studio installed on the machine and I would like to install as little software as possible.

Answer

Shankar Kamble picture Shankar Kamble · May 22, 2013

Download and install LINQPad, it works for SQL Server, MySQL, SQLite and also SDF (SQL CE 4.0).

Steps for open SDF Files:

  1. Click Add Connection

  2. Select Build data context automatically and Default (LINQ to SQL), then Next.

  3. Under Provider choose SQL CE 4.0.

  4. Under Database with Attach database file selected, choose Browse to select your .sdf file.

  5. Click OK.