Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: VB, Oracle, Asynchronous execution of procedures

Re: VB, Oracle, Asynchronous execution of procedures

From: Billy <vslabs_at_onwe.co.za>
Date: 27 Oct 2005 23:13:03 -0700
Message-ID: <1130479983.743583.156500@f14g2000cwb.googlegroups.com>


Chris L. wrote:
>
> Turns out, I had a wrong concept of what "autonomous_transaction" is
> and what it accomplishes. Now after some reading I know what's its use.

When all else fails.. RTFM. :-)

> Will look into the DBMS_JOB suggestion and hope it works.

Great suggestion. There's also DBMS_SCHEDULE with Oracle 10G. Starting background processing in Oracle via DBMS_JOB is very easy - using it myself extensively in various systems.

> Billy: Thanks for taking so much time to answer. However you hopefully
> realize it's simpler than what you described.

Only if you have a proper abstraction layer (hopefully o-o encapsulated). There's the correct way of using multi-threading. And there's not. As simple as that. :-)

I often run into developers that want to multi-thread code. But it is a lot more complex than to simply parcel code out into thread objects. A multi-threaded application/system can actually perform worse than if it was serialised. Simply because threads sooner or later have to serialise to access a specific shared resource. And I have seen this often. Like looking at a large plasma display showing performance details of a very critical system.. with users swamping the call centre about performance issues.. and the two 16 CPU monsters showing almost no CPU usage and no extensive memory usage because the developers failed to think the issue through of how threads are serialising their access to a single shared resource.. Thread incorrectly and you -will- pay for it.

> (You went to such a level of detail, I'm surprised you didn't mention CPU
> registers nor posted some assembler code samples :)

You want!!?? You'll be making my day. But first, I have to brew a big can of coffee as we're going have a loooonnngg talk... ;-)

I always tend to give rather too much technical detail than too little. Too little can cause serious injury to code, database or operating system.

> What I want to do is tell the DB engine, "Start this package/procedure.
> I don't care if it takes minutes or days for it to finish. Just start
> it". Of course I know those procedures don't return data so I don't
> need to wait for them to finish. I thought there was a simple way to
> tell Oracle "run this command in a different independent session."

And that specific requirement is best dealt with using DBMS_JOB.

--
Billy
Received on Fri Oct 28 2005 - 01:13:03 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US