Microsoft KB Archive/824422

= Unexpected behavior occurs when you run many processes on a computer that is running SQL Server =

Article ID: 824422

Article Last Modified on 3/4/2004

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition, when used with:
 * Microsoft Windows NT 4.0

-



Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry



SYMPTOMS
When many processes run on your computer (for example, more than 50), behaviors that were not expected may occur. However, you may or may not receive an error message, and the error messages that are associated the problem may not be logged in the log files on your computer. The following symptoms are associated with this problem:  SQL Server Agent jobs that use CmdExec job steps fail for no reason. Sometimes, the status of the job is set to Success although the job did not actually run. The xp_cmdshell statement returns a value of NULL, regardless of what command was issued. CmdExec job steps in Data Transformation Services (DTS) may fail without any errors. OLE Automation extended stored procedures, such as the sp_OACreate stored procedure, may fail with or without returning error codes. Out-of-process replication agents may have problems. The Start menu in the task bar may not open. Out-of-process COM objects may not function correctly.</li>  When you try to start Windows Task Manager by pressing CTRL+ALT+DEL, Windows Task Manager does not start, and the system event log may show an error message that is similar to the following: Event ID: 26

Application popup: cmd.exe

Application Error : The application failed to initialize properly (0xc0000142). Click on OK to terminate the application. </li> any process that uses the CreateProcess Windows API may have problems.</li></ul>

<div class="workaround_section">

WORKAROUND
To work around this problem, follow these steps.

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk. <ol> At a command prompt, type REGEDT32.EXE to start Registry Editor.</li> In Registry Editor, locate the following registry key:

</li> In the right pane of Registry Editor, click Windows.</li> On the Edit menu, click Modify.</li> In the Edit String dialog box, locate the SharedSection parameter string in the Value data box, and then specify a larger value for the SharedSection parameter.

Note The SharedSection parameter specifies the system and desktop by using the following format, where  defines the maximum size of the system-wide heap (in kilobytes),   defines the size of the per desktop heap, and   is the size of the desktop heap for each desktop that is associated with a non-interactive Windows station:

SharedSection=, ,

</li> Click OK.</li></ol>

If you increase the non-interactive desktop heap by 256 KB or by 512 KB, it typically provides sufficient memory to resolve the problem.

<div class="moreinformation_section">

MORE INFORMATION
This problem is caused by a known problem in Microsoft Windows NT Server. SQL Server uses a non-interactive desktop heap. The non-interactive desktop heap may run out of memory if many processes are created. When there is not sufficient memory to satisfy an allocation request, an error is returned and the user is notified that the computer is low on memory. Some programs may not handle the failure, and sometimes there may not be sufficient memory to create the error message dialog box. When there is not sufficient memory to create the error message dialog box, the requested operation may fail without generating an error message.

<div class="references_section">