Reputation: 93
I am facing problem regarding database permissions. I have created my database named FCProject
. I created a login for that database in 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.
Because I want only FC login to be able to view or modify data of FC database in SQL Server Management Studio.
I have tried creating a login through Management Studio. Is there any problem in creating login? Or something else? Please help
Upvotes: 1
Views: 2774
Reputation: 755391
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
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 loginsand then you're fine - only those accounts that you've defined explicitly can access your FCLogin
database and use it.
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
Upvotes: 1