Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: statspack auto starting/stopping
Bruce wrote:
>
> I have configured Statspack on my hp-ux 8.1.7.1.0 Oracle 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...
Check out using DBMS_JOB - much easier than cron since it will only run when the db is up...
SQL> variable j number
SQL> exec dbms_job.submit(:j,'statspack.snap;',...)
hth
connor
-- ============================== Connor McDonald http://www.oracledba.co.uk "Some days you're the pigeon, some days you're the statue..."Received on Thu Apr 04 2002 - 13:00:48 CST