I have captured a trace in profiler and stored the trace to both a table and an xml for replay. I open the xml and replay the trace on the same server/database with modified stored procedures (I want to check the performance of some changes). In the replay options I choose "save to table" to store the replay results for later analysis. The replay went well with a few errors about 'bulk inserts' which I accept since the profiler documentation states that it does not replay bulk events.

My problem is that the replay trace table does not have the same columns as my original trace! specifically the duration and cpu columns. I really need these in order to compare the two sets of results. Is there anything I am missing in the replay setup or anywhere?

Thanks dat_girl

1 Answer 1


Are you using one of the default traces in Profiler or are you creating it manually?

If I were in the same situation, I would just save the trace to a regular text file and then import that file into a SQL Server table.

USE mydb 

SELECT * INTO mytracetable FROM ::fn_trace_gettable('c:\my_trace.trc', default)

At least that way you are certain to get the same columns everytime. As to the BULK INSERT statements, you could try this filter.

Column Filter for TextData with the Not Like set to %BULK INSERT%.

  • Hi Craig, I followed your suggestion, but it looks like although we can see the columns using your query, they are all NULL (e.g. error), maybe for the same reason why they are not displayed in the profiler application. Any idea why?
    – Magier
    Sep 22, 2015 at 15:22
  • Hello @Magier, are you sure that your trace file actually contains data? Sep 23, 2015 at 5:00

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.