Oracle: find out who's locking my table with v$locked_object
March 18, 2010 21:37:41
You run an update and it hangs. Use this query to find out who's locking the table.
select o.object_type, o.object_name, DECODE(v.locked_mode, 1, 'no lock', 2, 'row share (SS)', 3, 'row exclusive (SX)', 4, 'shared table (S)', 5, 'shared row exclusive (SSX)', 6, 'exclusive (X)') lock_mode, v.oracle_username, v.os_user_name, v.session_id from all_objects o, v$locked_object v where o.object_id = v.object_id;
Easy email testing with http://www.ximailstop.com