Home » RDBMS Server » Server Administration » Endless stored procedure leaves an open session
Endless stored procedure leaves an open session [message #60135] Sun, 18 January 2004 06:55 Go to next message
YuliaG
Messages: 8
Registered: June 2003
Junior Member
Hi Everyone,
Please, help me resolving the following problem:
I have a blocking stored procedure that runs on the database (waits for new entries on Advanced Queue) and leaves an opened session even if the owner thread exits.Please, tell me how I can configure my database to return from this stored procedure if no message arrives (DBMS_AQ.ENQUEUE action) in a specified time.
Thanks a lot for your reply,
Yulia
Re: Endless stored procedure leaves an open session [message #60144 is a reply to message #60135] Mon, 19 January 2004 01:29 Go to previous messageGo to next message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member
Hi,

"Applications can optionally specify a timeout of zero or more seconds to indicate the time that AQ must wait for the arrival of a message. The default is to wait forever until a message arrives in the queue."

Source: Chapter 8 of the "Oracle9i Application Developer's Guide - Advanced Queuing"

This chapter continues with examples for PL/SQL, Java and Visual Basic...

Best regards.

Frank
Re: Endless stored procedure leaves an open session [message #60147 is a reply to message #60144] Mon, 19 January 2004 02:54 Go to previous messageGo to next message
YuliaG
Messages: 8
Registered: June 2003
Junior Member
Hi Frank,
Thank you very much for your reply.
I tried to use this solution (dequeue_options.wait := X;), but it decreases the performance.
Actually, I'm ending the process while it is waiting in the AQ and the db session remains open for very long times. I've seen that agains some dbs it stays open only for a very short time. Do you know what configurations there are that can influence this (the time orphaned sessions stay open ).
Thanks a lot,
Yulia
Re: Endless stored procedure leaves an open session [message #60159 is a reply to message #60147] Tue, 20 January 2004 01:30 Go to previous message
Frank Naude
Messages: 4580
Registered: April 1998
Senior Member
Unfortunately not. If you find a solution, please let us know.

Best regards.

Frank
Previous Topic: CLUSTER Table - Syntax
Next Topic: what is Sample Clause in Select Statement
Goto Forum:
  


Current Time: Fri Sep 20 10:35:10 CDT 2024