While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is required to start the all services normally
Error "The active directory is rebuilding indices please wait” in Windows Server 2003
Windows 2003 server
The server may show the message “The Active Directory is rebuilding indices” if the Active Directory database (NTDS) gets corrupt. Follow the below steps to get of this message.
Boot the server in “Directory Service Restore Mode” using “F8” on boot up.
There is another command that checks the “integrity” of the database. But first, Microsoft documentation states that before running the integrity command ,we should run the “ntdsutil files recover” command. This commands “ensures all committed transactions are reflected in the data file.
type the command ntdsutil in administrator privilged command prompt.
PS C:\> ntdsutil
From the console type the command activate instance ntds
C:\Windows\system32\ntdsutil.exe: activate instance ntds
Active instance set to “ntds”.
type files and press enter and execute checksum command as shwon in below
file maintenance: checksum
There is another command that checks the “integrity” of the database. But first, Microsoft documentation states that before running the integrity command .we should run the “ntdsutil files recover” command. This commands “ensures all committed transactions are reflected in the data file.
Since we are still in “ntdsutil, files” , we can simply enter the command as follows:
type the command Recover as shown in below
file maintenance: recover
It will initiate recovery mode and Performing soft recovery
Move the log files (res1.log, res2.log and edb.log) from “c:\windows\ntds\” to another location.
Type ntdsutil files integrity (Checks integrety of ntds.dit)
Type ntdsutil “sem d a” go
Type ntdsutil “sem d a” “go f”
(When you move or compact the Active Directory database, if the integrity check fails, you must run a subsequent database test called semantic database analysis. When you run semantic database analysis with the Go Fixup command instead of the Go command, errors are written into Dsdit.dmp.xx log files. A progress indicator reports the status of the check. You can use this procedure to perform semantic database analysis with fixup.
Perform the database recovery using the “Esentutl.exe”.)
Type esentutl /r c:\windows\ntds\ntds.dit
Delete the database log files (.log) from the WINDOWS\Ntds folder.
Execute the command esentutl /p “c:\windows\ntds\ntds.dit”
Open the registry editor by typing “regedit” in command prompt. Locate the path: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RpcSs
Add a “Reg_Multi_Sz” with the name as “DependOnService” then add “Eventlog” to the data list “DependOnService”, close the registry and reboot the server in normal mode.