Microsoft KB Archive/238523

From BetaArchive Wiki
Knowledge Base


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.

REFERENCES

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.

Keywords: kbbug kbfix KB238523