Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

See running procedure in SQL server Profiler

How can I see running procedures in SQL Server Profiler?

It only shows when the execution is done.

I have some procedures that requires my attention if it is taking too long to get executed. Getting to know after it is done is useless for me

thanks

like image 601
RollRoll Avatar asked May 11 '26 05:05

RollRoll


1 Answers

SQL Profiler can definitely show you which statements, procs and batches are running before they complete.

Ensure that the template you select in profiler has the applicable events, to see when statements / procs start, i.e.

  • SQL:StmtStarting
  • SP:Starting
  • SP:StmtStarting (to view statements in the SPROC)

In addition to the *Completed events. Obviously metrics such as duration, cpu, io etc aren't available in the Starting events.

You can also select these events by changing the Properties and selecting these from the Events tab. If you a profiling a very busy server, ensure that you apply filters like DatabaseName, HostName or even SPID if you are fortunate enough to be able to isolate it (you may need to check Show All Events and columns checkboxes)

like image 193
StuartLC Avatar answered May 17 '26 06:05

StuartLC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!