Use the dbcc-checktable tag for questions about how to implement, understand, and diagnose issues with the SQL Server DBCC CHECKTABLE command

DBCC CHECKTABLE checks the integrity of all the pages and structures that make up a table or an indexed view in Microsoft SQL Server.

For the specified table, DBCC CHECKTABLE checks for the following:

  • Index, in-row, LOB, and row-overflow data pages are correctly linked.

  • Indexes are in their correct sort order.

  • Pointers are consistent.

  • The data on each page is reasonable, included computed columns.

  • Page offsets are reasonable.

  • Every row in the base table has a matching row in each nonclustered index, and vice-versa.

  • Every row in a partitioned table or index is in the correct partition.

  • Link-level consistency between the file system and table when storing varbinary(max) data in the file system using FILESTREAM.

To check every table in a database, use the DBCC CHECKDB command.