Home » SQL & PL/SQL » SQL & PL/SQL » Asynchrony call procedure PL/SQL
Asynchrony call procedure PL/SQL [message #195249] Wed, 27 September 2006 10:21 Go to next message
ibrnadic
Messages: 1
Registered: September 2006
Junior Member
Hi,

My question is in subject this e-mail. I have to call procedure from my main procedure, but this sub procedure has been working asynchrony, something like as threading.

Reason, I would like this situation because sub procedure work a batch job.
Thanks
Re: Asynchrony call procedure PL/SQL [message #195258 is a reply to message #195249] Wed, 27 September 2006 11:43 Go to previous messageGo to next message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
to run pl/sql asynchronously, you can submit the code as a dbms_job. It'll only run once you commit. If that doesn't suit you, then sumit it to dbms_job from an autonomous transaction with it's own commit. Also see dbms_scheduler in 10g - you may be able to run it without committing.

http://oraqa.com/2006/01/24/how-to-execute-jobs-in-parallel/

Re: Asynchrony call procedure PL/SQL [message #201763 is a reply to message #195258] Mon, 06 November 2006 11:01 Go to previous messageGo to next message
yuvallavi
Messages: 2
Registered: November 2006
Junior Member
Hi
I have the same problem but to make life harder
I mast run my pl/sql asynchronously in my session because my code fills TEMP tables
Is it possible?

Thanks
Re: Asynchrony call procedure PL/SQL [message #201985 is a reply to message #201763] Tue, 07 November 2006 13:54 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
No. Can you add an identifier of some sort to your temp table to allow the call to happen in another session?
Re: Asynchrony call procedure PL/SQL [message #202768 is a reply to message #201985] Sun, 12 November 2006 03:16 Go to previous messageGo to next message
yuvallavi
Messages: 2
Registered: November 2006
Junior Member
Thanks

Yes I can add the identifier but this will cancel the idea of working with temporary tables,
I can just rebuild the tables as regular tables.

I use the temp tables for security issues, after I login to my application I populate the temp tables with the items the current user can see,
All my views are link to those temp tables and this way I have “population privilege” .

If I will change it to regular tables I will have to use PL/SQL syntax in my view, and as I understand this will give me bad performers.

Is there a better way?

Thanks
Re: Asynchrony call procedure PL/SQL [message #202847 is a reply to message #202768] Mon, 13 November 2006 01:09 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
Quote:
I use the temp tables for security issues [...] If I will change it to regular tables I will have to use PL/SQL syntax in my view, and as I understand this will give me bad performers.


A couple of things here:
First you say you use temporary tables for security issues, followed by an explanation that has nothing to do with security.
Then you say you need PL/SQL if you'd use regular tables instead of Global Temporary tables, which (to me) doesn't make sense.
And finally you say that using PL/SQL will give bad performance, which is not necessarily so, especially if PL/SQL gets you what you want and not using PL/SQL does not...
So please take back one or two steps and explain what exactly it is you are doing and what you want to achieve.
Previous Topic: date formet
Next Topic: Web PL: Move up/Move down functionality
Goto Forum:
  


Current Time: Fri Dec 06 17:07:01 CST 2024