DBCC DBREINDEX failing

  • I am currently perplexed by the following error I receive when running DBCC DBREINDEX

    Msg 605, Sev 21: Attempt to fetch logical page (1:193369) in database 'SNLEDIT' belongs to object 'FinlAvgCalc2', not to object 'Instn'. [SQLSTATE HY000]

    I have many databases that I run a job that reindexes all tables the command is

    DBCC dbreindex(@name,'', 95)

    A couple of weeks ago one of the databases began failing with the above error msg. The tables effected always varies. I am concerened since I thought the reindex command was used to prevent the above condition. Does anyone have any ideas on a workaround for this condition.

    Your help is greatly appreciated.

    Dan

     

  • It looks like you have problem with database integrity. Run dbcc checkdb to your database and dbcc checktable to 'FinlAvgCalc2' to try to fix it.

    For details, See BOL DBCC CHECKDB and DBCC CHECKTABLE.

  • Allen

    Thanks for the response. Once a week I run

    DBCC CHECKDB (@dbname) WITH ALL_ERRORMSGS

    and I get the following result

    CHECKDB found 0 allocation errors and 0 consistency errors in database 'SNLEDIT'. [SQLSTATE 01000]

    When the errors started happening I would run

    dbcc checktable

    on the two tables in the error msg and always receive the following

    DBCC results for 'FinlAvgCalc2'.

    There are 400030 rows in 80008 pages for object 'FinlAvgCalc2'.

    DBCC execution completed. If DBCC printed error messages, contact your system administrator.

    with no errors reported.

    Any additional ideas would be greatly appreciated.

    Thanks

    Dan

     

  • Run dbcc dbreindex again after dbcc checktable.

    Or drop all indexes and rebuild them.

  • I was under the impression that the DBCC DBREINDEX was rebuilding the indexes?

  • Yes. It does. Drop and receate each indexes are an alternative.

  • That being the case any idea as to why then the DBCC DBREINDEX is failing to start with?

  • That's interesting Dan.   I am kind of wondering what the state of the sysindexes table is.   Is the FirstIAM value out of whack??  That probably isn't the problem.  I am kind of curious as to why this is happening.

     

    Anyhoooos... I too would rebuild the table and indexes


    "Keep Your Stick On the Ice" ..Red Green

Viewing 8 posts - 1 through 7 (of 7 total)

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