Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: how can I set lock timeout ?
Eunsook Jin wrote:
>
> Using oracle OCI, how can I set the lock timeout ?
> I want to rollback my transaction if it's waiting for the lock after
> specified timeout expiration.
>
> Thanks in advance.
>
> from Eunsook.
oracle doesn't have one natively...
some options:
while true loop
begin
( try to get your lock in nowait fashion)
exception when lock_timeout then
if no_attempts > max_seconds then
raise;
else
dbms_lock.sleep(1); no_of_attempts := no_of_attempts + 1end if;
etc - hope you get the idea
Cheers
--
"Some days you're the pigeon, and some days you're the statue." Received on Sun Sep 05 1999 - 03:43:01 CDT
![]() |
![]() |