SQL SERVER SERVER SIDE TRACE

  • Hey folks,

    I wrote a server side trace in stored proc.And the store proc executes on the start up of the sql server.

    But the problem is trace only lasts for a minute.

    Can any one help me in running the trace continuously?

  • Are you setting an end date for the trace or changing its state, I would have to say that you need to include more data about what exactly your code is doing to help diagnose the problem.

    CEWII

  • I am just setting the status but not setting the end date

  • my guess is your trace create script looks like this

    sp_trace_create @TraceID output, 0, N'InsertFileNameHere', @maxfilesize, NULL

    It hits the max file size but does not rollover, it should look like this

    sp_trace_create @TraceID output, 2, N'InsertFileNameHere', @maxfilesize, NULL

    -----------------------------------------------------------------------------------------------------------

    "Ya can't make an omelette without breaking just a few eggs" 😉

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

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