Quantcast
Channel: Forum SQL Server Database Engine
Viewing all articles
Browse latest Browse all 15889

How to detect corrupted index?

$
0
0

Hi,

We have a production Windows desktop app which runs against a SQL Server 2008 R2 database.  (It was originally developed using SQL Server 2005, but was switched to 2008 at least a year ago.  After all, this is November 2012.) This app has been in production several years at several different sites, with essentially no problems.  Lately, at one of the sites, there have been two instances of index corruption within a month.

I suspect some sort of underlying systemic problem, but that is not my question here.  We are working that aspect of it.

The problem manifests when rows in a gridview sort and are displayed out of order.  Rebuilding all the indexes solved the problem both times.  (It is very reproducible by restoring a database backup from before the fix.)

However, none of the diagnostic commands, such as "DBCC CHECKDB", "DBCC PAGE" or "DBCC SHOWCONTIG" give any error msg or indication of any problem that I can see. 

So my question is:  are there any ways to determine if an index is corrupted without actually opening the app and looking for the offending behavior?  Specifically, is there some syntax of DBCC or something similar that I am missing?  Am I misinterpreting the output of SHOWCONTIG?

Thanks.

--Dan


Dan Hurwitz


Viewing all articles
Browse latest Browse all 15889

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>