Experience: is what you get soon after you need it.

Experience: is what you get soon after you need it.

Rasul Allah (sal Allahu alaihi wa sallam) said: "Restore the trusts of those who trust you, and deal not falsely with him who deals falsely with you." [Abu Dawud, Tirmidhi]

Search This Blog

Thursday, September 15, 2011

Monitor Oracle query status -- ELAPSED TIME SO FAR

Monitor the queries.
set linesize 1000
col units format a10
col target format a8
col opname format a20
Select round(sofar*100/totalwork,2)"finished(%)",
Sid,
Serial#,
Opname,
Target,
Sofar,
Totalwork,
Units,
(Time_Remaining/60) Time_Rem_Mins,
(Elapsed_Seconds/60) Elapsed_Time_Mins
From V$session_Longops
where TIME_REMAINING>0


If you want to monitor the SQL queries it is worth including the sql info like

SQL_ID,
SQL_PLAN_HASH_VALUE HASH_VALUE,
SQL_PLAN_LINE_ID LINE_ID,

No comments: