Solved

SQL Profiler-Duplicate events for same stored procedure

Posted on 2011-09-17
2
320 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 250 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

707 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now