Jeg tror, du kan ringe til sys.fn_my_permissions
:
execute as user = 'SomeUserName' -- Set this to the user name you wish to check
select * from fn_my_permissions(null, 'DATABASE') -- Leave these arguments, don't change to MyDatabaseName
order by subentity_name, permission_name
revert
Dette gav mig de samme resultater som den SSMS-mulighed, du nævnte.