用户没有访问数据库的权限(User does not have permission to access a database)

编程入门 行业动态 更新时间:2024-10-28 06:25:51
用户没有访问数据库的权限(User does not have permission to access a database)

我正尝试使用Windows身份验证连接到数据库。 我相信我目前的用户无法访问它。

我怎样才能让用户登录到SQL Server,并使用数据库?

I'm trying to connect to a database using Windows Authentication. I believe that my current user does not have access to it.

How can I enable a user to login to SQL Server, and use the database?

最满意答案

您需要使用SQL Server Management Studio程序为用户授予访问权限。 您需要连接具有数据库管理权限的登录名。 如果你没有这些特权,你需要联系那些有特权的人。

如果确实使用这些权限登录,请打开Management Studio,连接到数据库所在的数据库服务器,然后在对象资源管理器中查找安全性节点。 展开安全性节点并在登录列表中查找用户的名称。 如果您使用的是Windows身份验证(DOMAIN \ Username格式),则用户的名称应与用户的Windows登录名称相同。 如果用户在那里,则需要授予该用户对数据库的适当权限(读取,执行SP等)。 如果用户不在那里,您需要添加它们。 权限也可以按组添加,因此您应该检查用户所属的组。

You need to use the SQL Server Management Studio program to grant access for the user. You'll need to connect in with a login that has administration privileges for the database. If you have don't have those privileges you'll need to contact someone that does.

If you do have a login with those privileges:

open Management Studio connect to the database server the database is on and look for the Security node in Object Explorer. Expand the Security node and look for the name of the user in the list of Logins. The user's name should be the same as the user's Windows login if you are using Windows Authentication DOMAIN\Username format. If the user is there, you will need to grant that user appropriate permissions to the database (read, execute SPs, etc.). If the user isn't there you will need to add them.

Permission can also be added by group so you should check for groups that the user belongs to as well.

更多推荐

本文发布于:2023-07-20 11:04:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1198662.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:权限   数据库   用户   User   access

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!