Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Oracle security vulnerability, nuisance, or paranoia?
In article <41e401e2$1_2_at_127.0.0.1>, DA Morgan says...
>
>casey.kirkpatrick_at_gmail.com wrote:
>
>> This leads me to another thought - wouldn't it be nice if Oracle
>> offered another token "UNLOCKED ONLY", to be used like:
>>
>> CURSOR C1_CUR IS
>> SELECT * FROM T1
>> WHERE <conditions>
>> FOR UPDATE
>> UNLOCKED ONLY;
>>
>> where "UNLOCKED ONLY" is like a sister command to "NOWAIT" which simply
>> ignores any rows which cannot be acquired without a NOWAIT violation?
>> Or would there be data integrity violations down that road?
>
>If I understand your intent it already exists.
>
>SELECT ...
>FROM ...
>WHERE ...
>FOR UPDATE NOWAIT SKIP LOCKED;
>
>It was created, as I recall, as part of Advanced Replication, and is
>not documented. Search the archives as Tom Kyte has posted some warnings
>with respect to its use. I can't find them right now and don't want to
>rely on my memory.
it is for AQ (queues) and is dangerous in the wrong hands as it works for special cases of certain SQL statements only. Not documented.. the method the OP used (query the data's rowid, select for update by rowid) is the way to do it if you need this functionality.
-- Thomas Kyte Oracle Public Sector http://asktom.oracle.com/ opinions are my own and may not reflect those of Oracle CorporationReceived on Tue Jan 11 2005 - 13:17:42 CST