LendKey

Sunday, October 5, 2008

Check object that has been locked in Oracle

select oracle_username,object_id,session_id from v$locked_object;
select object_name from dba_objects where object_id = ;

is the id of object that was returned from the first query.

Or to combine them into one script:
select l.oracle_username,l.object_id, object_name, l.session_id from v$locked_object l, dba_objects where dba_objects.object_id = l.object_id;

No comments: