Alexander’s Blog

May 22, 2006

Performing an Offline Defragmentation of Active Directory Database

by @ 10:53 am. Filed under Active Directory, Tips & Tricks, Windows 2003

By default, Active Directory performs online defragmentation every 12 hours as part of the Garbage Collection process. Online defragmentation doesn’t compact the database, it only optimizes the data storage. To compact the AD database (ntds.dit), you can perform an offline defragmentation by following the procedure described below.

1. Restart the domain controller.
2. Press F8 and then select Directory Services Restore Mode.
3. Logon as Administrator.
4. Go to the command prompt and type ntdsutil.exe.
5. Type files.
6. Type info and make a note of the path.
7. Type compact to path, where path is the location for the compacted database, e.g. c:\temp, or “c:\compacted database”. You’ll need quotes around the path if there are spaces in the path.
8. A new compacted database called ntds.dit is created in the path you specified in the above step.
9. Type quit a couple of times until you exit ntdsutil utility.
10. Copy the new compacted ntds.dit over the old ntds.dit located in the path listed in step 6.
11. Reboot the domain controller normally.

Leave a Reply

Comment spam protected by SpamBam

Contact E-mail | Terms of Use | Privacy Policy

Copyright ©2008 Zubair Alexander. All rights reserved.

Internal Links

Categories

Search Blog

Archives

October 2008
M T W T F S S
« Sep    
 12345
6789101112
13141516171819
20212223242526
2728293031  

RSS Feeds

TechGalaxy Visitors

29 queries. 0.935 seconds