Search notes:

SQL Server: sys.database_permissions

select
   class_desc,
   case dbp.class
        when 0 then db_name()
        when 1 then object_name(major_id)
        when 3 then schema_name(major_id)
   end class_to_securable,
   user_name(dbp.grantor_principal_id) grantor,
   user_name(dbp.grantee_principal_id) grantee,
   dbp.permission_name
from
   sys.database_permissions dbp;
Github repository about-MSSQL, path: /administration/schemas/sys/objects/views/database/permissions/select.sql
Note: sys.database_permissions does not list the permissions of fixed database roles.

See also

The sys schema
sys.database_permissions basically selects from the base table sys.sysprivs
sys.server_permissions

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1740440785, '18.189.141.106', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/databases/SQL-Server/administration/schemas/sys/objects/views/database_permissions(58): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78