Click here to Skip to main content
15,889,992 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
Hi all.
I have a query that it need 2 minutes for executing (for each reason).
I don't want to discuss about its performance.

My question is: How can I find situation about a query that it is executing now and it has not executed completely yet . for example How can my c# code find how many records are affected or percent_complete by my query every 10 seconds while that query is executing? Is sql profiler says that to us? I used "sys.dm_exec_requests" and "percent_complete" column, but it shows 0. what should I do?
Posted

1 solution

 
Share this answer
 
Comments
[no name] 10-Oct-10 4:42am    
I used "sys.dm_exec_requests" and "percent_complete" column, but it shows 0 and "row_count" column shows 1 yet.
heeeeeeeeeeeeeeelp
Xmen Real 10-Oct-10 5:51am    
It should show some progress.
Xmen Real 10-Oct-10 5:52am    
Some info about it

http://sqlblog.com/blogs/aaron_bertrand/archive/2008/07/01/sys-dm-exec-requests.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900