捕捉运行很久的SQL

发表于:2007-06-22来源:作者:点击数: 标签:

   
如何捕捉运行很久的SQL

column username format a12
column opname format a16
column progress format a8

select username,sid,opname,

       round(sofar*100 / totalwork,0) || '%' as progress,
       time_remaining,sql_text
from v$session_longops , v$sql
where time_remaining <> 0
and sql_address = address
and sql_hash_value = hash_value
/

原文转自:http://www.ltesting.net