Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simple Use of dbms_scheduler
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);
PL/SQL procedure successfully completed.
10GR2> select * from testjob;
A