Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products
  • Manage your Dell EMC sites, products, and product-level contacts using Company Administration.

Windows Server:在網域控制站故障後修復 Active Directory 資料庫

Summary: 如何在網域控制站故障修復 Windows Server 作業系統內的 Active Directory?

This article applies to   This article does not apply to 

Symptoms

本文將說明如何修復 Windows Server 作業系統的 Active Directory。


 

 

問題:

啟動時,Windows Server 2003 Active Directory 網域控制站 (DC) 在登入提示前顯示與此類似的訊息:

Application popup: lsass.exe - System Error : Security Accounts Manager initialization failed because of the following error: Directory Service cannot start. Error Status: 0xc00002e1. Please click OK to shutdown this system and reboot into Directory Services Restore Mode, check the event log for more detailed information.

Active Directory (AD) 資料庫已損毀,伺服器無法驗證 AD 網域成員,且將不會開機至正常模式。

 

解決方案:

如果沒有最近的系統狀態備份,可能可以使用下列步驟嘗試復原 AD。

1.將 DC 重新開機至「目錄服務還原模式」(DSRM)

    a. 在伺服器啟動時,請在系統 BIOS 和硬體服務 (如 PERC、iDRAC) 初始化完成後按下 F8。 

    b. 從開機功能表中選取「目錄服務還原模式」,然後按下 Enter 鍵。


2.透過 Windows 的開始按鈕選取執行,然後輸入「cmd」以開啟命令提示字元。

    輸入「ESENTUTL /g C:\windows\NTDS\ntds.dit /!10240 /8 /o」,然後按下 Enter 以進行初始完整性檢查。

SLN289101_en_US__1W_ad__repair1_JM_V2

    若資料庫不一致,則會出現錯誤訊息,例如會傳回「results CORRUPTED, -1206」

3.接下來,請輸入「NTDSUTIL」並按下 Enter 鍵。  這會啟動 NTDS 工具集。

    a. 在提示中輸入「Files」,然後按下 Enter 鍵以進入 NTDS 檔案管理公用程式

    b.  在 file maintenance: 提示中輸入「info」,然後按下 Enter 鍵,以顯示所有與 AD 資料庫相關的檔案位置。

SLN289101_en_US__2W_ad__repair2_JM_V1

4.在 file maintenance: 提示中輸入「Recover」,然後按下 Enter 鍵。  這將啟動 AD 資料庫的「軟」復原。

SLN289101_en_US__3W_ad__repair3_JM_V1

 

注意:在極少數的例外情況下,此步驟不足以解決問題,這是診斷問題深度的初步步驟。

    在每個提示中輸入「quit」,直到返回命令 (C:\<path>) 提示字元為止。

5.從命令提示字元輸入「ESENTUTL /ml c:\windows\ntds\edb」,以檢查 AD 資料庫的記錄檔。

SLN289101_en_US__4W_ad__repair4_JM_V1

    如果此步驟失敗,請發出下列命令,並在每個步驟後按下 Enter:

    a.  「DEL *.log」

    b.  「DEL *.chk」

   並前進至步驟 6.

6.在命令提示字元輸入「ESENTUTL /p C:\Winnt\NTDS\ntds.dit /!10240 /8 /o」並按下 Enter,為 AD 資料庫進行「硬」復原。


SLN289101_en_US__5W_ad__repair5_JM_V1

 

警告:順利完成後,透過「ESENTUTL /p」將資料庫返回最後一次進行交易的狀態。可能會遺失最近的變更,因此,從每日備份進行完整的系統狀態還原是復原 AD 伺服器的最佳實務方法。

7.在命令提示字元輸入「ESENTUTL /g C:\Winnt\NTDS\ntds.dit /!10240 /8 /o」並按下 Enter 鍵,以確定資料庫一致性。

SLN289101_en_US__6W_ad__repair6_JM_V1

8.返回 NTDSUTIL 提示 (見步驟 3),輸入「sem dat ana」(「Semantic Database Analysis」的縮寫) 並按下 Enter 鍵。
    在 semantic checker: 提示輸入「go」,然後按下 Enter 鍵。

SLN289101_en_US__7W_ad__repair7_JM_V1

    如果偵測到問題,請輸入「go fix」,然後按下 Enter 鍵。

9.完成所有步驟後,將伺服器重新開機至正常模式。

 

其他資訊:

http://support.microsoft.com/kb/258062

 


Cause

-

Resolution

-

Affected Products

Servers, Microsoft Windows 2008 Server R2, Microsoft Windows 2008 Server Service Pack 2, Microsoft Windows 2012 Server, Microsoft Windows 2012 Server R2
Article Properties
Article Number: 000138794
Article Type: Solution
Last Modified: 08 Oct 2021
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.
Article Properties
Article Number: 000138794
Article Type: Solution
Last Modified: 08 Oct 2021
Version:  4
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.