How to get details about an SQL Trace

  • Is there any way to figure out the host machine name from where an sql trace was originated or some other details like spid against which the trace is running ?

    When I execute the following query -

    SELECT * FROM :: fn_trace_getinfo(default) where property = 5 and value = 1

    I get there are two sql traces running ,for the first one I am sure is the default one initiated by the sql server but not sure about the other one.

    I am also not able to get any idea when I query the following -

    select * from sys.sysprocesses where program_name like '%profiler%'

  • There is no way to tell where the trace was initiated from. You can just get the info you see there and the event and column info from fn_geteventinfo

    "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

  • You can check SQL Server logs. When trace started SQL Server logs event: "SQL Trace ID 3 was started by login NNN". The same message has SPID for the process started trace. If you want to track this in future you can setup SQl Server Alert for the error number 19030 (trace started).

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

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