SQL Server Agent and server side traces

  • Hi,

    You don't need to set up anything for SQL Server Agent to autostart - just set the property of the service to Autostart (in Administrative Tools/Services).

    You could have a stored procedure (which you configure as a startup procedure) that calls sp_trace_setstatus (which in it's turn changes the status on the trace you have defined from Status = 0 to Status = 1).

    Have you done this before so you know the steps to take to define a trace with T-SQL?

    HTH!

    /Elisabeth

    elisabeth@sqlserverland.com
    MCITP | MCT
    http://sqlblog.com/blogs/elisabeth_redei/
    http://linkedin.com/in/elisabethredei

  • SQL Server Agent has to auto-start because we have to update thousands of machines where the users may have very little computer knowledge.

    My second question was really a brief afterthought while writing the post. So I decided to give it a try and it worked! I can write the server-side trace as an auto-start stored procedure. We still have a bit of testing to do but it seems to be working.

    Thanks for your comments!

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

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