Re: How to display the command text when a long transaction is on proc



The only way to see what line is actually executing is to start a trace
beforehand with stmt:starting event.

--
Andrew J. Kelly SQL MVP


"Jason Zhang" <JasonZhang@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:FD8773FA-92F9-4C19-AEA0-343AB999CC50@xxxxxxxxxxxxxxxx
> One connection is using a few store proc to do some transactions. It takes
> a
> long time to complete. I want to know if it's possible to show the
> particular
> SQL statement when the connection is running, e.g. the statement "select *
> from staff" is bottleneck as it consumes the most effort.
>
> Thanks!


.



Relevant Pages

  • Re: Log Reader
    ... Andrew J. Kelly SQL MVP ... >> though you may be runing the script from QA on your machine the trace ... >> Andrew J. Kelly SQL MVP ... >>> comand to stop and clear the trace and re run the commands and it say ...
    (microsoft.public.sqlserver.programming)
  • Re: automating profiler
    ... Andrew J. Kelly SQL MVP ... >> want to trace directly to a table if you care about performance. ... >> Andrew J. Kelly SQL MVP ... >> produce reports with Reporting Services. ...
    (microsoft.public.sqlserver.tools)
  • Re: SQL profiler question
    ... Trace to a file and then use fn_trace_gettable to ... > Andrew J. Kelly SQL MVP ... >> I started a trace that loads a table. ...
    (microsoft.public.sqlserver.tools)
  • Re: SQL profiler question
    ... I created the trace to load a file. ... "Andrew J. Kelly" wrote: ... > Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.tools)
  • Re: Extremely high % Disk Time .. How is this possible??
    ... Andrew J. Kelly SQL MVP ... > Slicing them into logical drives may look better but it does not increase ... I prefer to look at disk queue ... >>> Andrew J. Kelly SQL MVP ...
    (microsoft.public.sqlserver.clustering)