-- wait.sql: what one session is waiting on right now, printed one column per line -- Copyright (c) HASHJOIN. MIT License (https://hashjoin.com/kb/license/) -- https://hashjoin.com/kb/oracle/drill-into-one-session/ -- -- Usage: @wait.sql -- -- Needs Tom Kyte's print_table procedure (see the page for the link). set serveroutput on size unlimited exec print_table('select * from v$session_wait where sid=&&1');