SQL Flow Field Guide

DENY Database Principal Permissions

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

DENY permissions on database principal

What changes

Input
principal and securable names
Output or change
permission metadata

Syntax at a glance

DENY permission [ ,...n ] ON { [ USER :: database_user ] | [ ROLE :: database_role ] | [ APPLICATION ROLE :: application_role ] } TO <database_principal> [ ,...n ] [ CASCADE ] [ AS <database_principal> ]

Work example

A principal must be blocked from an operation on a database principal.

Review user and role ownership, identity administration, and inherited database permissions.

Check your work The test principal cannot change the named user or role.

Open Microsoft Learn for full syntax, permissions, and details for your version.