Wednesday, September 26, 2012

CREATE DATABASE permission denied in database 'master'

CREATE DATABASE permission denied in database 'master'. This is what i typed in Google to solve the my problem. But Unfortunately, no results gave me the perfect answer. But what i was able to figure out is that i need sysadmin rights in sql server studio. So then i searched for add current user to sql server sysadmin role. And Bingo !!! I got the answer on first hit. And guess what, i found a script and i simply had to run it.

Here is the link for script :

http://archive.msdn.microsoft.com/addselftosqlsysadmin/Release/ProjectReleases.aspx?ReleaseId=3954

Run the script and it will ask you for the SQL Server instance name. If you don't know the name then just hit the enter.