Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
bobmcclellan
Starting Member
46 Posts |
Posted - 2012-01-20 : 09:48:18
|
I need to check to see if a useris in a specific role....How would I query by login to seewhat roles a user is a member of...Thanks in advance,..bob |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2012-01-24 : 20:32:15
|
Depending on which set of Roles you are interested in, there are a set of system tables that you can make use of:sys.server_principals can be used to filter a set of Logins and a set of server Rolessys.server_role_members will tell you which Logins are members of which server Rolessys.database_principals can be used to get a set of database Users and Rolessys.database_role_members will tell you which Users are members of which database Roles=================================================Men shout to avoid listening to one another. -Miguel de Unamuno |
 |
|
|
|
|