Trace

  • Hi

    I'mtrying to find out the exact difference between batch-level trace and a statement-level trace in sql server.

    Can any one helpmeout inthis regard.

  • sandhyarao49 (2/2/2010)


    Hi

    I'mtrying to find out the exact difference between batch-level trace and a statement-level trace in sql server.

    Can any one helpmeout inthis regard.

    I'm not sure if I'm explaining this clearly

    But Batch events relate to the whole batch being executed..for example the BatchCompleted event reports information on the batch start time, end time, duration, reads, writes etc. If the batch is astored proc call all you will get is one entry when the batch completes. The only data in the text data column will be the call to the stored proc. If that stored proc is slow and you tuning it and you want to see which statements inside the proc are performing poorly then you need to dig a bit deep into the proc and look at the exact TSQL statements that make up the proc so...

    Stmtcompleted, if you have that event in the same trace, if said Stored Proc is made up several TSQL statements each statement will recorded in the trace separately giving a breakdown of each one.

    HTH

    Gethyn Elliswww.gethynellis.com

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

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