BUG: Msdb..Syshistory Rows May Be Incorrectly Deleted

Last reviewed: November 12, 1997
Article ID: Q176684
The information in this article applies to:
  • Microsoft SQL Server version 6.5
BUG #: 16236 (6.5)

SYMPTOMS

The task history is maintained for all tasks in the MSDB database. When the maximum number of rows of any given task is reached, the historical rows of that task should be deleted in sequence, starting with the oldest row. However, the INSERT trigger on the syshistory table may remove historical information in an incorrect order.

CAUSE

The problem is in the INSERT trigger for the syshistory table that removes the older rows when the maximum number of records is exceeded. The DELETE statement used to remove the records can delete the wrong record when a non- clustered index (instead of the clustered index) is used by SQL Server to complete the removal.

SET ROWCOUNT is used with the DELETE statement to remove a specified number of sequential records. Depending on index sort order, different rows can be removed.

STATUS

Microsoft has confirmed this to be a problem in SQL Server version 6.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional query words: sqlexecutive
Keywords : kbbug6.50 SSrvAdmin kbusage
Version : WINNT:6.5
Platform : winnt
Issue type : kbbug
Solution Type : kbpending


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 12, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.