Skill 2.1.4
Design and implement object-level permissions
Key Concepts
Permissions are granted to users and, preferably, to database roles with GRANT, removed with REVOKE and explicitly blocked with DENY, which overrides any grant. Securables form a hierarchy: a permission on a schema, such as GRANT SELECT ON SCHEMA::Sales TO SalesReader, covers every current and future object in it, and column-level grants limit SELECT or UPDATE to listed columns. Fixed roles such as db_datareader are broad, so custom roles are better for least privilege.
Ownership chaining lets a user run a view or procedure that reads tables with the same owner without permissions on those tables, which is how procedures act as the only path to data. Dynamic SQL breaks the chain because it runs in its own scope; EXECUTE AS or module signing with a certificate grants the needed permissions instead. Special permissions also apply to new objects, such as EXECUTE ON EXTERNAL MODEL::name for AI functions and EXECUTE ANY EXTERNAL ENDPOINT for sp_invoke_external_rest_endpoint.