user802599
user802599

Reputation: 828

SQL how to check database data validity?

Is there a simple way to run a check on the databases after turning constrains back on, to check things like:

foreign keys still exist in their primary tables, primary key are unique, etc...

I am working with MS-SQL Server 2005.

Upvotes: 1

Views: 1728

Answers (1)

user802599
user802599

Reputation: 828

Mitch Wheat linked to the correct answer.

DBCC CHECKCONSTRAINTS WITH ALL_CONSTRAINTS

Upvotes: 1

Related Questions