SQL Server: How to make server check all its check constraints?

前端 未结 3 650
孤独总比滥情好
孤独总比滥情好 2020-12-13 09:51

It seems that some scripts generated by Enterprise Manager* (or not, it doesn\'t matter) created check constraints WITH NOCHECK.

Now when anyone modi

3条回答
  •  隐瞒了意图╮
    2020-12-13 10:30

    Found it:

    Checks all constraints on all tables in the current database, whether the constraint is enabled or not:

    DBCC CHECKCONSTRAINTS WITH ALL_CONSTRAINTS
    

    To check only enabled constraints:

    DBCC CHECKCONSTRAINTS
    

提交回复
热议问题