Get DB Check Constraint Health
mssql_db_check_constraintsDetect untrusted or disabled SQL Server check constraints and provide the WITH CHECK CHECK CONSTRAINT fix to restore optimizer trust and reveal invalid rows.
Instructions
Check constraints that are untrusted or disabled, with the ALTER TABLE ... WITH CHECK CHECK CONSTRAINT fix. The optimizer ignores untrusted constraints, and they may hide invalid rows. For foreign keys use mssql_db_foreign_keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| databaseName | No | Target database. Defaults to connected database. |