sql profiler after every reboot of system

  • Hi

    i have to restart the profiler with all parameters like dbname,etc at every reboot of system.

    what syntax of osql i will have to use,what i think to put that batch file at startup.

    Plz guide me the right way.

    Thanks

  • You'll need some type of delay to run profiler. What you could do is create a stored procedure to start profiler. There are various stored procedures to setup a trace and run it. Then mark that stored procedure as a startup procedure and it will run when the server starts.

  • i used this but i dont know how to give database name filters and other parameters

    declare @traceid int

    exec sp_trace_create  @traceid =  @traceid output

        ,  @options =  2

        ,  @tracefile =  N'C:\sqlquery\trace'

    Kindly suggest

    Thanks

  • Hi

    Can anybody update this ,please

    Thanks

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

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