>>So, how can I get the SQL Server session id my query is running in?
>
>SELECT @@SPID
Thank you.
So, you say the query that runs the lengthy query should have an asynchronous connection, and the one that reads the advance of the first query should not be asynchronous. What I don get is, in what moment the one that reads the advance should be issued? And how can I know that the lengthy query is completed?
TIA