locks_and_sql.sql
Download Script
Prompt Warning this does take awhile to run select b.username username, b.sid||','||b.serial# sidser, sql_text from v$sqltext a, v$session b where sid in (select sid from v$lock where lmode = 6) and b.sql_address=a.address and b.sql_hash_value=a.hash_value order by piece ;