FIX: Distribution Agent May Encounter Error 8115 in the Sp_MSadd_distribution_history Stored Procedure (307533)



The information in this article applies to:

  • Microsoft SQL Server 2000 (all editions)
  • Microsoft SQL Server 7.0

This article was previously published under Q307533
BUG #: 355281 (SHILOH_BUGS)
BUG #: 101725 (SQLBUG_70)

SYMPTOMS

The Distribution agent may fail after it encounters the following error message when you run the sp_MSadd_distribution_history stored procedure as part of the distribution job history:
Error: 8115, Severity: 16, State: 2
Arithmetic overflow error converting expression to data type int.

CAUSE

The @total_cmds column that is based on the total_delivered_commands column of the MSdistribution_history table in the distribution database is exceeding the maximum int value when @new_delievered_commands are added.

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

WORKAROUND

Update the MSdistribution_history table in the distribution database to reset the rows where the total_delivered_commands column is close to the maximum int value of 2,147,483,647 back to a lower value such as zero (0).

STATUS

Microsoft has confirmed this to be a problem in SQL Server 2000. This problem was first corrected in Microsoft SQL Server 2000 Service Pack 2.

MORE INFORMATION

If the Distribution Agent is configured to have an output log the following additional error message appears in the output log:
Agent message code 20046. Arithmetic overflow error converting expression to data type int.
[8/20/2001 11:53:56 AM]STO01SQL042.distribution: {call sp_MSadd_distribution_history(33, 6, ?, ?, 104, 4562, 0.00, 0x01, 1, ?, 1, 0x01, 0x01)}

Modification Type:MajorLast Reviewed:10/31/2003
Keywords:kbbug kbfix kbSQLServ2000preSP2Fix KB307533