FIX: Large Error Numbers May Cause Heap Corruption in SQLServerAgent Service

This article was previously published under Q260087
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 57730 (SQLBUG_70)
If scheduled Transact-SQL (T-SQL) jobs are run through the SQLServerAgent, which raise error numbers that have 6 or more digits, heap corruption may occur in the SQLServerAgent service. This may manifest itself in seemingly random access violations, hangs, unhandled exceptions or other unusual behavior. Sometimes, you may see the following error in the Sqlagent.log file:
The ExecReAlloc memory operation failed (request [for 1508 bytes] occurred at line 2409 of function ODBCErrorHandler)
The routine for processing errors does not allocate sufficient space to store error numbers greater than 5 digits.
Use error numbers that are 5 digits in length. Custom error messages can be any number greater than 50000.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 3 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
274799 INF: How to Obtain Service Pack 3 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.
All SQL Server error numbers are 5 digits or less. You should only encounter this problem if custom error messages are raised with RAISERROR as part of a T-SQL job.
dr watson crash RtlAllocateHeap RtlFreeHeap

Article ID: 260087 - Last Review: 10/20/2013 19:18:20 - Revision: 2.0

Microsoft SQL Server 7.0 Standard Edition

  • kbnosurvey kbarchive kbbug kbfix kbqfe KB260087
ERROR: at System.Diagnostics.Process.Kill() at Microsoft.Support.SEOInfrastructureService.PhantomJS.PhantomJSRunner.WaitForExit(Process process, Int32 waitTime, StringBuilder dataBuilder, Boolean isTotalProcessTimeout)