0

I'm using Microsoft SQL Server Profiler to capture production trace data for replay on a dev server to test indexing changes. Capturing the trace is no problem: I am using a the "TSQL_Replay" trace template with the "Showplan XML Statistics Profile" event added. In the original capture, I can see the execution plan in the trace data.

The problem is when I replay this trace data on the dev server. I don't see any option to configure the replay trace options. I can check "Display execution time" and get timings for individual queries but I can't see the execution plans that run when the trace is replayed. This is critical for determining how the new indexes are being used. I've tried running a separate parallel trace on the dev server while I replay the original trace, but replays don't seem to be picked up.

Any advice on how to measure results when replaying a trace?

I've tried playing with both RML Utilities and the Database Experimentation Assistant but haven't figured out how to get either of them working for this use-case.

asked Sep 30, 2024 at 16:38
2
  • 1
    When you run the parallel trace, is the default filter on ApplicationName that excludes Profile still enabled? Commented Oct 2, 2024 at 6:20
  • @HandyD Great catch! I never thought to dig into the filters. Thank you, now I can capture the replay. I still need to better explore the RML and DEA tools but this helps a lot. Make this an answer so I can mark it. Commented Oct 2, 2024 at 18:37

2 Answers 2

1

By default, Profiler adds a filter to the ApplicationName column to filter itself out. Remove this filter and you should see the replay activity in Profiler.

answered Oct 3, 2024 at 5:04
0

I just turn on QueryStore on the target database. One tip would be to use DBCC CLONEDATABASE which will copy the schema, statistics and querystore data but not the user table contents.

There is a built in reporter tool but I prefer QueryStore.

answered Oct 2, 2024 at 7:55
1
  • Good tip. I need to dig into QueryStore more. Thanks. Commented Oct 2, 2024 at 18:44

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.