查 sql or 會話的進度

beatony發表於2011-11-17

1. check the progress of sql running.

select SID,SERIAL#,OPNAME,SOFAR,TOTALWORK,SOFAR/TOTALWORK per from v$session_longops where sid in

select sid from v$session where command like '9') order by per desc;

2. 查sql的進度.

select sid, serial#, opname, to_char(start_time, 'HH24:MI:SS') AS "START", (sofar/totalwork)*100 as percent_complete from v$session_longops;

3. 查會話的進度:

select sid,username,serial#,context,sofar,totalwork,opname,round(sofar/totalwork*100,2) "%Complete"
from v$session_longops where opname not like '%aggregate%' and totalwork!=0 and sofar<>totalwork;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22578826/viewspace-711523/,如需轉載,請註明出處,否則將追究法律責任。

相關文章