SQL profiler - textdata NULL

  • Hi,

    Have scheduled a trace in sql server job . but when i try to read the trace textdata column is null

    even when i set the event.

    set @on=1

    exec sp_trace_setevent @TraceID, 10, 1, @on

    Pls help how to capture the textdata column

    Note :

    textdata has values when i run it in profiler.

    Thanks....Gugan

  • Odd, are you running the same queries through when running profiler and the server-side trace?

  • I checked the output from the default trace when you script it, and for EventID 10, there was no Column 1. You might try using column 2. Here's what was there:

    exec sp_trace_setevent @TraceID, 10, 15, @on

    exec sp_trace_setevent @TraceID, 10, 16, @on

    exec sp_trace_setevent @TraceID, 10, 9, @on

    exec sp_trace_setevent @TraceID, 10, 17, @on

    exec sp_trace_setevent @TraceID, 10, 2, @on

    exec sp_trace_setevent @TraceID, 10, 10, @on

    exec sp_trace_setevent @TraceID, 10, 18, @on

    exec sp_trace_setevent @TraceID, 10, 11, @on

    exec sp_trace_setevent @TraceID, 10, 12, @on

    exec sp_trace_setevent @TraceID, 10, 13, @on

    exec sp_trace_setevent @TraceID, 10, 6, @on

    exec sp_trace_setevent @TraceID, 10, 14, @on

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply