From:Steve Adams
Date:01-Nov-2001 06:43
Subject:   BITAND

This is a bug. The problem is that the BITAND function as defined in package STANDARD returns a BINARY_INTEGER, but the SQL builtin is expecting it to return a NUMBER and thus makes no attempt to convert it. You can workaround the problem by calling STANDARD.BITAND explicitly, or by adding 0 to the result to force the required numeric conversion.

I have a lot of sessions waiting on the enqueue event, but nothing shows up in V$LOCK. The "Oracle8i Reference" manual says that I should be able to retrieve the name of the lock and the mode of the lock request using the following query, but it gets and ORA-932 error.

    SQL> select chr(bitand(p1,-16777216)/16777215)||
      2   chr(bitand(p1, 16711680)/65535) "Lock",
      3   bitand(p1, 65536) "Mode"
      4  from v$session_wait
      5  where event = 'enqueue';
    ERROR:
    ORA-00932: inconsistent datatypes
Is there any other way to get this information?