Attach (open) mdf file database with SQL Server Management Studio

user198003 picture user198003 · Oct 10, 2013 · Viewed 104.1k times · Source

Can you help me how can I open *.MDF file of database created with VisualStudio 2010, into SQL Server Management Studio?

Tried to attach by myself, but I cannot navigate to that file for (I guess) some security reason.

Answer

Rakeshyadvanshi picture Rakeshyadvanshi · Jan 24, 2015

I had the same problem.

system configuration:-single system with window 7 sp1 server and client both are installed on same system

I was trying to access the window desktop. As some the answer say that your Sqlserver service don't have full access to the directory. This is totally right.

I solved this problem by doing a few simple steps

  1. Go to All Programs->microsoft sql server 2008 -> configuration tools and then select sql server configuration manager.
  2. Select the service and go to properties. In the build in Account dialog box select local system and then select ok button.

enter image description here

Steps 3 and 4 in image are demo with accessing the folder