SET VERIFY OFF FEED OFF LINES 180

COL "USER" FORMAT A40
COL OPNAME FORMAT A35 HEAD "OPERACAO"
COL INICIO FORMAT A11
COL RESTANTE FORMAT A11
COL PASSADO FORMAT A11
COL PERCENTUAL FORMAT A7
COL OBJETO FORMAT A50
BREAK ON USER SKIP PAGE
CLEAR BREAK
SELECT
   RPAD( USERNAME || ' '''||SID||','||SERIAL#||'''', 40, ' ' ) "USER"
  ,UPPER(OPNAME) OPNAME
  ,TO_CHAR(START_TIME, 'DD/MM HH24:MI' ) INICIO
  ,TO_CHAR(TRUNC(TIME_REMAINING/3600),'fm9900')||':'||TO_CHAR(TO_DATE('1','J')+(MOD(TIME_REMAINING,3600)/86400),'MI:SS') RESTANTE
  ,TO_CHAR(TRUNC(ELAPSED_SECONDS/3600),'fm9900')||':'||TO_CHAR(TO_DATE('1','J')+(MOD(ELAPSED_SECONDS,3600)/86400),'MI:SS') PASSADO
  ,TO_CHAR(SOFAR*100/DECODE(TOTALWORK, 0, 1, TOTALWORK), '990D00' ) PERCENTUAL
  ,SUBSTR( TARGET, 1, 40 ) OBJETO
FROM GV$SESSION_LONGOPS
WHERE SOFAR < TOTALWORK
AND  USERNAME LIKE UPPER( '&1.' )
ORDER BY USERNAME, OBJETO, PERCENTUAL DESC, START_TIME
/
PROMPT
SET FEED 6 VERIFY ON

hostgator