Sql-server – Replay trace file and filter on error>0

sql serversql-server-2008-r2trace

I have captured a trace file using the replay template. It includes all columns available, of course including ERROR. When I replay this trace file, the "trace configuration" window pops up, I declare the target server, save the result to a new trace file and run the trace.
When I then load the new trace file, most of the columns are gone, including the error column. I was hoping to filter on ERROR > 0 in the resulted trace file of the replay action to find queries having problems on the replayed-against server.
Why are the columns not included anymore – and why does the new trace file contain not all events anymore but instead includes these "Replay Result Row Events" (e.g. Name = blabla…) ?

Edit:
Meanwhile I followed a suggestion to look at the trace file using a sql query:

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

to see ALL columns. Unfortunately here the columns are displayed but contain all a NULL value where I had expected to see values e.g. for ERROR.

Best Answer

"I have captured a trace file using the replay template"

I believe this is your problem. Create a server-side trace using the stored procs rather than the replay template. Then execute:

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

To see your columns. I used the same method as you and had exactly the same issue. There are other tools available to replay your workload outside of profiler, and I would recommend you look into SQLNexus or Distributed Replay.