Microsoft KB Archive/229602

= Defragmentation of the Active Directory Database =

PSS ID Number: 229602

Article Last Modified on 10/9/2002

-

The information in this article applies to:


 * Microsoft Windows 2000 Server

-



This article was previously published under Q229602



SUMMARY
The underlying Extensible Storage engine (ESE) for the Active Directory database uses the quickest method to fill database pages, which is not always the most efficient method. Defragmentation is the process of taking this data and rearranging it in a more compact form. Windows 2000 Server supports both online defragmentation and offline defragmentation.



Online Defragmentation
With online defragmentation, database pages are effectively rearranged within the data file, but no space is released back into the file system. Online defragmentation is performed automatically by ESE at regular intervals following the garbage collection process.

Offline Defragmentation
Offline defragmentation cannot be performed while the computer is running as a domain controller; it must be performed with the computer running in Directory Services Repair mode, in which the computer is effectively running as a member server. In Directory Services Repair mode, an administrator can use the Ntdsutil.exe command-line tool to defragment the Ntds.dit file.

You can run Directory Services Repair mode by restarting the computer and selecting the appropriate item from the Boot menu. This menu is accessible on Intel-based computers by pressing F8 during startup.

Upon completion of the defragment operation, Ntdsutil.exe places a defragmented version of the Ntds.dit file into a separate folder. You can then move the defragmented file into the Ntds folder after archiving the original Ntds.dit file.

Other Considerations

 * Use offline defragmentation only when you know database contents have decreased considerably, and you need to reclaim some space for other users.
 * Retain the original Ntds.dit file until the domain controller has restarted successfully with the new compressed version of the file.
 * Online defragmentation makes space available, but does not reduce the size of the database file.
 * Only offline defragmentation provides you with a clear picture of the amount of space being used.

Keywords: kbenv kbhowto KB229602

Technology: kbwin2000Search kbwin2000Serv kbwin2000ServSearch

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© 2004 Microsoft Corporation. All rights reserved.