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

Article translations Article translations
Article ID: 260087 - View products that this article applies to.
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)
Expand all | Collapse all


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.


Article ID: 260087 - Last Review: October 20, 2013 - Revision: 2.0
  • Microsoft SQL Server 7.0 Standard Edition
kbnosurvey kbarchive kbbug kbfix kbqfe KB260087

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from