Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

SQL server how to see user permissions on objects

SELECT dp.NAME      AS principal_name,
       dp.TYPE_DESC AS principal_type_desc,
       o.NAME       AS object_name,
       p.PERMISSION_NAME,
       p.STATE_DESC AS permission_state_desc
FROM sys.database_permissions p
         LEFT OUTER JOIN sys.all_objects o
                         ON p.MAJOR_ID = o.OBJECT_ID
         INNER JOIN sys.database_principals dp
                    ON p.GRANTEE_PRINCIPAL_ID = dp.PRINCIPAL_ID
					where dp.name = 'TMM209411'
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #SQL #server #user #permissions #objects
ADD COMMENT
Topic
Name
9+1 =