select username,lockwait,status,machine,program from v$session where sid in (select session_id from v$locked_object);select sql_text from v$sql where hash_value in ( select sql_hash_value from v$session where sid in (select session_id from v$locked_object) )