Wednesday, June 27, 2012

Trace Replay via SQL Server Profiler Fills C: Drive

You might notice that SQL Server Profiler fills up your C: drive with temporary files while you're doing a replay. I found this out quickly since my C: drive was rather small and only had about seven gigabytes of free space.When you're running a trace replay from Profiler there is actually a trace running that monitors the activity of the replay. This is how you can see what the results of the replay are. The problem with this is that, by default, the results of the trace are being stored in temporary files on the C: drive.

One solution I read about suggested that I change the TEMP and TMP environment variables to point to another drive. I tried this but it didn't seem to help.

The trick was to disable the Display replay results option when you start the replay (see below). The replay still displays the results and will still save them to a file if you have that option selected but, for some reason, it doesn't dump nearly as much information to the C: drive.

I am not exactly sure why this solution works. I am guessing that the results are just held in memory but, again, I just don't know. If you have any additional insight, please leave a comment below.

I will also be posting more information on trace replays as part of the SQL Server 2012 Upgrade series. (See Part 1: The Test Environment) Keep your eye out for it later this week.

Did this help you? Please let me know in the comments!

No comments:

Post a Comment