An online defragmentation is automatically run after you run the Active Directory garbage collection process in Windows 2000 Server

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
Symptoms
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.
Resolution

Hotfix information

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.

Prerequisites

To apply this hotfix, you must have Windows 2000 Service Pack 4 (SP4) installed on the computer.

Restart requirement

You must restart your computer after you apply this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfixes.

File information

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.
   Date         Time   Version            Size    File name   --------------------------------------------------------------   24-Mar-2004  02:17  5.0.2195.6876     388,368  Advapi32.dll        24-Mar-2004  02:17  5.0.2195.6866      69,904  Browser.dll         24-Mar-2004  02:17  5.0.2195.6824     134,928  Dnsapi.dll          24-Mar-2004  02:17  5.0.2195.6876      92,432  Dnsrslvr.dll        24-Mar-2004  02:17  5.0.2195.6883      47,888  Eventlog.dll        24-Mar-2004  02:17  5.0.2195.6890     143,632  Kdcsvc.dll          11-Mar-2004  02:37  5.0.2195.6903     210,192  Kerberos.dll        21-Sep-2003  00:32  5.0.2195.6824      71,888  Ksecdd.sys   11-Mar-2004  02:37  5.0.2195.6902     520,976  Lsasrv.dll          25-Feb-2004  23:59  5.0.2195.6902      33,552  Lsass.exe           19-Jun-2003  20:05  5.0.2195.6680     117,520  Msv1_0.dll          24-Mar-2004  02:17  5.0.2195.6897     312,592  Netapi32.dll        19-Jun-2003  20:05  5.0.2195.6695     371,984  Netlogon.dll        10-Jul-2004  22:41  5.0.2195.6944     933,648  Ntdsa.dll           24-Mar-2004  02:17  5.0.2195.6897     388,368  Samsrv.dll          24-Mar-2004  02:17  5.0.2195.6893     111,376  Scecli.dll          24-Mar-2004  02:17  5.0.2195.6903     253,200  Scesrv.dll          04-Jun-2004  23:13  5.0.2195.6935   5,887,488  Sp3res.dll          24-Mar-2004  02:17  5.0.2195.6824      50,960  W32time.dll         21-Sep-2003  00:32  5.0.2195.6824      57,104  W32tm.exe        
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:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\NTDS\Parameters
  3. Right-click the Parameters subkey, point to New, and then click String Value.
  4. Type DSA Heuristics, and then press ENTER.
  5. Right-click DSA Heuristics, type 0000000001, and then click OK.

    Note There are nine zeros and a one in this registry value.
  6. 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:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NTDS\Diagnostics Garbage Collection DWORD=1

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.

Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
More information
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
dsheuritics , DSA Heuristics
Properties

Article ID: 871003 - Last Review: 01/11/2015 06:20:35 - Revision: 3.0

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • kbnosurvey kbarchive kbautohotfix kbwin2000sp5fix kbregistry kbwin2000presp5fix kbbug kbfix kbHotfixServer kbqfe KB871003
Feedback