Microsoft KB Archive/289472

= FIX: SQLAgent Exception Occurs when the System Maintains 613, 2661 or 4709 Jobs =

Article ID: 289472

Article Last Modified on 11/6/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q289472



BUG #: 352142 (SHILOH_bugs)



SYMPTOMS
The SQLAgent process may terminate with with following error messages:

2001-01-14 19:21:11 - ! [LOG] Exception 5 caught at line 335 of file ..\src\job.c. SQLServerAgent initiating self-termination

2001-01-14 19:21:29 - + [098] SQLServerAgent terminated (forcefully)



CAUSE
SQLAgent creates a memory structure to support the xp_sqlagent_enum_jobs action. With SQL Server 2000 the structure is 588 bytes plus 4 bytes for overhead. However, an incorrect CAST to a LPTSTR, instead of a LPBYTE, results in an incorrect 4 byte shift.

When the (number of created jobs on the system * 588) + 4 = NT Page boundary the incorrect 4 byte cast results in the exception.



RESOLUTION
To resolve this problem, obtain the latest service pack for Microsoft SQL Server 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

290211 INF: How to Obtain the Latest SQL Server 2000 Service Pack

Hotfix
NOTE: The following hotfix was created prior to Microsoft SQL Server 2000 Service Pack 1.

The English version of this fix should have the following file attributes or later:   File name   Platform

s80254i.exe INTEL NOTE: This fix addresses the same correction in both the SQLAgent.exe and the Xpstar.dll file. The fix must be applied to the system in tandem to correct the issue.

NOTE: Due to file dependencies, the most recent hotfix or feature that contains the preceding files may also contain additional files.



WORKAROUND
Make sure that the number of jobs present on the system is not 613, 2661, 4709 or any other calculation that falls on an NT page boundary.



STATUS
Microsoft has confirmed that this is a problem in Microsoft SQL Server 2000. This problem was first corrected in SQL Server 2000 Service Pack 1.

Keywords: kbbug kbfix kbqfe kbsqlserv2000sp1fix KB289472

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.