[英]SQL Server Restrict Access to Database by Windows Authentication Mode
I am facing problem regarding database permissions. 我遇到有关数据库权限的问题。 I have created my database named
FCProject
. 我已经创建了名为
FCProject
数据库。 I created a login for that database in SQL Server Management Studio. 我在SQL Server Management Studio中为该数据库创建了登录名。 My login is working fine but all I want to restrict access to
FCProject
database through users who can log in to SQL Server through Windows authentication mode. 我的登录正常,但我想限制所有可以通过Windows身份验证模式登录SQL Server的用户对
FCProject
数据库的访问。
Because I want only FC login to be able to view or modify data of FC database in SQL Server Management Studio. 因为我只希望FC登录才能在SQL Server Management Studio中查看或修改FC数据库的数据。
I have tried creating a login through Management Studio. 我尝试通过Management Studio创建登录名。 Is there any problem in creating login?
创建登录名有什么问题吗? Or something else?
或者是其他东西? Please help
请帮忙
You are mixing up two things that should be kept separate here: 您正在混淆应在此处分开的两件事:
A login is on the server level - it gives an account (a Windows account, or a SQL Server specific account) the permission to connect to this server 登录名是服务器级别的-它授予帐户(Windows帐户或SQL Server特定帐户)连接到该服务器的权限
Each database can then define user for its own use - based on those logins. 基于这些登录-那么每个数据库都可以定义用户自己使用。
So in your case, what you need to do is to: 因此,对于您而言,您需要做的是:
FCLogin
database for just those logins FCLogin
数据库中为这些登录名创建用户 and then you're fine - only those accounts that you've defined explicitly can access your FCLogin
database and use it. 然后就可以了-只有明确定义的帐户才能访问
FCLogin
数据库并使用它。
See the Stairway to SQL Server security series of articles on SQL Server Central (very well worth registering for their contents!) which explains all the ins and outs in great detail 请参阅SQL Server Central上的Stairway to SQL Server安全性系列文章(非常值得注册其内容!),其中详细介绍了所有内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.