首页 > 代码库 > 捕获长时间不提交的SQL语句

捕获长时间不提交的SQL语句

  1. /* Formatted on 2014/5/19 17:16:16 (QP5 v5.240.12305.39476) */
    SELECT s.sid, s.serial#, ss.sql_text
    FROM v$session s, v$sql ss
    WHERE s.prev_hash_value != 0
    AND s.sql_hash_value = http://www.mamicode.com/0
    AND s.prev_hash_value = http://www.mamicode.com/ss.hash_value
    AND (ss.sql_text LIKE ‘%insert%‘)
    ORDER BY s.sid, s.serial#;