Mit dieser Abfrage kannst du alle Berechtigungen des Benutzer "MyUser" auf der Datenbank "MyDatabase".
USE MyDatabase;
GO
SELECT
dp.name AS Benutzername,
dp.type_desc AS Benutzer_Typ,
p.permission_name AS Berechtigung,
p.state_desc AS Berechtigungsstatus,
o.name AS Objektname,
o.type_desc AS Objekttyp
FROM
sys.database_permissions AS p
JOIN
sys.database_principals AS dp ON p.grantee_principal_id = dp.principal_id
LEFT JOIN
sys.objects AS o ON p.major_id = o.object_id
WHERE
dp.name = 'MyUser';