How to understand that a user gets database access in SQL Server -


i have been tasked auditing security on sql server. but, when @ login in sql server management studio, don't see checkbox beside master db login. how can determine databases login has access to?

if see login match user in manner, login has access database.

select sp.name 'login', dp.name 'user'  sys.database_principals dp    join sys.server_principals sp      on dp.sid = sp.sid  order sp.name, dp.name; 

you can in sql server 2005/2008


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -