Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Access Exclusive locking inOracle
Pratul wrote:
>
> I want to do an access exclusive lock in Oracle.
> I have a timer application which needs to pull record from
> a database table with some status (say 100) (Status is a
> column in the my table).
> But processing these records takes a lot of time.So the
> Timer application spawns one more process to pull the newly
> arrived records. This process needs to pull only the fresh
> records not the one which are being processed.
>
> How do I achieve this type of locking in Oracle. If I lock
> the records using
> SELECT FOR UPDATE only one process can use these records!!
>
> Is it possible in Oracle??
>
> Thanks
>
> * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
You could probably cobble something together with DBMS_LOCK.
You could have sessions competing for (say) 10 unique lock id's as allocated through this package.
HTH
-- =========================================== Connor McDonald http://www.oracledba.co.uk We are born naked, wet and hungry...then things get worseReceived on Tue Aug 15 2000 - 05:43:08 CDT