1.查看索引创建进度
/* Formatted on 2019/8/20 下午 05:08:25 (QP5 v5.163.1008.3004) */ SELECT SID, DECODE (totalwork, 0, 0, ROUND (100 * sofar / totalwork, 2)) "Percent", MESSAGE "Message", start_time, elapsed_seconds, time_remaining, inst_id FROM GV$Session_longops t WHERE t.TARGET = 'owner.tablename' --AND t.sid = 25983 ORDER BY t.start_time DESC;
2.查看备份进度
/* Formatted on 2019/8/20 下午 05:21:21 (QP5 v5.163.1008.3004) */ SELECT SID, SERIAL#, CONTEXT, SOFAR, TOTALWORK, ROUND (SOFAR / TOTALWORK * 100, 2) "%_COMPLETE" FROM GV$SESSION_LONGOPS WHERE OPNAME LIKE 'RMAN%' AND OPNAME NOT LIKE '%aggregate%' AND TOTALWORK != 0 AND SOFAR <> TOTALWORK;
3.查看导入导出进度
select * from DBA_DATAPUMP_JOBS; select * from DBA_DATAPUMP_SESSIONS; expdp xxxxxx/xxxxxx attach=&jobname