?
Solved

SQL Profiler-Duplicate events for same stored procedure

Posted on 2011-09-17
2
Medium Priority
?
352 Views
Last Modified: 2012-05-12
Hello,

I ran sql profiler with Template as "TSQL_Duration" for a stored procedure(A) which inturn calls couple of other stored procedures(B,C,D) from within it.
I see Two RPC:Completed event for the same stored procedure(D) in sql profiler.

Why does this happen?
First RPC:Completed event for stored procedure (D) takes 47 ms and
the second RPC:COMPLETED event for the same stored procedure (D) takes 40 ms.

So should I add those up and take that as the total duration for that stored procedure D (or) do an average of it?

Thanks.
0
Comment
Question by:sath350163
2 Comments
 
LVL 5

Accepted Solution

by:
25112 earned 1000 total points
ID: 36562733
firstly check if both have same SPID and same timeframe.. (possible double execution)?

what about A,B & C- did they all complete only once?
0
 

Author Comment

by:sath350163
ID: 36922011
Yes, you are right.
The same stored procedure is being invoked twice.

Thanks for bringing up this point.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This month, Experts Exchange sat down with resident SQL expert, Jim Horn, for an in-depth look into the makings of a successful career in SQL.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…
Suggested Courses

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question