Submitting A Stored Procedure Asynchronously

  • Comments posted to this topic are about the content posted at http://www.databasejournal.com/features/mssql/article.php/342758

    Gregory A. Larsen, MVP

  • The link points to an article that discusses using the BeginExecuteNonQuery command. In my opinion, while this is techincally a means to execute a stored procedure asynchronously, in a practical sense, it is no different than ExecuteNonQuery because you have to hang around and wait until it finishes and then do an EndExecuteNonQuery. This defeats the purpose entirely of launching the stored procedure asynchronously in the first place, which is to launch it and then get out of Dodge.

    Unless...

    One of the options of the BeginExecuteNonQuery is to specify a callback procedure. It is unclear to me if the session/connection has to remain active for this to work.

    The goal is to connect, launch the store procedure, disconnect and even close the browser/client if desired.

    Other options I have read about are to create SQL Server Agent Job. Is the whole damned SQL server put together with duct tape and bailing wire?

  • I'm about to head down the Service Broker route. I think it's held together with crazy glue.

    http://blogs.msdn.com/rushidesai/archive/2005/02/09/746793.aspx

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply