Connecting Tech Pros Worldwide Forums | Help | Site Map

Oracle query.

Newbie
 
Join Date: Nov 2006
Posts: 16
#1: Sep 18 '08
I have a SP which stores data in a table, What I want is that whenever data is stored, another SP fires and collects data. But the first SP should not blocked.

I cannot use Trigger on that table and call the second SP from it.

Is there any means in oracle to have this?

Thanks.

amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#2: Sep 18 '08

re: Oracle query.


I assume what you are looking at is when the secound procedure is called from the first, then first should continue its operation without waiting for second procedure to complete?

In this case, make use of PRAGMA AUTONOMOUS TRANSACTION in the second procedure. This should help.
Newbie
 
Join Date: Nov 2006
Posts: 16
#3: Sep 18 '08

re: Oracle query.


Quote:

Originally Posted by amitpatel66

I assume what you are looking at is when the secound procedure is called from the first, then first should continue its operation without waiting for second procedure to complete?

In this case, make use of PRAGMA AUTONOMOUS TRANSACTION in the second procedure. This should help.


Thanks for the reply.
What I want to do is, the 1st procedure will keep a data in a table. And this data whenever comes to the table, acts as an event to fire the second procedure. But the two procedure runs independently.
I will try your advice.
amitpatel66's Avatar
Moderator
 
Join Date: Mar 2007
Location: Hyderabad, India
Posts: 2,192
#4: Sep 18 '08

re: Oracle query.


Quote:

Originally Posted by saby

Thanks for the reply.
What I want to do is, the 1st procedure will keep a data in a table. And this data whenever comes to the table, acts as an event to fire the second procedure. But the two procedure runs independently.
I will try your advice.

Yes, in that case, just insert the data in the table in proc1, and commit and then call the second proc, and as i said include the PRAGMA AUTONOMOUS TRANSACTION in the second procedure
Newbie
 
Join Date: Nov 2006
Posts: 16
#5: Sep 18 '08

re: Oracle query.


Quote:

Originally Posted by amitpatel66

Yes, in that case, just insert the data in the table in proc1, and commit and then call the second proc, and as i said include the PRAGMA AUTONOMOUS TRANSACTION in the second procedure

well, I want the second proc to be called automatically when data goes to the table. can I use trigger or in that case the 1st proc will be blocked.
Reply