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 a PL/SQL Program?

Re: Scheduling a PL/SQL Program?

From: <brendan_o'brien_at_wrightexpress.com>
Date: Tue, 12 May 1998 19:48:53 GMT
Message-ID: <6ja936$poq$1@nnrp1.dejanews.com>

  1. After compiling the procedure, you could create a .sql file that simply contains whatever sql*plus 'set' commands you want followed by a line 'exec <procedure_name>'.
  2. Create another (executable) file that sets all appropriate Oracle environment variables (including PATH, ORACLE_HOME, etc.), then executes sql*plus itself with appropriate login and @firstfile.sql.
  3. Schedule the second file through cron. Be sure to redirect standard output and standard error on the cron command to dump messages to some kind of daily log file.

Inelegant perhaps, but provides an easily maintained execution path. Have done it this way many times without difficulty.

-Brendan

In article <3558208a.93814828_at_news.supernews.com>,   mark_tortolano_at_youre.welcome.com (Mark Tortolano) wrote:
>
>
> I have a PL/SQL block that I need to execute after midnight every
> night to update the content of a table. Should I embed this as a
> subprogram directly into the database (I currently run it from
> SQL*Plus, but have problems getting it to run as a cron job)? If I do
> that, how do I trigger it at a given time each day?
>
> Thanks,
>
> Mark Tortolano
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/ Now offering spam-free web-based newsreading Received on Tue May 12 1998 - 14:48:53 CDT

Original text of this message

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