In my database, no one is adding, removing, or disabling constraints outside of patches and releases. All constraints are enabled and trusted. There is a regular check for untrusted or disabled constraints in case one were to be accidentally introduced. DBCC CHECKDB
is also run on a regular basis to check for corruption.
Is there a benefit to running DBCC CHECKCONSTRAINTS
just as regularly as DBCC CHECKDB
? Or am I causing unnecessary work? When should DBCC CHECKCONSTRAINTS
usually be run?
Best Answer
From Microsoft documentation:
You only urn this after repairing a database and against the objects with constraints to confirm those constraints are still valid.
Quote from The Accidental DBA (Day 13 of 30): Consistency Checking by Erin Stellato