Schedule profiler to run a user template...

  • Hello,

    I've created one SQL Server profiler template to catch all deadlocks/locks in a specific database.

    The point is:

    I've configured the profiler to run and stop it at 4am but i've got to start the profiler manually and if i'm not here.... i've got problems :w00t:

    Can anybody send me a solution so that i can start this profiler automatically at 7pm and then stop it at 4am.

    Thanks and regards,

    JMSM 😉

  • Script out the trace (option on the File menu of Profiler), set the file location and set the stop time for 9 hours after the current time (dateadd(hh, 9, getdate()) and run it as a SQL Agent job.

    It's explained here:

    http://www.simple-talk.com/sql/performance/finding-the-causes-of-poor-performance-in-sql-server,-part-1/

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Thanks Gail.

    Regards,

    JMSM 😉

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

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