Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an application that makes RPC calls for a single procedure, most calls run in a few miliseconds. Occasionally the call takes 5-7 seconds. I'm trying to catch an execution plan for one of the long running calls.

If you trace ShowPlan XML and RPC:Complete events, there are multiple events per procedure call. With the volume of user traffic, it's difficult to link specific ShowPlan XML events with RPC:Complete events - which makes it difficult to isolate the query plans for

Is there a column that can be used for both ShowPlan XML and RPC:Complete to link the two? Or is there a way to group query plans by batch?

share|improve this question
Have you tried just pulling it from the plan cache? If you catch it around the time it runs I would think it would be easier than tracing. – Shawn Melton Jan 17 '14 at 0:56
Refer to How to Identify Slow Running Queries with SQL Profiler. Its very detailed article and will help you out. Also, is that SP running slow from application ? Have you tried running it from SSMS.There might be parameter sniffing problem. Slow in the Application, Fast in SSMS? – Kin Jan 17 '14 at 2:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.