How to Create users in sql server 2008 R2 for accessing only one database using Management Studio.
regards, salman
How to Create users in sql server 2008 R2 for accessing only one database using Management Studio. regards, salman |
|||
|
This question appears to be off-topic. The users who voted to close gave this specific reason:
Your answer is right here in SO already: Restrict SQL Server Login access to only one database. Just in case the link is broken:
You can add an user either using SSMS or by using CREATE USER. You could use sp_adduser but it's not recommended as it will be removed in a future version of Microsoft SQL Server. You also need a login to match that user. Again, you can use SSMS or CREATE LOGIN for the task. Check BOL's page for database roles on SQL Server 2008R2, use the dropdown menu on the top of that page to switch to other version if need to. Here is the list of the roles that can be assigned:
|
|||
|
In management studio, right click Security in object explorer and choose new login. Then, on the user mapping tab, you select which databases your login can access. (Login in at the server level, and a user is at the database level). |
|||||||||
|