Created
April 21, 2017 05:56
-
-
Save jsgao0/5d6124b1d07258e06a9ca8f64149fff6 to your computer and use it in GitHub Desktop.
Find all users' permissions.
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 permission_name, state_desc, type_desc, U.name, OBJECT_NAME(major_id) | |
from sys.database_permissions P | |
JOIN sys.tables T ON P.major_id = T.object_id | |
JOIN sysusers U ON U.uid = P.grantee_principal_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment