Re: OCI timeout question

From: Peter Dickmann <pdickmann_at_de.lhsgroup.com>
Date: 2000/05/26
Message-ID: <392e6f3c_at_news.lhsgroup.com>#1/1


I guess you want to avoid waiting for a lock beeing released which is held by onother transaction. I don't know how to control the timeout duration, but you can work around using the NOWAIT clause, e.g. SELECT bla FROM tab FOR UPDATE OF col NOWAIT. You could set up a loop including a timer where the statement is executed until it succeeds or the specified time is due. Perhaps a sleep() should be included in order to reduce the number of calls. But, if the statement itself needs more than 10 s runtime, you can only kill the session, I guess.
Peter

Erika <erika_at_no_spam.com> wrote in message news:392D9438.879B1B84_at_no_spam.com...
> Hi,
>
> I'm trying to specify the amount of time an OCIStmtExecute() should
 attempt to
> execute a write to the database before it gives up. I have a test case
 where I
> am forcing a timeout error to occur (I write to the table in sqlplus and
 do
> _not_ commit -- my program shows a timeout error after 60 seconds). I
 need to
> be able to have it timeout after 10 seconds.
>
> I tried using the timeout parameter of the OCITransStart() function, but
 no
> matter what I set it to - it always times out in ~60 seconds.
>
> Is there a way to set the timeout time in either OCI or in the db server
 itself?
>
> Thanks!
>
> Erika
>
>
Received on Fri May 26 2000 - 00:00:00 CEST

Original text of this message