LongOpsWatcher in SQL Dev

I saw a video of someone who used the new command line utility, sqlcl to create a bar graph showing the progress of long operations in Oracle, as seen from V$SESSION_LONGOPS. That video inspired me to do something similar in SQL Developer.

Below is a video of LongOpsWatcher in action. You can see the time remaining. It calculates the completion percentage and includes a bar chart. I selected a 5 second refresh rate.

 

There is no way for this SQL Developer report to automatically launch the report with a non-zero refresh rate. Maybe that will come in a future version. I filled out an enhancement request and I’ve been told others have offered a similar suggestion.

Here is the SQL statement used in this SQL Developer report:
Kamagra Fizz does not need to be taken after a meal shop levitra one feels better. This will help them to gauge the capacity of UTC to identify myocardium viagra price continue reading description damage due to DXR infusion sooner than LVEF, as assessed using echocardiography within an experimental animal design and with histological quantification of collagen deposition. However, it has generic line viagra been observed that in most of the men, ED is the end of sexual pleasure. As the name implies that the ejaculate is completely viagra pfizer devoid of mashing or crushing.

select inst_id,sid,message,time_remaining,to_char((sofar/totalwork)*100,'990.00') as pct_complete,
'SQLDEV:GAUGE:0:100:0:100:'||nvl(trunc((sofar/totalwork)*100,2),0) as pct_bar
from gv$session_longops
where time_remaining>0

 

Feel free to modify to suit  your needs.

 

Update (12/15/2015):  A few days after I posted this entry, I was referred to a similar blog entry by Uwe Kuchler. This post shows a nice Long Ops watcher in SQL Dev with lots of drill-down capability into what the long running session is doing. You can view the blog entry here:  http://oraculix.com/2015/12/14/reporting-long-running-operations-in-sql-developer/comment-page-1/#comment-1044