Error "CREATE DATABASE permission denied"

I have installed SQL SERVER 2008 R2 on my system with Windows XP operating system installed.

Whenever I try to create a new database, the error message appears:

CREATE DATABASE PERMISSION DENIED IN DATABASE 'master'.(Microsoft SQL Server, Error:262)

      

+3


source to share


7 replies


the user did not have permission, but now I have fixed that.



-3


source


When starting SQL Server Management Studio, use the "sa" user, not the "Windows-User". It looks like the Windows user doesn't have permission.



+4


source


Try to give the user your registration in CREATE ANY DATABASE Permission and try again. Take a look at the documentation about creating a new database

+3


source


Right click and run "SQL Server Management Studio" as Administrator.

+3


source


Insufficient resolution is the cause of this error. Give the user the role "dbcreater"check dbcreater role

+1


source


If you are in a situation where you only have access to the SQL / view database, you should consider the following:

  • Do you have an alternate login or credentials for the sa user? If so, try it first and, if necessary, grant your other login rights using the Security / Logins / .. section of your database in the Object Explorer pane ( see Ahmet Arslan's answer ).

  • If you have access to another Windows user account that has access through Windows Authentication, try running ssms.exe as a different user using the "runas" command. Full details and explanation here in the answer from SqlRyan .

  • If you have old databases from a previous Windows installation configured with Windows Authentication (and you don't / don't remember the sa account credentials). In this situation, you can recreate your past user account from a previous Windows installation. Make sure this new account has the same domain and username as your previous account. Log in with the recreated account and grant the current (or "real") user account sufficient permissions (see # 1 above). After confirming that you have regained access, you can delete the updated user account.

0


source


With this problem, I noticed that I was connected using Windows Authentication . Then I disconnected and used SQL Server Authentication . This is good now.

0


source







All Articles