SDU Tools: Retrust Foreign Keys and Check Constraints in SQL Server
While doing my consulting work, I often come across Foreign Keys and Check Constraints that are not trusted. What this means is that either:
- They were created without checking existing data
- They were disabled for a period and re-enabled without re-checking the existing data
I like to see this fixed whenever possible. To make that easy, in our free SDU Tools for developers and DBAs, we added two stored procedures to help: RetrustForeignKeys and RetrustCheckConstraints.
2019-05-01