Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Materialized View Progress
You could use the following SQL statement to observe long ops:
SELECT A.SID,
A.OPNAME OPERATION, NVL(B.ACTION, 'not available') ACTION, CASE WHEN A.TARGET IS NOT NULL THEN A.TARGET ELSE NVL(A.TARGET_DESC, ' unknown ') END OBJECT, B.STATUS, B.STATE WAIT_ACTIVITY, B.WAIT_CLASS W_CLAS, TO_CHAR(A.SOFAR) || ' / ' || TO_CHAR(A.TOTALWORK) || ' (' || SUBSTR(A.UNITS, 1, 1) || ')' PROGRESS, LPAD(TO_CHAR(FLOOR(A.ELAPSED_SECONDS / 3600)), 2, '0') || ':' ||LPAD(TO_CHAR(FLOOR(MOD(A.ELAPSED_SECONDS,3600) / 60)), 2, '0') || ':' || LPAD(TO_CHAR(MOD(A.ELAPSED_SECONDS, 60)), 2, '0') SOFAR, LPAD(TO_CHAR(FLOOR(A.TIME_REMAINING / 3600)), 2, '0') || ':' || LPAD(TO_CHAR(FLOOR(MOD(A.TIME_REMAINING,3600) / 60)), 2, '0') || ':' || LPAD(TO_CHAR(MOD(A.TIME_REMAINING, 60)), 2, '0') REMAINING, LPAD(TO_CHAR(FLOOR((A.TIME_REMAINING + A.ELAPSED_SECONDS) / 3600)), 2, '0') || ':' || LPAD(TO_CHAR(FLOOR(MOD((A.TIME_REMAINING + A.ELAPSED_SECONDS),3600) / 60)), 2, '0') || ':' || LPAD(TO_CHAR(MOD((A.TIME_REMAINING + A.ELAPSED_SECONDS), 60)), 2, '0') TOTAL,