You friend is trying to familiarize herself with the DBCC commands with SQL server. Which command can she/he use to check if indexes are in the proper sorted order and if page offsets are reasonable?
-
DBCC CHECKDB
-
DBCC NEWALLOC
-
DBCC CHECKALLOC
-
DBCC CHECKCATALOG
A
Correct answer
Explanation
DBCC CHECKDB is the primary command used to check the logical and physical integrity of all objects in the database, including verifying that index pages are correctly sorted and that offsets are reasonable. CHECKALLOC focuses specifically on disk space allocation structures.