.show database schema violations

Applies to: ✅ Azure Data Explorer

This command identifies schema violations within a database. It performs a comprehensive validation of functions, materialized views, external tables, data mappings, continuous exports, and various policies.

Permissions

You must have at least Database Viewer or Database Monitor permissions to run this command. For more information, see role-based access control.

Syntax

.show database DatabaseName schema violations

Parameters

Name Type Required Description
DatabaseName string The name of the database for which to validate the schema.

Returns

The command returns a table of schema validation issues within a database. The table contains the following columns:

Column name Type Description
Entity kind string The type of database entity.
Entity name string The name of the entity.
Property string The property of the entity being validated. For example, this value could be the name of a policy. For a list of policies, see Policies overview.
Reason string A message explaining the reason for the validation failure.

Example

The following example returns a table with schema violations for the MyDatabase database.

.show database MyDatabase schema violations

Output

Entity kind Entity name Property Reason
Function DiagnosticMetricsExpand Request is invalid and cannot be processed: Semantic error: SEM0100: 'mvexpand' operator: Failed to resolve table or column expression named 'DiagnosticRawRecords'
ContinuousExport SampleMetricsExport Continuous export job 'SampleMetricsExport' is disabled
MaterializedView DailyCovid19 Invalid Materialized view job: 'DailyCovid19'. Entity ID 'Covid19' of kind 'MaterializedView' was not found.