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: Simple Use of dbms_scheduler

Re: Simple Use of dbms_scheduler

From: Anurag Varma <avoracle_at_gmail.com>
Date: 21 Feb 2007 15:14:09 -0800
Message-ID: <1172099649.703212.76950@h3g2000cwc.googlegroups.com>


On Feb 21, 12:57 pm, "Ed" <e..._at_mail.com> wrote:
> I just want a stored proc process to run in a separate session, immediately
> no scheduling
>
> I could use dbms_job to spawn it.
>
> How do I do it with dbms_scheduler ?
> How do I spawn "test" ?
>
> CREATE OR REPLACE PACKAGE BODY testpkg IS
>
> PROCEDURE test(p_alpha IN NUMBER DEFAULT 4321) IS
> BEGIN
> null;
> END;
>
> END;
>
> thanks
> 10gr2

I ain't no dbms_scheduler expert .. but here is what I think is equivalent (hopefully the values/arguments are self explanatory):
10GR2> begin

  2       DBMS_SCHEDULER.CREATE_JOB(
  3              job_name => 'ONE_TIME_JOB',
  4              job_type => 'PLSQL_BLOCK',
  5              job_action => 'begin testjob_proc; end;',
  6              start_date => systimestamp,
  7              enabled => true,
  8              auto_drop => true);

  9 end;
 10 /

PL/SQL procedure successfully completed.

10GR2> select * from testjob;

A



21-FEB-07 17:47:04 Anurag Received on Wed Feb 21 2007 - 17:14:09 CST

Original text of this message

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