Skip to main content

Querying Long Running Jobs

Sometimes i want to see output details of a running datapump export job, but datapump’s job output shows only brief explanation and shows each process’s output after the process completed. In that case v$session_longops view helps us.
This view displays status of jobs and some operations that run for longer than 6 seconds. TIMED_STATISTICS or SQL_TRACE parameters must be set to true before querying this view. It is possible to learn structure of the view by typing DESC V$SESSION_LONGOPS;

SQL>  set lines 300 pages 55
SQL>  col opname format a30
SQL>  col target format a30
SQL>  select to_char(sofar/totalwork,'9.99'), sofar, totalwork,  username, opname, target, TIME_REMAINING from v$session_longops where sofar!=totalwork;

Comments

Popular posts from this blog