Can I use MS Agent to run a profile at a set time of day?

  • I have some nightly jobs which are failing for some reason. These are vbs scripts that are doing multiple tasks related to an SQL 2k DB and a DTSearch index. They run at 3.00am at night and fail at the same place. However when I manually run this job (logged in as scheduled user with same permissions!) at whatever time it runs perfectly well so I am suspecting that it is down to something happening at that time of day.

    I want to be able to schedule a profiler trace to run on this server to start just before my vbs job does and finish a set time after so that I can see if there is anything else going on which is affecting these jobs. I looked at MS Agent but couldn't see an option for this. Does anyone know how I can do this without just leaving the trace running from when I leave at night and stopping it in the morning ???

    Any help much appreciated

  • This was removed by the editor as SPAM

  • You do not need to use the profiler. Using profiler is alway dangeous if you cannot narrow down your problems.

    I would like to recommend you to create an error report.

    Go to the job properties;

    Edit step;

    Advanced tab;

    Create error file.

    Best luck

  • The sp_trace_% stored procedures can run profiles and dump them to files.  Be prepared to spend a few hours learning how to configure the traces.

    Be careful however, I've generated several gigs/hour of trace files on even small databases.

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

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