Corrupt Indexes

  • What are the possible reasons why an index becomes corrupt?

    Is there a way I can determine how an index got corrupted?

    What is the best way to prevent index corruption?

    Robert W. Marda

    SQL Programmer

    bigdough.com

    The world’s leading capital markets contact database and software platform.

    Robert W. Marda
    Billing and OSS Specialist - SQL Programmer
    MCL Systems

  • In my experience, statistics may need updating, indexes can become fragmented, and there is the rare (I think im aware of 2, both of which have had patches for a long time, one which was numeric fields in 6.5 the other bit fields in a more recent version) problem with a specific aspect of indexes, but in general if you mean 'corrupt' like a foxpro or dbase table can get (cannot find a record or get errors opening the table/using index) then I've never seen SQL do that.

  • Hrm.. actually though I have had to rebuild indexes on a 6.5 server a couple times. I forgot about that. I think it was telling me that the sysindexes entries were bad (not the index itself), but I ended up rebuilding the index to fix it.

  • quote:


    What are the possible reasons why an index becomes corrupt?


    Hardware Disk Subsystem failure.

    quote:


    What is the best way to prevent index corruption?


    I don't see how you can determine exactly why index corrupts but running dbcc checkdb or dbcc checktable regularly will give you ideas/means to find out corrupted indexes and fix them.

  • Yes I have been using DBCC CHECKTABLE and DBCC CHECKDB. I think I have some data corruption now too. My problems seem to revolve around text data types. I suspect that the pointers to the data are messed up somehow.

    Robert W. Marda

    SQL Programmer

    bigdough.com

    The world’s leading capital markets contact database and software platform.

    Robert W. Marda
    Billing and OSS Specialist - SQL Programmer
    MCL Systems

  • You may have to bcp data out and in.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply