select oracle_username,
object_name,
decode(a.locked_mode,
0,'None', /* Mon Lock equivalent */
1,'Null', /* N */
2,'Row-S (SS)', /* L */
3,'Row-X (SX)', /* R */
4,'Share', /* S */
5,'S/Row-X (SSX)', /* C */
6,'Exclusive', /* X */
to_char(a.locked_mode)) mode_held,
sb.osuser,
sb.username,
sqlb.sql_text,
sb.sid
from V$LOCKED_OBJECT a
INNER JOIN DBA_OBJECTS b
ON a.object_id = b.object_id
INNER JOIN v$session sb
ON sb.sid = a.session_id
LEFT JOIN v$sql sqlb
ON sqlb.sql_id = sb.sql_id;
object_name,
decode(a.locked_mode,
0,'None', /* Mon Lock equivalent */
1,'Null', /* N */
2,'Row-S (SS)', /* L */
3,'Row-X (SX)', /* R */
4,'Share', /* S */
5,'S/Row-X (SSX)', /* C */
6,'Exclusive', /* X */
to_char(a.locked_mode)) mode_held,
sb.osuser,
sb.username,
sqlb.sql_text,
sb.sid
from V$LOCKED_OBJECT a
INNER JOIN DBA_OBJECTS b
ON a.object_id = b.object_id
INNER JOIN v$session sb
ON sb.sid = a.session_id
LEFT JOIN v$sql sqlb
ON sqlb.sql_id = sb.sql_id;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26390465/viewspace-1815220/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26390465/viewspace-1815220/