SET line 200 col OPNAME FOR a30 col COMPLETE FOR a10
SELECT SID, CASE WHEN OPNAME LIKE '%aggregate%' THEN 'total' ELSE OPNAME END OPNAME, SOFAR, TOTALWORK, ROUND(SOFAR / TOTALWORK * 100, 2) || '%' "Complete" FROM V$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN:%' AND OPNAME NOT LIKE 'RMAN: aggregate%';
select sid,opname,serial#,context,sofar,totalwork,round(sofar/totalwork*100,2) "%_complete" from v$session_longops where opname like 'RMAN%' and opname not like '%aggregate%' and totalwork != 0 and sofar <> totalwork order by "%_complete" desc