Sat, Nov 28 2009 12:22
RODC: How to Defrag or Compact the Active Directory Database
A Read Only Domain Controller has the benefit of being able to perform administrative maintenance tasks without entering into Active Directory Restore Mode which previously required a reboot. The following command shows how to compact the Active Directory database from the command line. Before you start, remember not to leave the Active Directory Services stopped for a long period of time since replication of the active directory data will not occur during the period where it is shut down.
- Stop the Active Directory Services.
- From the command prompt with administrative privileges
- type ntdsutil and press enter
- type activate instance ntds and press enter
- type files and press enter
- type info and press enter
- type compact to c:\TEMP and press enter
- If you have successfully compacted the database you can now copy the files back to the proper location and delete the temp files. To do so execute the following command from the command prompt
- type copy "c:\TEMP\ntds.dit" "c:\Windows\NTDS\ntds.dit" and press enter
- When prompted press Y to overwrite and press enter.
- Restart the Active Directory Services
Subscribe in a reader
Filed under: RODC, Command Line, Defrag AD