This article has been archived. It is offered "as is" and will no longer be updated.
Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:
256986 Description of the Microsoft Windows registry
An online defragmentation runs automatically after you run the Active Directory directory service garbage collection process on a computer that is running Microsoft Windows 2000 Server. You may want to separate these processes for performance purposes.
A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem.
If the hotfix is available for download, there is a "Hotfix download available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix.
Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft Web site:
Note The "Hotfix download available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.
To apply this hotfix, you must have Windows 2000 Service Pack 4 (SP4) installed on the computer.
You must restart your computer after you apply this hotfix.
Hotfix replacement information
This hotfix does not replace any other hotfixes.
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
To resolve this problem and stop the online defragmentation from automatically running after the Active Directory garbage collection process, you must install this hotfix on each domain controller where you want to change the behavior. Also, you must add the following key to the registry. To do this, follow these steps:
Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey:
Right-click the Parameters subkey, point to New, and then click String Value.
Type DSA Heuristics, and then press ENTER.
Right-click DSA Heuristics, type 0000000001, and then click OK.
Note There are nine zeros and a one in this registry value.
Exit Registry Editor.
MICROSOFT INTERNAL SUPPORT INFORMATION After you've set DSA Heuristics = 0000000001 no automatic online defragmentation’s will occur. Customers can trigger online defrag with the RootDSE primative "doOnlineDefrag" as described here : KB 2875017 ADDS: TOOLS: RootDSE primatives for W2K3, W2K8 R2 and WS 2012
One way of triggering online defragmentation would be c:\repadmin /setattr <servername> "" doOnlineDefrag add 1 Looking at the source there's a function which defines the maximum runtime for the defrag which seems to be 30 minutes by default. The automatic online defragmentation's are started with "-1" you cannot start however the repadmin or LDP variant with "-1" . That means you have to enter a valid time between 1 and 2147483647 then the Task starts (Event 700) and runs till it's finished (Event 703). Setting Zero "0" would stop an currently running online defrag Task i.e. c:\repadmin /setattr <servername> "" doOnlineDefrag add 0
As a side note enabling NTDS diagnostic logging for "6 Garbage Collection" = 1 will issue Event 1646 once online defrag was run!
You can generate a report that lists the amount of free space that can be reclaimed by enabling "garbage collection" logging in the registry. After you enable this key, unused space is reported in the event log when you run an offline defragmentation. To enable garbage collection logging, enable the following registry subkey:
During the garbage-collection process, the online defragmentation posts an event in the Directory Service log to indicate how much space will be freed by an offline defragmentation:
Event Type: Information Event Source: NTDS Database Event Category: Garbage Collection Event ID: 1646 Date: 2/28/2002 Time: 10:08:11 PM User: Everyone Computer: MYDCNAME Description: The Windows Directory Service database has 121 MB of free space out of 130 MB of allocated space.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
For more information about standard terminology that is used to describe Microsoft software updates, click the following article number to view the article in the Microsoft Knowledge Base:
824684 Description of the standard terminology that is used to describe Microsoft software updates