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;


Popular posts from this blog

Find and replace with sed command in Linux

Find and replace feature is always handy. It can turn into a torture when it comes to change or delete a simple constant string in a text file. There is a handy tool in linux for doing these kind of tihngs. Actually sed is not a text editor but it is used outside of the text file to make changes.