SQL Flow Field Guide

DENY XML Schema Collection Permissions

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

DENY permissions on xml schema collection

What changes

Input
principal and securable names
Output or change
permission metadata

Syntax at a glance

DENY permission [ ,...n ] ON XML SCHEMA COLLECTION :: [ schema_name . ] XML_schema_collection_name TO <database_principal> [ ,...n ] [ CASCADE ] [ AS <database_principal> ]

Work example

A principal must be blocked from changing an XML schema collection.

Trace typed XML columns and procedure parameters that depend on the collection.

Check your work The principal cannot alter the schema and valid typed XML remains usable.

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