SQL Server and Vista – Create Database permission denied

While I am a fan of Vista and UAC, I have to admit there are times when other applications really cause it to be annoying, tonight it was SQL Express causing me pain.  I wanted to try one of Microsoft sample’s, so I downloaded the zip, extracted it, loaded Visual Studio 2008 and hit F5.  At this point, the debugger stepped in and told me there was an error opening the database connection. 

“CREATE DATABASE permission denied in database ‘master’.rnAn attempt to attach an auto-named database for file <>App_DataMyDB.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share.”

To create a database on SQL you need local admin permissions, as the application was automatically attaching the database I had to run Visual Studio as Administrator before I could execute it.  Just find it a bit annoying that you need access to Master to attach a SQL Express database as the whole point is for it to be zero friction.

Technorati Tags: ,

3 thoughts on “SQL Server and Vista – Create Database permission denied”

  1. What I do is easy, I use SQL Server Management Studio Express and runit with administrator privileges, add the dba roles to my user account in security and voila! it would never happen again!

  2. I’ve tried running SQL Management studio as an administrator as well as several other things I’ve found as possible solutions. Every single one says I don’t have permission. This is completely retarded. SQL 2008 and Vista is a complete joke.

Leave a Reply

Your email address will not be published. Required fields are marked *