Check one permission
Read the current session's permission without changing access.
What you are trying to do
A reviewer must check a database permission before requesting a role change.
Work through it
- Read the permission name and database scope.
- Interpret one as granted, zero as denied, and NULL as unknown or unavailable.
- Ask the database owner about the approved role if access is missing.
Check your work
The check changes no permission and the access request names one task and one scope.
Practice SQL
Open in SQL FlowSELECT HAS_PERMS_BY_NAME(DB_NAME(), 'DATABASE', 'VIEW DEFINITION') AS CanViewDefinitions;