Solved

clustered key corruption

Posted on 2013-01-22
3
363 Views
Last Modified: 2013-01-30
does the below indicate the clustered key corrupted in this table?

what may be the solution to go to restore this table (5 rows ) without data loss, if possible?

Table error: Object ID 145802425, index ID 1, partition ID 72057606569459712, alloc unit ID 72057606616907776 (type In-row data). The low key value on page (1:530232) (level 0) is not >= the key value in the parent (1:513691) slot 264.
Msg 8933, Level 16, State 1, Line 2
Table error: Object ID 145802425, index ID 1, partition ID 72057606569459712, alloc unit ID 72057606616907776 (type In-row data). The low key value on page (1:530233) (level 0) is not >= the key value in the parent (1:513691) slot 265.
Msg 8934, Level 16, State 2, Line 2
Table error: Object ID 145802425, index ID 1, partition ID 72057606569459712, alloc unit ID 72057606616907776 (type In-row data). The high key value on page (1:537792) (level 0) is not less than the low key value in the parent (0:1), slot 0 of the next page (1:530232).
Msg 8934, Level 16, State 3, Line 2
Table error: Object ID 145802425, index ID 1, partition ID 72057606569459712, alloc unit ID 72057606616907776 (type In-row data). The high key value on page (1:537792) (level 0) is not less than the low key value in the parent (0:1), slot 0 of the next page (1:530232).
Msg 2511, Level 16, State 2, Line 2
Table error: Object ID 145802425, index ID 1, partition ID 72057606569459712, alloc unit ID 72057606616907776 (type In-row data). Keys out of order on page (1:537800), slots 2 and 3.
CHECKDB found 0 allocation errors and 5 consistency errors in table 'T_POS_DET' (object ID 145802425).
0
Comment
Question by:25112
3 Comments
 
LVL 39

Assisted Solution

by:lcohan
lcohan earned 250 total points
Comment Utility
Please see comments at:

http://dba.stackexchange.com/questions/15280/how-do-i-fix-this-corrupted-page

I suggest you run a DBCC CHECKTABLE WITH ALL_ERRORMSGS, NO_INFOMSGS and make sure you have a good backup available just in case. If it is possible expand DBCC at DB level and/or if you have downtime available try drop/recreate the CLUSTERED index but only as last resort.
0
 
LVL 69

Accepted Solution

by:
ScottPletcher earned 250 total points
Comment Utility
You could try a repair that could not lose data, as that error looks like it could be "fixable".

You'll have to put the database into single_user mode, and repair can be slow on a large table, but it might recover the rows for you:


USE <your_db_name>

ALTER DATABASE <your_db_name>
SET SINGLE_USER WITH ROLLBACK IMMEDIATE -- **WILL KILL ALL CURRENT TASKS ON THIS DB EXCEPT THIS ONE**

DECLARE @table_name sysname
SET @table_name = OBJECT_NAME(145802425)

DBCC CHECKTABLE ( @table_name, REPAIR_REBUILD )

GO

ALTER DATABASE <your_db_name>
SET MULTI_USER



Or you could try pulling the data out of the existing table into a "clean" version of the table.
0
 
LVL 5

Author Comment

by:25112
Comment Utility
thx 4 the idea.. worked
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now