Solved

SQL Profiler-Duplicate events for same stored procedure

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
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…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

792 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