Imediate return to the calling program after starting a procedure [message #20883] |
Thu, 27 June 2002 06:16 |
Andy Douglas
Messages: 1 Registered: June 2002
|
Junior Member |
|
|
I am using VB to call a procedure on the Database server. The procedure may take 2 - 3 hours to complete. I need to start this procedure and return to the VB program imediately. Is there a way to spawn a process on the server which could call the procedure and imediately return to the VB program?
|
|
|
Re: Imediate return to the calling program after starting a procedure [message #20888 is a reply to message #20883] |
Thu, 27 June 2002 09:00 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
I think your best option here is to use job scheduling in the database via DBMS_JOB. You can submit an entry into the job queue from VB and control will immediately pass back to VB. Meanwhile, via the job queue, the proc will run, and by not specifying an interval, the job will be deleted after it runs.
dbms_job.submit(:jobno, 'yourproc;');
where :jobno is a OUT parameter from the procedure indicating the job number assigned to your job. You can ignore this return value.
|
|
|
|