NewBe, how to fix a currupt object

  • I am backing up a SQL 7 server with Backup Exec. In Backup Exec I specify the job to do a "Full check, including indexes" before the backup.

    Recently, I have started getting the following error message when the backup runs. I'm assuming that one of the indexes is currupt, and I have the Object ID, but can anyone help me in finding out which index, in which table. It seems to me that the DBCC dbrindex should be able to fix the problem. The error message is listed below.

    Table Corrupt: Object ID 1060198827, Index ID 0. Keys out of order on page (3:126301), slots 29 and 30.

    Any help would be greatly appreciated.

    Tom

  • select object_name(1060198827) will tell you which table is corrupt. Index ID 0 means this table itself corrupts not its indexes.

    You can use DBCC Checktable ('yourtablename',REPAIR_ALLOW_DATA_LOSS) to try to repair the table. These repairs can result in some data loss. If it still contain errors after the repair and should be restored from a backup.

    You can't restore single table in SQL Server 7.0 so you have to restore the database to somewhere and then copy the good table to your database.

    Edited by - Allen_Cui on 02/26/2003 09:21:39 AM

  • Ok, so far so good. Now I understand the message and I read up in BOL about DBCC Checktable. I ran the command and got:

    "Repair statement not processed. Database needs to be in single user mode."

    I know how to start the SQL Server in single users mode, can you put just a Database into Single User Mode?

  • Ok, so far so good. Now I understand the message and I read up in BOL about DBCC Checktable. I ran the command and got:

    "Repair statement not processed. Database needs to be in single user mode."

    I know how to start the SQL Server in single users mode, can you put just a Database into Single User Mode?

  • Ok, so far so good. Now I understand the message and I read up in BOL about DBCC Checktable. I ran the command and got:

    "Repair statement not processed. Database needs to be in single user mode."

    I know how to start the SQL Server in single users mode, can you put just a Database into Single User Mode?

  • Sorry, I was a little active on the "Post New Reply" button before.

    I found in BOL the sp_dboption to put the db in Single User mode, trying to figure out how to disconnect all the users before hand.

  • right click on the db in EM and then select the OPTIONS tab, and check 'restrict users' and then select 'single user'

    Aaron_Kempf@hotmail.com

    206 660 9320

    Access Data Projects are the future!!!


    Aaron_Kempf@hotmail.com
    206 660 9320
    Access Data Projects are the future!!!

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

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