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

I have a SQL Server DB but have no idea how to connect to it to run some queries. I naively assumed that I'd be able to open up a DB in a similar fashion to Microsoft Access, but can't seem to do this. I have a copy of what I think is the primary DB file with .mdf suffix.

After a bit of searching, I've come across Database .NET (suggested in a SuperUser answer). Running this I'm trying to figure out how to connect to the SQL Server DB but have no clue how to go about this. Is there a specific syntax to use? Also, how to authenticate to a remote machine running a SQL Server DB?

Any ideas appreciated as I haven't got a clue!=

share|improve this question
up vote 6 down vote accepted

The quickest method would be to download SSMSE (SQL Server Management Studio Express).

It is free and works well.

SSMSE for SQL 2005

SSMSE for SQL 2008

alt text

share|improve this answer

You generally can't simply connect to the database file; you need to connect to the database server that is using that database file, then connect to the database within the server. SQL Server Express is a free version, or you can use SQL Server proper if you have the right licenses

share|improve this answer

You must log in to answer this question.

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