Skip to content

Commit 0b7df95

Browse files
authored
Create session-longops.sql
1 parent 397de9e commit 0b7df95

File tree

1 file changed

+10
-0
lines changed
  • data-platform/core-converged-db/sql-performance/sql-monitoring/scripts-sql-monitoring

1 file changed

+10
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
REM Script: session-longops.sql
2+
REM Example for V$SESSION_LONGOPS
3+
4+
5+
-- V$SESSION_LONGOPS displays the status of various operations that run for longer than 6 seconds (in absolute time)
6+
7+
SELECT opname, username, sql_fulltext, to_char(start_time,'DD-MON-YYYY HH24:MI:SS'),
8+
(sofar/totalwork)*100 "%_complete", time_remaining, s. con_id
9+
FROM v$session_longops s INNER JOIN v$sql sl USING (sql_id)
10+
WHERE time_remaining > 0;

0 commit comments

Comments
 (0)