I am using sp_trace_setevent and sp_trace_setevent to create a trace file. It works, but most of the data is NULL.
I start the trace, do something, then stop the trace. Then I load the data into a table. I get trace records but most of the fields for all records are NULL. I am tracing for StmtStarting (40) and StmtCompleted (41).
Okay, I solved the problem; ignore this. In case anyone has the same problem, it was just that I did not specify the columns. It is strange; there are various columns that are used for the events and which columns are used depends on the event. Yet the columns do not get data unless the columns are requested explicitly.
Last edited by Sam Hobbs; 06-12-06 at 02:55.
Reason: Add my code and a relevant previous question