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 |
|
boreddy
Posting Yak Master
172 Posts |
Posted - 2009-03-12 : 06:34:36
|
| how can we get the user role in systables |
|
|
darkdusky
Aged Yak Warrior
591 Posts |
Posted - 2009-03-12 : 08:44:43
|
| Select * from (SELECT [server_principals].[name] ,[server_principals].[type_desc] ,R.name as RoleName FROM [master].[sys].[server_principals]JOIN[master].[sys].[server_role_members]ON [server_role_members].[member_principal_id] = [server_principals].principal_idRight outer Join (SELECT name, principal_id FROM [master].[sys].[server_principals] ) as Ron R.principal_id = [role_principal_id] ) as T where name is not null order by name |
 |
|
|
boreddy
Posting Yak Master
172 Posts |
Posted - 2009-03-12 : 08:59:12
|
| Thanks for your help |
 |
|
|
|
|
|