Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I create a login in SQL Server 2008 R2, and when that user connects to a database, it can see all the logins in the security logins. Can I deny access to watch the logins of the database?

share|improve this question

migrated from stackoverflow.com Apr 6 '13 at 8:55

This question came from our site for professional and enthusiast programmers.

1 Answer 1

Either if it's a Windows or SQL login, then by default, if it has only the PUBLIC role, won't be able to see anything except SA and himself. No other login (Windows or SQL) on the machine will be visible, if he hasn't some other server permissions.

Example for that behavior (both test logins have only the Public role): new Windows user new SQL login the Sysadmin login

So, if a login can see more than himself, it must've had some privileges assigned. It should be in the login properties.

Some other easy way to see it is by scripting the login: right click -> script login as - create to - and see if it has any server role assigned to it (role assignments are at the end of the script).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.