Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using SQL Profiler to create a trace file over several days

I'd like to create a single trace file using SQL Profiler that spans several days so I can run it through DTA to get some advice on indexes. My issue is that I would be doing this on my laptop, which i shutdown and take home everynight, so i can't just pause it when i leave and start it when i get back. Also the server is taken down everynight.

Is there a way to concatenate trace files or start a new trace in the morning that writes to the end of the last trace file? Alternatively could i pass multiple trace files to DTA?

like image 663
Abe Miessler Avatar asked Nov 06 '22 16:11

Abe Miessler


1 Answers

In Profiler, use the "Script Trace" option, and then create the trace on the server. You can stop it in a few days' time and query it to your heart's content. It's actually less impact on the server, because it doesn't have to handle talking to the UI on your system.

like image 184
Rob Farley Avatar answered Nov 14 '22 20:11

Rob Farley