AD 資料庫檔案 (NTDS.dit) 的一致性檢查

 

有的時候您會遇到 NTBackup 無法備份 DC 的 System State 或是你在系統日誌裡發現:

Event Type: Error
Event Source: NTBackup
Event Category: None
Event ID: 8012
Description:
The 'Active Directory' returned '發生讀取驗證錯誤
' from a call to 'BackupRead()' additional data '-'

Event Type: Error
Event Source: ESENT
Event Category: Logging/Recovery
Event ID: 474
Description:
lsass (504) The database page read from the file "C:\WINDOWS\NTDS\ntds.dit" at offset 77594624 (0x0000000004a00000) for 8192 (0x00002000) bytes failed verification due to a page checksum mismatch. The expected checksum was 3561104104 (0xd44222e8) and the actual checksum was 3920450040 (0xe9ad51f8). The read operation will fail with error -1018 (0xfffffc06). If this condition persists then please restore the database from a previous backup. This problem is likely due to faulty hardware. Please contact your hardware vendor for further assistance diagnosing the problem.

針對此問題請您檢查資料庫檔案的一致性。
請您重開機按 F8 並進入 Directory Service Restore Mode 安全模式
1. Enter "Directory Service Restore Mode"
2. Open "cmd" prompt
3. Run "ntdsutil" and enter
4. Run "files" and enter
5. Run "info" and enter
6. Open regedit
    - Go to HKLM\System\CurrentControlSet\Services\ntds\paramaters
    - Make sure the path info matches:

7. Make sure System and Administrators have full control of the "\%windir%\ntds" folder

如果上述資料確認無誤,請繼續執行以下步驟:
1. Open "cmd" prompt
2. Run "ntdsutil" and enter
3. Run "files"
4. Run "integrity"
5. Run "recover"
6. Run "q"
7. Run "sem d a"
8. Run "go fix"

如果 "go fix" 指令執行時遇到錯誤,代表資料庫有問題,請執行:
9. Run "esentutl /p C:\winnt\ntds\ntds.dit /!10240 /8 /v /x /o" (this attempts to repair the database)

如果 "esentutl" 指令依然修復不了資料庫,建議您將 DC 降級,重新升級該 DC。