Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

clustered key corruption

Posted on 2013-01-22
3
Medium Priority
?
473 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 40

Assisted Solution

by:lcohan
lcohan earned 1000 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 70

Accepted Solution

by:
Scott Pletcher earned 1000 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

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

604 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