By default Windows runs an online Defragmentation of the Windows Active Directory database every 12 hours. However, Online defragmentation doesn’t recover the disk space or compact the database. It simply moves data around.
An Offline Defragmentation, on the other hand performs a defragmentation on the database, compacts it and recovers the space. Use the “ntdsutil” utility to run Offline Degramentation on Windows Active Directory. This requires unmounting the Active Directory which mean rebooting the server in “Directory Service Restore mode”.
NOTE: It is important that you take a backup of the Active Directory before performing this operation.
1. Reboot the Windows Server.
2. Press F8 to bring up the Windows Startup menu.
3. Select the ” Directory Services Restore Mode”. This will start Windows Server in Safe Mode and the Directory Service not running
4. Login as a local admin.
5. Now, from the command prompt (Start – Run – type “cmd” and press enter)
6. Run the command ntdsutil.exe
C:\> ntdsutil
This will launch the ntdsutil
7. Enter “files” at the ntdsutil prompt.
This will launch the file maintenance mode
8. Enter “compact to c:\tmp\”
This will instruct ntdsutil to compact the database to c:\tmp\ folder. This could be any folder. Basically, “ntdsutil” will compact and create a new database leaving the original database file ntds.dit in “%systemroot\ntds\” folder.
9. Replace the original ntds.dit file with the new compacted one.
c:\tmp> copy ntds.dit %systemroot%\ntds\ntds.dit
That completes the process. Reboot the server as normal and check if all is OK. Should there be a problem, be prepared to restore your backup
Incoming search terms:
- ntdsutil files repair windows 2003 (7)
- ntdsutil defrag (7)
- ntdsutil offline defrag (6)
- www windowsreference com ntdsutil-to-run-offline-defragmentation-in-windows-20032000-active-directory (6)
- ntdsutil compact (4)
- ntdsutil 2003 (4)
- windows 2003 server active directory defragmentation (3)
- How to Compact Active Directory Database (2)
- how to defrag active directory 2003 (2)
- ad database defragment windows 2000 (2)