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

查看:89
本文介绍了用户没有访问数据库的权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Windows 身份验证连接到数据库.我认为我当前的用户无权访问它.

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

如何让用户登录到 SQL Server 并使用数据库?

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

推荐答案

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

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:

  • 打开管理工作室
  • 连接到数据库所在的数据库服务器并在对象资源管理器中查找安全节点.
  • 展开安全节点并在登录列表中查找用户名.如果您使用 Windows 身份验证 DOMAIN\Username 格式,则用户名应与用户的 Windows 登录名相同.
  • 如果用户在那里,您将需要授予该用户对数据库的适当权限(读取、执行 SP 等).
  • 如果用户不在,您需要添加他们.
  • 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.

这篇关于用户没有访问数据库的权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆