I wanted to schedule profiler to run at a specific time and produce a trace file. I have scripted the Profiler and use osql to do that from command line using windows scheduler.
My problem is that every day, I want to give a different name to my trace file.
Here's the line in concern in the .sql Profiler script file:
exec @rc = sp_trace_create @TraceID output, 0, N'D:\TBD\Treasury_EOD', @maxfilesize, @Datetime
Any ideas will be welcomed.
Thank you all in advance
My problem is that every day, I want to give a different name to my trace file.
Here's the line in concern in the .sql Profiler script file:
exec @rc = sp_trace_create @TraceID output, 0, N'D:\TBD\Treasury_EOD', @maxfilesize, @Datetime
Any ideas will be welcomed.
Thank you all in advance