Here is the script which you can execute to get a list of the permissions over databases.
SELECT * FROM fn_my_permissions (NULL, 'DATABASE'); GO
Here is the result set of above query when I executed with sa or admin access.

Here is the result set of above query when I executed with public access.
Reference: Pinal Dave (https://blog.sqlauthority.com)
3 Comments. Leave new
Hello Pinal,
I tried above code with sa login but i got nothing.
Please see below result.
entity_name subentity_name permission_name
——————————————————————————————————————————– ——————————————————————————————————————————– ————————————————————
(0 row(s) affected)
BR,
Neha
Thanks Pinal. I have learnt something new today!
Thank you Eng PINAL DAVE, very easy, very helpful.