SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


repair index


repair index

Author
Message
HBK_4700
HBK_4700
Right there with Babe
Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)

Group: General Forum Members
Points: 727 Visits: 1834
Hi - I need to repair index in 6.5 version

please provide me DBCC command


Thanks
MVDBA
MVDBA
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3055 Visits: 860
in SQL 6.5 you would use the command DBCC CHECKDB

MVDBA
David Webb-CDS
David Webb-CDS
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1558 Visits: 8586
What,exactly, are you trying to repair? Did DBCC return an error on an index? If so, could you please post the error returned. That will help the folks here to know what sort of process you need to use to get the index fixed.



And then again, I might be wrong ...
David Webb
HBK_4700
HBK_4700
Right there with Babe
Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)Right there with Babe (727 reputation)

Group: General Forum Members
Points: 727 Visits: 1834
One of the table is corrupt and I could not find SQL 6.5 command to fix it.
Not sure if an index or data issue

Error messages

Msg 624, Level 20, State 1
Attempt to retrieve row from page via RID failed because the requested RID has a higher number than the last RID on the page. Rid pageid is 0x6 and row num is 0xffffed7c.Page pointer = 0x24c19000, pageno = 2814043, status = 0x101, objectid = 1968010042, indexid = 0.
The SQL Server is terminating this process.


DBCC CHECKTABLE(TABLE1)
Checking TABLE1
The total number of data pages in this table is 6231.
Table has 33443 data rows.
Msg 625, Level 20, State 1
Could not retrieve row from logical page 2814038 via RID because the entry in the offset table (= 0) for that RID (= 6) is less than or equal to 0.
DBCC execution completed. If DBCC printed error messages, see your System Administrator.
David Webb-CDS
David Webb-CDS
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1558 Visits: 8586
I'm not sure this is fixable. Do you have a good backup? Can you BCP the data out (I'm guessing not)?



And then again, I might be wrong ...
David Webb
Elliott Whitlow
Elliott Whitlow
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10056 Visits: 5314
I think I would immediately copy all the data out of that table that I could get. Otherwise you could easily lose it all.

Also do you have a good backup?

If it is just an index corrupted then rebuild it, AFTER you copy the data out..

CEWII
David Webb-CDS
David Webb-CDS
SSCommitted
SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)SSCommitted (1.6K reputation)

Group: General Forum Members
Points: 1558 Visits: 8586
If I recall correctly, index 0 is the heap in a table with no clustered index. So it looks like the data pages are messed up. Still, getting the data out and rebuilding the table are the best options at this point. If that doesn't work, restoring from a backup or restoring the database to another name and copying out that table into the current DB would be the next step.



And then again, I might be wrong ...
David Webb
Elliott Whitlow
Elliott Whitlow
SSChampion
SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)SSChampion (10K reputation)

Group: General Forum Members
Points: 10056 Visits: 5314
I'm with David on this..

I'd also be curious what caused the corruption in the first place..

As a further question, why are you still using SQL 6.5?

CEWII
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search