How do I manually defragment Active Directory?
Windows 2000 servers running Directory Services (DSs) perform a directory
online defragmentation every 12 hours by default as part of the
garbage-collection process. This defragmentation only moves data around the
database file (ntds.dit) and doesnít reduce the fileís size.
To create a new, smaller ntds.dit file and to enable offline defragmentation,
perform the following steps.
- Back up Active Directory (AD) (see the FAQ How
do I back up Active Directory and the System State?).
- Reboot the server, select the OS option, and press F8 for advanced
- Select the Directory Services Restore Mode option, and press Enter. Press
Enter again to start the OS.
- Win2K will start in safe mode, with no DS running.
- Use the local SAMís administrator account and password to log on.
- Youíll see a dialog box that says youíre in safe mode. Click OK.
- From the Start menu, select Run and type
- In the command window, youíll see the following text. (Enter the
commands in bold.)
file maintenance:compact to c:\temp
- Youíll see the defragmentation process. If the process was successful,
- to return to the command prompt.
- Then, replace the old ntds.dit file with the new, compressed version.
(Enter the commands in bold.)
C:\> copy c:\temp\ntds.dit %systemroot%\ntds\ntds.dit
- Restart the computer, and boot as normal.
Windows Privacy Tools - http//www.privacywindows.com