Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> DBMS_LOCK.ALLOCATE_UNIQUE
Hi Everyone...
I've encountered a strange issue and wanted to know if anyone else have ever seen something like this... I've had this issue occur on two different systems... In each case the systems Solaris 9 running 9.2.0.2 and then upgraded to 9.2.0.3... The issue is when you supply a string to DBMS_LOCK.ALLOCATE_UNIQUE you should get a unique lock handle back... For example...
SQL> Declare
2 sLockName1 Varchar2(100) :=
'PARTITION_C02_NRAW_000_H0_2003050400_LCK';
3 sLockName2 Varchar2(100) := 'PVM_VIEWS_NRAW_000_LCK'; 4 sLockHandle1 Varchar2(100); 5 sLockHandle2 Varchar2(100);
7 Dbms_Lock.Allocate_Unique( sLockName1, sLockHandle1 ); 8 dbms_output.put_line(sLockHandle1); 9 Dbms_Lock.Allocate_Unique( sLockName2, sLockHandle2 ); 10 dbms_output.put_line(sLockHandle2);11 End;
10737418261073741826149
PL/SQL procedure successfully completed.
But, I am encountering a situation where two DIFFERENT lock names are producing the EXACT SAME lock handle... i.e.
SQL> Declare
2 sLockName1 Varchar2(100) :=
'PARTITION_C02_NRAW_000_H0_2003050500_LCK';
3 sLockName2 Varchar2(100) := 'PVM_VIEWS_NRAW_000_LCK'; 4 sLockHandle1 Varchar2(100); 5 sLockHandle2 Varchar2(100);
7 Dbms_Lock.Allocate_Unique( sLockName1, sLockHandle1 ); 8 dbms_output.put_line(sLockHandle1); 9 Dbms_Lock.Allocate_Unique( sLockName2, sLockHandle2 ); 10 dbms_output.put_line(sLockHandle2);11 End;
10737418261073741826149
PL/SQL procedure successfully completed.
Has anyone seen anything like this before?
Regards,
Tim Johnston
Tel: 978-322-4226
Fax: 978-322-4100
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: Johnston, Tim INET: TJohnston_at_quallaby.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed May 14 2003 - 17:01:58 CDT