Created
March 27, 2020 13:57
-
-
Save radleta/228cbdea35e4802ed87676ec7d1adb57 to your computer and use it in GitHub Desktop.
List all the groups and permissions assigned to a user in SQL Server.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
[principal_id] | |
, [name] | |
, [type_desc] | |
, is_member(name) as [is_member] | |
from [sys].[server_principals] | |
where [type] in ('R','G') | |
order by [is_member] desc,[type],[name] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment