question

BjornPorgilsson avatar image
BjornPorgilsson asked

Cannot open mdf file

I had Microsoft SQL Server Express 2012 installed already. I just installed the Microsoft SQL Server Management Studio Express and tried to open my mdf file. I get an error message that says: There is no editor available for 'C:\Inetpub\wwwroot\intranet\app_data\intranet.mdf). Make sure the application for the file type (.mdf) is installed. Did I do something wrong? I just clicked through the defaults in the Management Studio Express install. How can I get this to work?
mdf
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

JohnM avatar image JohnM commented ·
How did you exactly try to open the file?
0 Likes 0 ·
BjornPorgilsson avatar image BjornPorgilsson commented ·
Guys, can help me? I would be grateful for any advice.
0 Likes 0 ·
Jeff Moden avatar image Jeff Moden BjornPorgilsson commented ·
Yes. Please see the ThomasRushton ♦♦ answer on this thread.
1 Like 1 ·
JohnM avatar image JohnM BjornPorgilsson commented ·
How did you exactly try to open the file? Through SSMS? When you say "open" physically opening the file or attempting to attach it?
0 Likes 0 ·
morrishall avatar image
morrishall answered
If the file doesn't open you can try to open it using a [mdf tool][1]. just to avoid any possible confusion: in sql management studio, connect to your instance, and open the databases folder. in the context menu of that folder, choose "attach database". [1]: https://www.openfiletool.com/mdfopen.html
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image
ThomasRushton answered
The .mdf file is not a file that you open with SQL Server Management Studio; it's a database file that you need to attach to SQL Server itself, and then query using SSMS. For a quick overview, check MS's "[Attach a Database][1]" document. [1]: https://docs.microsoft.com/en-us/sql/relational-databases/databases/attach-a-database
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

BjornPorgilsson avatar image
BjornPorgilsson answered
Thank you guys for your feedback and help. Thank you!
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.