Thursday, June 26, 2025

Monitoring long-running operations

 Monitoring long-running operations


set pages 1000 lines 1000

col start_time for a20

col opname for a20

col message for a20

SELECT SID,serial#,TO_CHAR (start_time, 'YYYY-MM-DD HH24:MI:SS') start_time,

        opname, time_remaining, elapsed_seconds, message,

        totalwork sofar, (sofar / totalwork) * 100 pct_done

   FROM gv$session_longops

  WHERE totalwork > sofar

    AND opname NOT LIKE '%aggregate%' and sid='&SID';

No comments:

Post a Comment

Beyond the OCI Console: 25 OCI CLI Commands Every Oracle DBA Should Master

Introduction Most Oracle DBAs spend their day inside the OCI Console. But when managing multiple DB Systems, Autonomous Databases, backups, ...