Directory Services Database Corrupt

CharlesJP
CharlesJP used Ask the Experts™
on
We have a Server 2003 SP2 machine that will not boot because Directory Services cannot be started.
I have rebooted into DSRM and ran an integrity check on the database. It comes back corrupted, with:
Operation terminated with error -1206 (JET_errDatabaseCorrupted, Non database file or corrupted db) after 0.656 seconds.

Tried to run a defrag on the database but received this:
Operation terminated with error -1018 (JET_errReadVerifyFailure, Checksum error
on a database page) after 2.140 seconds.

Any suggestions would be appreciated.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
You can use NTDSUTIL or ESNETUTL to try and repair the database, make sure you back it up first:

To repair the database:
Type the following command (including the quotation marks), and then press ENTER: esentutl /p "path\ntds.dit" /!10240 /8 /v /x /o

Important: Delete the database log files from the Ntds folder. Do not delete or move the Ntds.dit file.

http://www.windowsnetworking.com/kbase/WindowsTips/Windows2000/AdminTips/ActiveDirectory/UseEsentutlwhenNtdsutiltoolfailstorepairtheActiveDirectorydatabase.html

Author

Commented:
Tried to run it with the above switches, but it does not accept it with the /v and /x switches. It did run after removing those two switches though, with this output:
C:\Documents and Settings\Administrator>esentutl /p "D:\Windows\ntds\ntds.dit" /
!10240 /8 /o
 
Initiating REPAIR mode...
        Database: D:\Windows\ntds\ntds.dit
  Temp. Database: TEMPREPAIR5152.EDB
 
Checking database integrity.
 
                     Scanning Status (% complete)
 
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          ...................................................
 
Initiating DEFRAGMENTATION mode...
            Database: D:\Windows\ntds\ntds.dit
      Temp. Database: TEMPREPAIR5152.EDB
 
                  Defragmentation Status (% complete)
 
          0    10   20   30   40   50   60   70   80   90  100
          |----|----|----|----|----|----|----|----|----|----|
          .............
 
Operation terminated with error -1018 (JET_errReadVerifyFailure, Checksum error
on a database page) after 1.781 seconds.

Open in new window

Commented:
-1018 is typically a hardware problem. See if you can copy the ntds directory to another partition and run the repair option there, just use: esentutl /p filename.dit with no options this time.

Also sometimes it is easier to restore a backup of your NTDS directory and start the recovery from there. Do you have a recent backup?

Author

Commented:
We tried to move it to another partition but because it was corrupt it would not allow us to move the db or log files. We also tried to restore just the ntds.dit file from our backup, however the integrity check on it said it was corrupt. Recovery would not work on that backup file as well. Our system state backup would not extract from the backup correctly at all.

I currently have Microsoft Support in control of the machine and they are reccomending demote the DC and repromote it.
Had to demote the machine and rejoin it to the domain. There were still corrupted system files, so did a repair install on the OS. Rejoined computers to the domain.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial