Solved

clustered key corruption

Posted on 2013-01-22
3
391 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
ID: 38806404
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:
Scott Pletcher earned 250 total points
ID: 38807978
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
ID: 38838037
thx 4 the idea.. worked
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

792 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