Find all record locks within database
I am trying to find all records that are locked within my Oracle database using a select statement. Thus far, I have the following:
SELECT s.sid, s.serial#, s.username, s.status, do.owner, do.object_name, do.object_id, do.object_type, dbms_rowid.rowid_create(1, s.row_wait_obj#, s.row_wait_file#, s.row_wait_block#, s.row_wait_row#) as locked_rowid
FROM v$session s, dba_objects do
WHERE s.row_wait_obj# = do.object_id and object_type = 'TABLE'
order by s.sid, s.serial#
My problem with the above select statement is that is doesn't show all record locks.