2 SQL Tracefiles on startup

  • OK, that looks like it has been successfully switched off.

    Could you run this please

    SELECT * from fn_trace_getinfo(0)

  • Or this:

    SELECT name, create_date FROM sys.procedures WHERE is_auto_executed = 1

    Lee

  • Learn Who Started that Trace with the Default Trace

    slight mod:

    DECLARE @FileName VARCHAR(MAX)

    SELECT @FileName = SUBSTRING(path, 0, LEN(path)-CHARINDEX('\', REVERSE(path))+1) + '\Log.trc'

    FROM sys.traces

    WHERE is_default = 1;

    SELECT

    LoginName,

    HostName,

    ApplicationName,

    StartTime,

    TextData

    FROM sys.fn_trace_gettable( @FileName, 5 ) AS gt

    WHERE EventClass = 175

    and TextData like 'exec sp_trace_setstatus %,1'

  • Thanks for the script

  • A second SQL restart stopped the trace file - not sure why it didnt stop the first time.

Viewing 5 posts - 16 through 19 (of 19 total)

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