修复DBCC CHECKDB错误。恢复无效。

时间:2014-07-21 14:41:49

标签: sql-server

大家好我的sql server数据库存在一些问题。似乎无法正常运行的自动备份和还原无法解决我的问题。我运行了一个CHECKDB,它吐出了以下错误。 日志文件:

Warnings: --->
W (1): CHECKDB found 0 allocation errors and 10 consistency errors 
not associated with any single object.
    W (2): CHECKDB found 0 allocation errors and 24 consistency errors 
in table 'details' (object ID 1853926372).
    W (3): CHECKDB found 0 allocation errors and 34 consistency errors 
in database 'NIX'.
    W (4): repair_allow_data_loss is the minimum repair level for the 
errors found by DBCC CHECKDB (PHOENIX).
           <---
  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
359574662873088 (type Unknown), page (3584:587202560). Test (IS_OFF 
(BUF_IOERR, pBUF->bstat)) failed. Values are 12716041 and -14.
  Msg: 8939, Level: 16, State: 98, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
24488610741813248 (type Unknown), page ID (1:233390215) contains an 
incorrect page ID in its page header. The PageId in the page header = 
(78:4784160).
  Msg: 8909, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
27866160140386304 (type Unknown), page ID (1:233390212) contains an 
incorrect page ID in its page header. The PageId in the page header = 
(100:6488096).
  Msg: 8909, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
28147708131803136 (type Unknown), page ID (1:233390207) contains an 
incorrect page ID in its page header. The PageId in the page header = 
(2816:2052).
  Msg: 8909, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
28147914284990464 (type Unknown), page ID (1:233390134) contains an 
incorrect page ID in its page header. The PageId in the page header = 
(78:5111881).
  Msg: 8909, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
31244194867511296 (type Unknown), page ID (1:233390211) contains an 
incorrect page ID in its page header. The PageId in the page header = 
(79:5374022).
  Msg: 8909, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
5620492349504225280 (type Unknown), page (83:796). Test (IS_OFF 
(BUF_IOERR, pBUF->bstat)) failed. Values are 12716041 and -1.
  Msg: 8939, Level: 16, State: 98, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
6341348650819518464 (type Unknown), page (76:4522067). Test (IS_OFF 
(BUF_IOERR, pBUF->bstat)) failed. Values are 12716041 and -1.
  Msg: 8939, Level: 16, State: 98, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
7133761184305512448 (type Unknown), page (0:525312). Test (IS_OFF 
(BUF_IOERR, pBUF->bstat)) failed. Values are 12716041 and -1.
  Msg: 8939, Level: 16, State: 98, Procedure: , Line: 1

  Table error: Object ID 0, index ID -1, partition ID 0, alloc unit ID 
7205835271219183616 (type Unknown), page (28160:1728080128). Test 
(IS_OFF (BUF_IOERR, pBUF->bstat)) failed. Values are 12716041 and -1.
  Msg: 8939, Level: 16, State: 98, Procedure: , Line: 1

  Object ID 1853926372, index ID 1, partition ID 72059003269808128, 
alloc unit ID 72059273826074624 (type In-row data): Page (1:233390133) 
could not be processed.  See other errors for details.
  Msg: 8928, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 1853926372, index ID 1, partition ID 
72059003269808128, alloc unit ID 72059273826074624 (type In-row data). 
Page (1:233390133) was not seen in the scan although its parent 
(1:233383837) and previous (1:233390132) refer to it. Check any previous 
errors.
  Msg: 8976, Level: 16, State: 1, Procedure: , Line: 1

  Object ID 1853926372, index ID 1, partition ID 72059003269808128, 
alloc unit ID 72059273826074624 (type In-row data): Page (1:233390134) 
could not be processed.  See other errors for details.
  Msg: 8928, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 1853926372, index ID 1, partition ID 
72059003269808128, alloc unit ID 72059273826074624 (type In-row data). 
Index node page (1:233383837), slot 98 refers to child page 
(1:233390134) and previous child (1:233390133), but they were not 
encountered.
  Msg: 8980, Level: 16, State: 1, Procedure: , Line: 1

  Object ID 1853926372, index ID 1, partition ID 72059003269808128, 
alloc unit ID 72059273826074624 (type In-row data): Page (1:233390135) 
could not be processed.  See other errors for details.
  Msg: 8928, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 1853926372, index ID 1, partition ID 
72059003269808128, alloc unit ID 72059273826074624 (type In-row data). 
Index node page (1:233383837), slot 99 refers to child page 
(1:233390135) and previous child (1:233390134), but they were not 
encountered.
  Msg: 8980, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 1853926372, index ID 1, partition ID 
72059003269808128, alloc unit ID 72059273826074624 (type In-row data). 
Page (1:233390136) is missing a reference from previous page 
(1:233390135). Possible chain linkage problem.
  Msg: 8978, Level: 16, State: 1, Procedure: , Line: 1

  Object ID 1853926372, index ID 1, partition ID 72059003269808128, 
alloc unit ID 72059273826074624 (type In-row data): Page (1:233390206) 
could not be processed.  See other errors for details.
  Msg: 8928, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 1853926372, index ID 1, partition ID 
72059003269808128, alloc unit ID 72059273826074624 (type In-row data). 
Page (1:233390206) was not seen in the scan although its parent 
(1:233383837) and previous (1:233390205) refer to it. Check any previous 
errors.
  Msg: 8976, Level: 16, State: 1, Procedure: , Line: 1

  Object ID 1853926372, index ID 1, partition ID 72059003269808128, 
alloc unit ID 72059273826074624 (type In-row data): Page (1:233390207) 
could not be processed.  See other errors for details.
  Msg: 8928, Level: 16, State: 1, Procedure: , Line: 1

  Table error: Object ID 1853926372, index ID 1, partition ID 
72059003269808128, alloc unit ID 72059273826074624 (type In-row data). 
Index node page (1:233383837), slot 171 refers to child page 
(1:233390207) and previous child (1:233390206), but they were not 
encountered.
  Msg: 8980, Level: 16, State: 1, Procedure: , Line: 1

我看到这个问题的大多数地方建议恢复但是再次对我不起作用。 任何关于如何修复腐败表的建议将不胜感激!

谢谢!

2 个答案:

答案 0 :(得分:1)

通过在SQL Server Management Studio中执行以下操作,结束对索引的重建:

  1. 在对象资源管理器中,连接到SQL Server的实例 数据库引擎,然后展开该实例。
  2. 展开数据库,展开包含该表的数据库 指定的索引,然后展开Tables。
  3. 展开索引所属的表格,然后展开“索引”。
  4. 右键单击要重建的索引,然后单击“重建”。
  5. 要开始重建操作,请单击“确定”。
  6. http://technet.microsoft.com/en-us/library/ms187874(v=sql.105).aspx

    的步骤

    花了一点时间但是做了伎俩。

答案 1 :(得分:0)

使用

exec msforeachtable 
    'Select *
    Into Alternate_db.?
    From ?'

从数据库中获取数据。 到另一个数据库。 然后使用RedGate Sql Compare,并将Structure与您最后一次备份同步。