Re: DBMS_JOB?
Date: 1996/12/09
Message-ID: <58hnpr$5cb_at_inet-nntp-gw-1.us.oracle.com>#1/1
In article <01bbe5e6$1013ea40$0e433a82_at_gorbonosov.swarthmore.edu>, "Gary G" <ggorbon1_at_swarthmore.edu> writes:
|> Hello everyone,
|> The task I'm trying to accomplish is to run a procedure in background, so
|> that I have control back to the Form/SQL prompt, once the job is submitted.
|> So far I haven't been able to do so. I tried to run the procedure from
|> "AFTER INSERT" trigger - no success, and with DBMS_JOB - no success; in
|> both cases, I loose control of the Form until procedure is completed. Are
|> there any other ways to do this?
If you use DBMS_JOB.RUN to run a job, it will run in the current process, not one of the background job processes. This will block the current process until the job completes. You can use DBMS_JOB.SUBMIT to schedule the job to start immediately (executed by a background process, and thus not blocking the current process) by using SYSDATE for the next_date parameter.
Make sure that you have the init.ora paramaters JOB_QUEUE_PROCESSES set to > 0 and JOB_QUEUE_INTERVAL set appropriately. For more information, see Chapter 11 of _Oracle PL/SQL Programming_ (info below) or the Oracle documentation.
|> Thanks in advance.
Scott Urman Oracle Corporation surman_at_us.oracle.com
Author of _Oracle PL/SQL Programming_ ISBN 0-07-882176-2 Published by Oracle Press - http://www.osborne.com/oracle/index.htm
"The opinions expressed here are my own, and are not necessarily that of Oracle Corporation"
Received on Mon Dec 09 1996 - 00:00:00 CET
