SQL Profiler trace files

  • All ,

    I want to know who is running SQL profiler trace files being created in one of server drives and filling up the disk space . I tried to locate the process using sp_who2 but couldn't find any process with command as " SQL profiler ------" Can anyone help to get maximum possible details of this SQL profiler trace created ?

    TIA

  • Try this:

    Select * from sys.traces;

    EXEC sp_trace_setstatus @traceid, 0 -- stops the trace

    EXEC sp_trace_setstatus @traceid, 2 -- closes the trace

    Cheers,

    Robert

  • You can also use this to get running trace info:

    select * from sys.fn_trace_getinfo (0);

    Joie Andrew
    "Since 1982"

  • This doesn't give me who is running and for what purpose exactly ?

    tried sys.traces and fn_trace_getinfo(default)

  • 1 ) You might be able to see who was starting the trace in SQL Server Log ...

    2 ) What is running : open the trace file or just read from it : SELECT * FROM

    fn_trace_gettable('S:\MSSQL12.MSSQLSERVER\MSSQL\Log\log_23.trc', 1)

    Cheers,

    Robert

  • Check this out. If you have the default trace enabled and the file from when the trace was created is still available you might be able to find out what you are looking for it looks like.

    http://sqlblog.com/blogs/jonathan_kehayias/archive/2010/12/29/learn-who-started-that-trace-with-the-default-trace.aspx

    Joie Andrew
    "Since 1982"

Viewing 6 posts - 1 through 5 (of 5 total)

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