I have configured Statspack on my dbase. I'm manually starting the collector on a daily basis using @spauto.sql. This is fine to an extent. I now want to start it automatically using a cron job and say run it between the peak operating hours of 9 and 5. I should be able to do this.
However, I'm not sure about killing this job each night before the backup at 9pm. We have a cold backup in place which obviously stops it. I would ideally like to restart it the next day at 9am using cron.
Has anyone else out there done this? or do you have any other ideas?
Thanks in advance...
spauto.sql sets up the job to run every hour on the hour. I don't think this is really what you want.
What I would do is setup a cron job that executed statspack.snap inside a script. I would then schedule that script to run through the cron at the top of the hour between 09 and 17 every day.
Note: I have setup a cron that runs evey hour on the hour, but it would be simple to modify it to only run certain hours. I prefer this method over dbms_job because I can track the job through an OS log file rather than dbms_job.
Thanks for that. I will try that out. Thats exactly what I want to do.
I will let you know if I get into any odd problems.