2014-07-21 55 views
3

嘿大家我有我的sql服務器數據庫的一些問題。看起來,自動備份不能正常工作和恢復沒有解決我的問題。我運行了一個CHECKDB,它吐出了以下錯誤。 日誌文件:修復DBCC 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 

大多數我看到這個問題建議恢復但同樣這並沒有爲我工作的地方。 關於如何修復腐敗表的任何建議將不勝感激!

謝謝!

+0

這應該在http://dba.stackexchange.com上。 – JiggsJedi

+1

您的數據庫沒有啓用校驗和。這也不好。儘快熟悉正確的備份和恢復程序。 – usr

回答

0

使用

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

獲取數據了數據庫。 插入另一個數據庫。 然後使用RedGate Sql Compare,並將結構與上次備份進行同步。

1

終於實現了做SQL Server Management Studio中的內部下面的索引重建:

  1. 在對象資源管理器,連接到SQL Server 數據庫引擎實例,然後展開該實例。
  2. 展開「數據庫」,展開包含指定索引的 表的數據庫,然後展開「表」。
  3. 展開索引所屬的表格,然後展開索引。
  4. 右鍵單擊要重建的索引,然後單擊重建。
  5. 要開始重建操作,請單擊確定。

步驟從http://technet.microsoft.com/en-us/library/ms187874(v=sql.105).aspx

花時間一點點,但沒有的伎倆。

+0

表我有6個索引的問題。我做到了這一點,6人中有5人跑得好,但在一個人身上發生了錯誤。它出錯的一個,我刪除並重新創建索引。之後,DBCC CheckDb正常運行。 – Kevin