0

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?

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

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

4

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).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy