title: SQL Server: How to make server check all its check constraints?
body: <p>It seems that some scripts generated by Enterprise Manager* (or not, it doesn't matter) created check constraints <strong>WITH NOCHECK</strong>.</p>
  <p>Now when anyone modifies the table, <a href="http://sqlblog.com/blogs/tibor_karaszi/archive/2008/01/12/non-trusted-constraints.aspx" rel="noreferrer">SQL Server is stumbling across failed check constraints</a>, and throwing errors.</p>
  <p>Can i make SQL go through all its check constraints, and check them?</p>
  <p>Running:</p>
  <pre><code>sp_msforeachtable 'ALTER TABLE ? CHECK CONSTRAINT all'
  </code></pre>
  <p>only enables previously disabled check constraints, it doesn't actually check them.</p>
  <h2>Footnotes</h2>
  <p>* SQL Server 2000</p>