This article has been archived. It is offered "as is" and will no longer be updated.
Consider the following scenario:
You are running Active Directory directory service database maintenance in Windows Server 2003.
You restart in Directory Service Restore mode to check the database or to clean it up.
In this scenario, when you run an offline defragmentation task, you may receive the following output:
File maintenance: compact to <target>Opening database [Current].Executing Command: C:\WINDOWS\system32\esentutl.exe /d"<source>\ntds.dit" /t"<target>\ntds.dit" /p /oInitiating DEFRAGMENTATION mode... Database: <source>\ntds.dit Temp. Database: <target>\ntds.dit Defragmentation Status (% complete) 0 10 20 30 40 50 60 70 80 90 100 |----|----|----|----|----|----|----|----|----|----| .......................Operation terminated with error -1011 (JET_errOutOfMemory, Out of Memory) after1431.78 seconds.Spawned Process Exit code 0xfffffc0d(-1011)
The progress that the defragmentation task makes before this error output occurs depends on the size of the database and on the server configuration. Smaller databases may not experience this problem.
In this scenario, you do not run out of virtual memory, and there is enough physical memory installed. It does not matter whether you are running the defragmentation task together with the /3GB switch in the Boot.ini file.
Note This problem does not occur on 64-bit systems.
This problem occurs if the Windows Server 2003-based computer has more than 3 gigabytes (GB) of physical memory. In this case, the Esentutl.exe utility gives incorrect cache size hints to the database engine. Therefore, the database engine experiences a cache allocation error, and it stops the offline defragmentation.
This problem does not occur on 64-bit systems because the cache calculation of the Esentutl.exe utility differs significantly on these systems.
To resolve this problem, follow these steps:
Copy the line in the Boot.ini file that is used to restart Windows Server 2003.
Paste this line under the original line, and then modify it to resemble the following:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=" Windows Server 2003, Enterprise DSREPAIR" /FASTDETECT /NOEXECUTE=OPTOUT /3GB /userva=2900 /maxmem=<memory that is available to the operating system> /safeboot:dsrepair
To switch between startup modes, you can comment out the applicable line in the Boot.ini file. This also means you do not have to access the server console to switch between startup modes.
Reduce the memory that is available to the operating system so that the Esentutl.exe utility does not give incorrect cache size hints. 2048 is a value that works for all configurations. 2944 is a working value for /3GB configurations. For example, for a /3G configuration, modify the line as follows:
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=" Windows Server 2003, Enterprise DSREPAIR" /FASTDETECT /NOEXECUTE=OPTOUT /3GB /userva=2900 /maxmem=2944 /safeboot:dsrepair
Note The memory does not have a big influence on the offline defragmentation because the task is not cacheable.
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.