I have a SQL Server
server which has around 50 databases on it.
I wish to create a new Login
for a client who wishes to have access to their database.
But I don't want to give them access to the other 49 databases.
How can I do this?
I have a SQL Server
server which has around 50 databases on it.
I wish to create a new Login
for a client who wishes to have access to their database.
But I don't want to give them access to the other 49 databases.
How can I do this?
UPDATE:
You'll also want to goto
Security -> Server Roles
, and forpublic
check the permissions forTSQL Default TCP/TSQL Default VIA/TSQL Local Machine/TSQL Named Pipes
and remove theconnect
permissionI think this is what we like to do very much.
If you already created a user and assigned to that database before by doing
then kindly delete it by doing below and follow the steps
For more information please follow the links:
Hiding databases for a login on Microsoft Sql Server 2008R2 and above
For anyone else out there wondering how to do this, I have the following solution for SQL Server 2008 R2 and later:
This will address exactly the requirement outlined above..