A very simple way of scheduling profiler to run and stop at certain date time would be via the command prompt. I'm basically looking for a technical solution (quick and dirty, that is), not reasoning why i'm doing it this way.
My question is very simple, as M$ allows an input argument to be specified for trace stop time with "/M", but i just cant seem to get it working.
The code i'm running in command prompt is as below.
profiler90 /S (local) /O c:\trace.trc /E /M "02-06-08 03:30:00"
"02-06-08 03:30:00" = feb, 06 2008 3.30AM
When checking the launched profiler properties, it doesnt check the trace stop date time and will continue to trace all activities on the server. I've been scratching my head here figuring what's wrong. I was kind of expecting the trace to run from the moment i ran the command and stops automatically at feb, 06 2008 3.30AM, but it doesnt.
By the way, profiler90 doesnt allow scripting as its predecessor, profiler.
Thanks in advance for helping out there.
Microsoft Certified Master: SQL Server 2008