trouble of sysindexes

  • I using: DBCC CHECKDB ('mydb', REPAIR_ALLOW_DATA_LOSS)

    The returned Messages were:

    Server: Msg 8929, Level 16, State 1, Line 1 Table Corrupt: table ID 2, index ID 255,

    page (1:312). Test (m_freeCnt == freeCnt) failed.

    What's happend to sysindexes?

    Who can help me ?

  • Index ID 255 indicates there is a text/image column in the table. It maybe corrupt.

    bcp sysindexes out

    truncate table sysindexes

    bcp sysindexes in

    Before you do that, backup your database and set direct updates cto system tables using sp_configure 'allow update', 1

  • First thanks for you.I execute the follow script :

    sp_configure 'show advanced options',1

    go

    sp_configure 'allow update', 1

    then I restart the SQL Server service

    then I execute:

    truncate table sysindexes

    the reply is:

    could not allow truncate systemtable 'sysindexes'!

    so that I execute:

    delete from sysindexes

    the reply is:

    could not find the row of index ID 255 for object ID 2,connection broken

    Now,what I can do?

  • You have either conatct microsoft or restore from your database backup.

  • I would find the table that sysindexes is refering to and drop the index on that table.  Run the check again and see if there is still an error in the sysindexes table.  There is also an undocumented procedure called sp_fixindex, it rebuilds indexes on system tables.  Unfortunately it does not function on either the sysobjects or sysindexes tables.

    Let us know

    Tom

  • Thanks everyone.The problem was solved on my computer.(The customer's DB has resored by backup)

    I executed :

    sp_Msforeachtable @command1="print '?' dbcc dbreindex('?')"

    reindex all the user table,then run the check again no error message shown.But I remmber I executed this script on the customer's computer at first,it was inefficacy!

    who has more opinion at this?

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

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