Solved

SQL Profiler-Duplicate events for same stored procedure

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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

770 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