1

Given the following two SQL Server 2005 stored procedures (samples only):

ProcA:

ALTER PROCEDURE [dbo].[ProcA]
AS
BEGIN
    EXEC ProcB
END

ProcB:

ALTER PROCEDURE [dbo].[ProcB]
AS
BEGIN
    WAITFOR DELAY '000:00:10'
END

When ProcA is executed, it predictably takes 10 seconds since it is waiting for ProcB to complete.

Is it possible to have ProcA call ProcB asynchronously, so that ProcA returns as soon as it has called ProcB and does not wait for ProcB to complete before returning?

4

1 に答える 1

0

この回答その後のブログ投稿を見つけて、最終的にストアド プロシージャを非同期で実行するために使用しました。

于 2013-02-05T20:29:43.413 に答える