I recently upgraded my machine to Windows 8 and there are so many changes that are worth mentioning as part of security enhancements for SQL Server 2012 and Windows 8 combinations. We will discuss in various blogs in the future, but here is one of the question I got from one of my ASP.NET developer that after he upgraded he started getting this below error for attaching an existing database.
Textually the error is something like:
TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server ‘xxxxxx’. (Microsoft.SqlServer.Smo)
Unable to open the physical file "C:\SQLSamples\AdventureWorks2008R2_Data.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)
Worst was, the link for help from SSMS was also not getting him anywhere. Here are the sequence of things that I asked:
- Which OS are you running Windows 7 or Windows 8? Ans: Windows 8
- Has UAC been turned off or on? Ans: Off (asked why … but that is a different discussion)
- Great, did you start SSMS in Administrator mode and try? Ans: Well, UAC is off right? Then why should I.
- Me: Trust me :)
- Ans: Woala, it is now working.
The solution is not specific to Windows 8 but can be on Windows 7 too, tough it will be interesting to see how we have made “Security by default” more restrictive on Windows 8. Simple solutions for simple tasks :)
Do tell me if you have encountered this. Hope this helps.Share this article
This entry was posted on Friday, May 4th, 2012 at 10:44 and is filed under Technology. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.