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