0% found this document useful (0 votes)
41 views1 page

Knowledge - Base - Long Ops

Uploaded by

kapil Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views1 page

Knowledge - Base - Long Ops

Uploaded by

kapil Jadhav
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

col username for a10

col OPNAME for a20


col MESSAGE for a30
SELECT sid, serial#, opname, message, ROUND(((totalwork-sofar)/totalwork),4)*100 "%
PENDING",
time_remaining, start_time, username, sql_id
FROM gv$session_longops WHERE time_remaining >0;

set lines 200 pages 1000


SELECT NAME,
ROUND((TOTAL_MB)/1024,2) TOTAL_GB,
ROUND((FREE_MB)/1024,2) FREE_GB,
ROUND((TOTAL_MB-FREE_MB)/1024,2) USED_GB
FROM V$ASM_DISKGROUP;

ums sit

SELECT
opname,
target,
ROUND((sofar/totalwork),4)*100 Percentage_Complete,
start_time,
CEIL(time_remaining/60) Max_Time_Remaining_In_Min,
FLOOR(elapsed_seconds/60) Time_Spent_In_Min
FROM v$session_longops
WHERE sofar != totalwork;

SELECT
opname
target,
ROUND((sofar/totalwork),4)*100 Percentage_Complete,
start_time,
CEIL(TIME_REMAINING /60) MAX_TIME_REMAINING_IN_MIN,
FLOOR(ELAPSED_SECONDS/60) TIME_SPENT_IN_MIN,
AR.SQL_FULLTEXT,
AR.PARSING_SCHEMA_NAME,
AR.MODULE client_tool
FROM V$SESSION_LONGOPS L, V$SQLAREA AR
WHERE L.SQL_ID = AR.SQL_ID
AND TOTALWORK > 0
AND ar.users_executing > 0
AND sofar != totalwork;

You might also like