News

Statistics

Locations of visitors to this page

Personal


Nowdays I am in charge of database optimization on our project.

First I needed to see what the problem was, second resolve them.

So I set on a profiler in Sql Profiler. Being overmotivated I added lots of events to trace which resulted in a table with very many columns. I also did another evil thing, I set the trace to roll at 20M. This resulted in 98 trace files   .

 I tried to find some way to import them in SqlServer, but the SqlProfiler interface only allowed 1 trace file at one time to be saved as an sql table.

Well, it was hell, so I gave up importing them one by one and started to Google for a way to concatenate the SqlProfiler trace files, and here's the Golden code line :

SELECT * INTO trace_table

FROM ::fn_trace_gettable('c:\my_trace.trc', default)

You can read more about it here http://support.microsoft.com/kb/270599 .

The point is there was nothing inn the above link to mention that this line achieves this as well,so the surprise was a pleasant one. 


posted @ Thursday, July 31, 2008 4:10 AM |

Comments

No comments posted yet.
Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: