RE: Permissions
RE:权限
Program - Microsoft SQL Server Management Studio v.17.1
程序 - Microsoft SQL Server Management Studio v.17.1
When attempting to create a new database through Object Explorer, I get the following error:
尝试通过对象资源管理器创建新数据库时,出现以下错误:
截图#1
To fix this, I did the following and got another error:
为了解决这个问题,我做了以下操作并得到了另一个错误:
截图#2
I have searched the internet and all posts and articles say that I need to log in as administrator or SA
. I am logged in as administrator and still can not gain permission to create a database.
我搜索了互联网,所有帖子和文章都说我需要以管理员或SA身份登录。我以管理员身份登录,但仍无法获得创建数据库的权限。
How do I assign permission to the SA
account to create a new database?
如何为SA帐户分配权限以创建新数据库?
1 个解决方案
#1
0
Problem here is that you are logged in with the local Windows Administrator account. You have two logins for your SQL Server instance as can be seen in your Image #2. One is SA (SQL Admin). The other is BUILTIN\USERS. That is a default group which every user that logs into the machine will be a part of. But unless you give that group permissions, or create other logins (I recommend this), you will be very limited to what you can do.
这里的问题是您使用本地Windows Administrator帐户登录。您可以在Image#2中看到两个登录SQL Server实例的登录信息。一个是SA(SQL Admin)。另一个是BUILTIN \ USERS。这是一个默认组,登录到计算机的每个用户都将成为其中的一部分。但除非你给该组授予权限,或者创建其他登录(我建议这样做),否则你将非常局限于你可以做的事情。
As you have found, that user group cannot modify permissions, especially for the SA user. The SA user is special, you cannot modify SA permissions at all. This is why you are receiving errors (partly because you don't have permissions to change them with the user you are logged in as, and partly because SA permissions cannot be modified).
如您所见,该用户组无法修改权限,尤其是SA用户。 SA用户很特殊,根本无法修改SA权限。这就是您收到错误的原因(部分原因是您没有权限使用您登录的用户更改它们,部分原因是因为无法修改SA权限)。
The resolution to your issue is to login with the SA account. You will need to choose "SQL Login" at the login screen, as opposed to Windows login. SSMS will prompt you for a password. This password was configured by the person who installed the SQL instance. If the person who installed SQL Server did not specify a password, it will be most likely be a blank password or "Password123".
您的问题的解决方案是使用SA帐户登录。您需要在登录屏幕上选择“SQL登录”,而不是Windows登录。 SSMS将提示您输入密码。此密码由安装SQL实例的人员配置。如果安装SQL Server的人没有指定密码,则很可能是空密码或“Password123”。
Once you are logged into the SA account, you can create new SQL or Windows Authentication logins and and provision them permissions as needed.
登录SA帐户后,您可以创建新的SQL或Windows身份验证登录,并根据需要为其配置权限。
#1
0
Problem here is that you are logged in with the local Windows Administrator account. You have two logins for your SQL Server instance as can be seen in your Image #2. One is SA (SQL Admin). The other is BUILTIN\USERS. That is a default group which every user that logs into the machine will be a part of. But unless you give that group permissions, or create other logins (I recommend this), you will be very limited to what you can do.
这里的问题是您使用本地Windows Administrator帐户登录。您可以在Image#2中看到两个登录SQL Server实例的登录信息。一个是SA(SQL Admin)。另一个是BUILTIN \ USERS。这是一个默认组,登录到计算机的每个用户都将成为其中的一部分。但除非你给该组授予权限,或者创建其他登录(我建议这样做),否则你将非常局限于你可以做的事情。
As you have found, that user group cannot modify permissions, especially for the SA user. The SA user is special, you cannot modify SA permissions at all. This is why you are receiving errors (partly because you don't have permissions to change them with the user you are logged in as, and partly because SA permissions cannot be modified).
如您所见,该用户组无法修改权限,尤其是SA用户。 SA用户很特殊,根本无法修改SA权限。这就是您收到错误的原因(部分原因是您没有权限使用您登录的用户更改它们,部分原因是因为无法修改SA权限)。
The resolution to your issue is to login with the SA account. You will need to choose "SQL Login" at the login screen, as opposed to Windows login. SSMS will prompt you for a password. This password was configured by the person who installed the SQL instance. If the person who installed SQL Server did not specify a password, it will be most likely be a blank password or "Password123".
您的问题的解决方案是使用SA帐户登录。您需要在登录屏幕上选择“SQL登录”,而不是Windows登录。 SSMS将提示您输入密码。此密码由安装SQL实例的人员配置。如果安装SQL Server的人没有指定密码,则很可能是空密码或“Password123”。
Once you are logged into the SA account, you can create new SQL or Windows Authentication logins and and provision them permissions as needed.
登录SA帐户后,您可以创建新的SQL或Windows身份验证登录,并根据需要为其配置权限。