-
I am trying to use my own SQL to get some information about Blocking and Waiting locks. In Oracle Performance Manager Blocking/Waiting Locks Chart, there is a rowid listed. I would like to know how I can get the rowid (that is being blocked and or waited on) by writing a SQL statement rather than having to go into Oracle Performance Manager. Any help would be greatly appreciated.
Thanks,
Joel
-
from v$session
Code:
ROW_WAIT_OBJ#
NUMBER
Object ID for the table containing the ROWID specified
in ROW_WAIT_ROW#
ROW_WAIT_FILE# NUMBER
Identifier for the datafile containing the ROWID
specified in ROW_WAIT_ROW#. This column is valid only
if the session is currently waiting for another
transaction to commit and the value of ROW_WAIT_OBJ#
is not -1
ROW_WAIT_BLOCK# NUMBER
Identifier for the block containing the ROWID specified
in ROW_WAIT_ROW#. This column is valid only if the session
is currently waiting for another transaction to commit and
the value of ROW_WAIT_OBJ# is not -1
ROW_WAIT_ROW# NUMBER
The current ROWID being locked. This column is valid only
if the session is currently waiting for another
transaction to commit and the value of ROW_WAIT_OBJ#
is not -1
Sam
-
Thank you! This was very helpful.
I ended up getting the info from v$session that you mentioned then using dbms_rowid.rowid_create in my procedure to get the extended rowid.
Joel
-
you might find dba_blockers, dba_ddl_locks and dba_dml_locks views useful as well
you nee to run ?/rdbms/admin/catblock to create those views
steve