Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Scheduling job at database startup. How?
Hi Dana,
Somehow this will need to be taken care of by a combination of NT and Oracle.
The Oracle part is easy enough.
Build a script, blabla.sql
with the following lines
connect internal
execute <your stored procedure>
exit
call it in a .cmd or .bat file with
svrmgr23
@blabla.sql
The problem here is how to make sure it is started at instance startup. As far as I remember the OracleStart<SID> service calls a .bat file. You could just well modify that bat file (has to be repeated at every upgrade). For manual restarting the database you would then write a .bat file with the oradim73 command to restart the database and a svrmgr23 command to run the sql script.
Hth,
Sybrand Bakker, Oracle DBA
Dana Stockler wrote:
> I'm running Oracle 7.3 on NT 4.
>
> I've built a stored procedure to pin some packages in memory. It is
> basically a wrapper around the DBMS_SHARED_POOL.KEEP procedure.
>
> Is there any way to schedule a database job to run my procedure just after
> the database starts? If there is I don't see it.
>
> I can schedule a job to be run every hour, for instance, and this would pin
> my packages within an hour of a database start, but this doesn't seem
> very elegant. Any way to do it just once, right after the database starts?
>
> TIA,
> Dana Stockler
Received on Thu Oct 29 1998 - 12:18:59 CST
![]() |
![]() |