January 5, 2007 at 9:36 pm
What can we see, how to detect corrupted indexes?
Many thanks in advance.
January 6, 2007 at 2:16 am
When you run the DBCC CHECKDB or DBCC CHECKTABLE, you will the output if there is any corruption...
MohammedU
Microsoft SQL Server MVP
January 6, 2007 at 11:07 am
Before running DBCC commands, could we see anything? In short, could a user feel something wrong?
Many thanks
January 6, 2007 at 2:03 pm
could a user feel something wrong?
If you put your right hand near the power supply, and you left hand over the CD drive door, similar to Vulcan mind-meld technique....
Sorry, but just couldn't resist.
Mark
January 6, 2007 at 4:27 pm
you may query the data from the table which as corruption...it is hard find anything...
Some times you know the table/index has corruption but you can query the data....you get the error only your query touch that particular corrupted page/extent/block...
MohammedU
Microsoft SQL Server MVP
January 8, 2007 at 5:55 am
I have found that corruption can become apparent if you interrogate each index in turn.
eg. For TableA, with indexes 0 ..3
select count(*) from tableA (nolock,INDEX(0))
select count(*) from tableA (nolock,INDEX(1))
select count(*) from tableA (nolock,INDEX(2))
select count(*) from tableA (nolock,INDEX(3))
The results of each query should be identical, unless there are updates to the table / corruption.
DBCC checktable ('TableA') is more elegant though.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply