SQL Server User Mapping - Limit view of databases for a user

Posted by Jaime on Server Fault See other posts from Server Fault or by Jaime
Published on 2010-02-02T19:20:25Z Indexed on 2010/03/14 10:05 UTC
Read the original article Hit count: 377

Filed under:
|

Hi there,

I am adding a new Login with SQL Server Authentication. I set its Server Role as public and then went into User Mapping, selecting the only database this user should have access to. I then change the Default Schema to dbo and made this user the db_owner.

I then connect to the instance using the new user's credentials and I can see not only the database he should have access to but all the other attached databases.

How can I limit this user to just see the database he has access to?

Thanks in advance!

© Server Fault or respective owner

Related posts about sql-server

Related posts about user-settings