Home All Groups Group Topic Archive Search About

Profiler event class question

Author
30 Dec 2005 2:52 PM
SSM
When capturing tuning data in SQL Profiler, what are the key differences
between event classes 10 (RPC Completed), 12 (TSQL Batch Completed), and 45
(SQL Stmt Completed)?

Author
30 Dec 2005 4:02 PM
Dan Guzman
A batch is a group of one or more Transact-SQL statements that is executed
as a unit.  The TSQL Batch Completed event indicates is generated when a
batch completes.  The reported metrics for the event are the accumulation of
all statements within the batch.

The SQL stmt completed event occurs when a SQL statement within a
Transact-SQL batch completes.

An RPC (Remote Procedure Call) is a stored procedure that is executed using
a client API that allows remote procedure call execution.  The RPC completed
is generated when the procedure execution completes.  The reported metrics
for the event are the accumulation of all statements within the procedure.

The SP stmt completed event occurs when a SQL statement within a stored
procedure completes.

--
Happy Holidays

Dan Guzman
SQL Server MVP

Show quote
"SSM" <S**@discussions.microsoft.com> wrote in message
news:00995159-156F-4E1B-896D-DFD9BBBBDD13@microsoft.com...
> When capturing tuning data in SQL Profiler, what are the key differences
> between event classes 10 (RPC Completed), 12 (TSQL Batch Completed), and
> 45
> (SQL Stmt Completed)?
Author
31 Dec 2005 12:58 AM
David Gugick
Dan Guzman wrote:
Show quote
> A batch is a group of one or more Transact-SQL statements that is
> executed as a unit.  The TSQL Batch Completed event indicates is
> generated when a batch completes.  The reported metrics for the event
> are the accumulation of all statements within the batch.
>
> The SQL stmt completed event occurs when a SQL statement within a
> Transact-SQL batch completes.
>
> An RPC (Remote Procedure Call) is a stored procedure that is executed
> using a client API that allows remote procedure call execution.  The
> RPC completed is generated when the procedure execution completes. The
> reported metrics for the event are the accumulation of all
> statements within the procedure.
> The SP stmt completed event occurs when a SQL statement within a
> stored procedure completes.

Dan,

I would add that if not using an RPC, the SQL:StmtCompleted event is
raised after a stored procedure completes and it contains the
performance metrics for the stored procedure execution.

--
David Gugick
Quest Software
www.quest.com

AddThis Social Bookmark Button