Unable to open the physical file - Access is denied

Tags: .NET, ASP.Net, General Software Development, SQL, SSMS

I’m an using Admin account on Windows 7 and try to attach umbraco database to my local SQL 2008 R2 instance. I’m getting the following error:

Unable to open the physical file "D:\Tech\umbraco\build\App_Data\umbraco.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)

What the heck? I tried to brainstorm what the issue is and found out that I didn’t open my SSMS with “Run As Administrator” (although I’m using Admin account in Win7 and the same to use SSMS). Once I did that, I was able to attach the DB without any issue. What a bummer!

Hope this helps!

4 Comments

Comments have been disabled for this content.