Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Scheduling job at database startup. How?

Re: Scheduling job at database startup. How?

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Thu, 29 Oct 1998 19:18:59 +0100
Message-ID: <3638B193.8BFD3554@sybrandb.demon.nl>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US