FIX: DTS "Execute SQL Task" Terminates Prematurely Without Completing All Commands in Batch

This article was previously published under Q238523
This article has been archived. It is offered "as is" and will no longer be updated.
BUG #: 55660 (SQLBUG_70)
The Data Transformation Services (DTS) "Execute SQL Task" terminates without completely processing all the commands in a batch. If the task calls a stored procedure that performs multiple data modification operations, the task can return prematurely after the first command, even before all the other commands are executed.
The task returns after the first command is completed since the "Execute SQL Task" option expects only one result set.
Instead of calling the procedure from a "Execute SQL Task", call the procedure using OSQL.exe. This call can be added to a DTS package using "Execute Process Task".

Setting the NOCOUNT option ON, inside the stored procedure, may help since the DONE_IN_PROC messages are not sent and the procedure may complete without any other messages.
Microsoft has confirmed this to be a problem in SQL Server 7.0. This problem has been corrected in U.S. Service Pack 2 for Microsoft SQL Server 7.0. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
254561 INF: How to Obtain Service Pack 2 for Microsoft SQL Server 7.0 and Microsoft Data Engine (MSDE) 1.0
For more information, contact your primary support provider.


SQL Server Books Online; topic: "SET"; search on: "NOCOUNT".

For more information on client/server TDS interaction, refer to the following article in the Microsoft Knowledge Base:
180775 INF: Client Effects on SQL Server Throughput
The concepts described in the article and related links apply to any DB-Library, ODBC or SQL OLEDB client.

Article ID: 238523 - Last Review: 10/21/2013 23:25:35 - Revision: 2.1

  • Microsoft SQL Server 7.0 Standard Edition
  • kbnosurvey kbarchive kbbug kbfix KB238523