Microsoft KB Archive/238523

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

Article ID: 238523

Article Last Modified on 3/14/2006

-

APPLIES TO


 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q238523



BUG #: 55660 (SQLBUG_70)



SYMPTOMS
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.



CAUSE
The task returns after the first command is completed since the "Execute SQL Task" option expects only one result set.



WORKAROUND
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.



STATUS
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.