Alex Rivera | Logout

Can We use threading in PL/SQL?

Asked 2009-02-23T07:35:08.657
25

Is there any feature of asynchronous calling in PL/SQL? Suppose I am in a block of code would like to call a procedure multiple times and wouldn't bother when and what the procedure returns?

BEGIN
  myProc(1,100);
  myProc(101,200);
  myProc(201,300);
  ...
  ...

END;

In the above case, I don't want my code to wait for myProc(1,100) to finish processing before executing(101,200)
Thanks.

Edit
Report

1 Answer

5

Another way of doing parallel (multi-threaded) PL/SQL is shown here:

http://www.williamrobertson.net/documents/parallel-plsql-launcher.html

The disadvantage of using dbms_job or dbms_schedular is that you don't really know when your tasks are finished. I read that you don't bother but maybe you will change your mind in the future.

EDIT:

This article http://www.devx.com/dbzone/10MinuteSolution/20902/0/page/1 describes another way. It uses dbms_job and dbms_alert. The alerts are used to signal that the jobs are done (callback signal).

answered 2009-02-23T16:01:11.080

Your Answer