Script – List SQL being executed by a particular SID
- Posted by Gavin Soorma
- On July 1, 2009
- 0 Comments
col sql_text format a100 heading "Current SQL" select q.sql_text from v$session s , v$sql q WHERE s.sql_address = q.address and s.sql_hash_value + DECODE (SIGN(s.sql_hash_value), -1, POWER( 2, 32), 0) = q.hash_value AND s.sid=&1;
0 Comments