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: How can I run a procedural in scheduling?

Re: How can I run a procedural in scheduling?

From: atta ur-rehman <atta707_at_hotmail.com>
Date: 21 May 2001 04:13:25 -0700
Message-ID: <6e453d75.0105210313.48dc9e93@posting.google.com>

hi eric,

perhaps DBMS_JOB.SUBMIT is what you are looking for. this method is used to register a job, potentially reoccuring, with Oracle. once registered a job, which essentially would be a stored procedure, is run according to parameters given in SUBMIT method. here goes the syntax of DBMS_JOB.SUBMIT right out of my oracle 8.1.6 manual:

DBMS_JOB.SUBMIT (
  job OUT BINARY_INTEGER,
  what IN VARCHAR2,
  next_date IN DATE DEFAULT sysdate,
  interval IN VARCHAR2 DEFAULT &#8217;null&#8217;,   no_parse IN BOOLEAN DEFAULT FALSE,
  instance IN BINARY_INTEGER DEFAULT any_instance,   force IN BOOLEAN DEFAULT FALSE);

and an example given in the same section:

VARIABLE jobno number;
BEGIN
 DBMS_JOB.SUBMIT(:jobno,
 &#8217;dbms_ddl.analyze_object(&#8217;&#8217;TABLE&#8217;&#8217;,  &#8217;&#8217;DQUON&#8217;&#8217;,
&#8217;&#8217;ACCOUNTS&#8217;&#8217;,
 &#8217;&#8217;ESTIMATE&#8217;&#8217;, NULL, 50);&#8217;  SYSDATE, &#8217;SYSDATE + 1&#8217;);
 commit;
END;
/
Statement processed.

print jobno
JOBNO



14144

This submits a new job to the job queue. The job calls the procedure DBMS_
DDL.ANALYZE_OBJECT to generate optimizer statistics for the table DQUON.ACCOUNTS. The statistics are based on a sample of half the rows of the
ACCOUNTS table. The job is run every 24 hours:

i hope this would help you start with scheduling your procedure.

:) ATTA "Eric" <maw_at_tpts5.seed.net.tw> wrote in message news:<9edlol$2dk9$1_at_news.itri.org.tw>...
> Dear All:
> I had a procedural need to run day by day? Had any way to solve it?
> I had find a procedural dbms_aqadm.schedule_propagation. But when I Use
> it,Oracle always had error message "dbms_aqadm.schedule_propagation Not
> Declare!!".
>
> example:
> EXECUTE dbms_aqadm.schedule_propagation( queue_name => 'BOLADM.test');
>
>
> Eric
Received on Mon May 21 2001 - 06:13:25 CDT

Original text of this message

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