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

Home -> Community -> Usenet -> c.d.o.tools -> Re: dbms_job

Re: dbms_job

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/05/06
Message-ID: <33704c26.1442474@newshost>#1/1

On Mon, 05 May 1997 14:01:31 -0500, Tom Hanstra <hanstra.1_at_nd.edu> wrote:

>I'm trying to use the dbms_job package without much luck. Does
>anyone have an example or two of how this package works?
>
>Thanks in advance. Please email replies.
>
>Tom Hanstra
>------------------------------------------------------------------------
>Thomas A. Hanstra Phone: (219)631-4686
>Office of Information Technologies Email: hanstra_at_puck.cc.nd.edu
>University of Notre Dame
>Room G011 Computing Center/Math Building
>Notre Dame, IN 46556
>------------------------------------------------------------------------

Make sure the job parameters are set in your init.ora, for example:

NAME                                TYPE    VALUE
----------------------------------- ------- ------------------------------
job_queue_interval                  integer 60                            
job_queue_keep_connections          boolean FALSE                         
job_queue_processes                 integer 1                             

And then, its as easy as:

declare
  l_job number;
begin
  dbms_job.submit( l_job, 'SomeProcedure;' ); end;
/

NOTE the semicolon. Dbms_job simply takes the 'WHAT' portion of its input, glues a begin on fron and an end; on the end and executes it. So the above would become:

begin
  SomeProcedure;
end;

Without my semi-colon, it would not work. Note that you can pass in any statement, does not have to be a procedure. For example:

dbms_job.submit( l_job, 'insert into T values (1);' );

would be valid as well...

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue May 06 1997 - 00:00:00 CDT

Original text of this message

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