“CREATE DATABASE permission denied” error

非 Y 不嫁゛ 提交于 2020-01-02 07:45:30

问题


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

Whenever I try to create a new database it displays an error:

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

回答1:


When you start SQL server management studio use 'sa' user and not Windows-User. Looks like Windows-user does not have permission.




回答2:


Right-click and run "SQL Server Management Studio" as administrator.




回答3:


Try to grant the user your loged in the CREATE ANY DATABASE Permission then try again. Take a look at the documentation about creating a new Database




回答4:


Cause of this error is insufficient permission. Give the user "dbcreater" role




回答5:


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

  1. Do you have an alternate login or the sa user login credentials? If so, try this first and, if necessary, grant your other login sufficient privileges via the Security/Logins/.. section of your database in the Object Explorer panel (see Ahmet Arslan's answer).

  2. If you have account access to another Windows user who has access via Windows Authentication, try running ssms.exe as the other user via the "runas" command. Full details and explanation here in the answer from SqlRyan.

  3. If you have old databases from a previous Windows installation that had been configured with Windows Authentication (and you do not have/remember the sa account credentials). In this situation, you can recreate your past user account from your previous Windows installation. Be sure this new account has the same Domain and Username as your previous account. Login via the recreated account, and give your current (or "real") user account sufficient permissions (see #1. above). Once you confirm that you have restored access, you can then delete the recreated user account.




回答6:


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



来源:https://stackoverflow.com/questions/14625682/create-database-permission-denied-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!