How to Schedule PerfStats Collection?

Aug 24, 2012 at 2:04 PM

I want to schedule a PerfStats collection to run from 3-5 AM using SQL Server Agent (preferably) or Windows Scheduler.

I created an Agent job with the OS commands and the job runs succsessfully, but the trace never starts and the Output folder is not generated.  Here are the commands I used (these work when executed manually at the command prompt):

set SQLDIAGCMD="C:\Program Files\Microsoft SQL Server\90\Tools\binn\SQLdiag.exe"

Has anyone successfully scheduled a PerfStats collection?  Were you able to schedule the CNTRL-C break at the end of collection?

Thank you!

Aug 24, 2012 at 2:38 PM

Nevermind...I found that I can use the begin (/B) and end (/E) options in SQLDiag to run this at a scheduled time and that works for me!