• Offhand, these are the reasons I remember for a trace stop being stopped

    1.the SQL server is stopped and started. If that is the case, you might need to create a procedure that creates your trace, and use the proc option to make it a start up proc, so every reboot/restart also restarts your trace.

    2. You explicitly included a stop time in your sp_trace_create command

    3. You defined a max file size, no rollover, and the trace file hits it's maximum size.

    4. someone actually issued the exec sp_trace_setstatus @TRACEID, 0 ---stop trace, you must know the traceid to stop it

    --#################################################################################################

    --create the trace

    exec sp_trace_create @traceid = @traceidout output,

    @options = @myoptions, --i.e. set @myoptions = 2 -- TRACE_FILE_ROLLOVER = TRUE, SHUTDOWN_ON_ERROR = FALSE

    @tracefile = @mypath,

    @maxfilesize = @mymaxfilesize,

    @stoptime = @mystoptime,

    @filecount = @mymaxRolloverFiles

    --#################################################################################################

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!