oracle undo tablespace schema

Solutions on MaxInterview for oracle undo tablespace schema by the best coders in the world

showing results for - "oracle undo tablespace schema"
Lilly
29 Oct 2017
1-- UNDO tablespace usage per user / session
2SELECT s.SID, s.USERNAME, round(sum(ss.VALUE) / 1e6, 2) AS UNDO_SIZE_MB,
3       sql.ELAPSED_TIME, sql.SQL_TEXT
4FROM V$SESSTAT ss JOIN V$SESSION s ON s.SID = ss.SID
5     JOIN V$STATNAME STAT ON STAT.STATISTIC# = ss.STATISTIC#
6     LEFT JOIN V$SQLAREA sql 
7     	ON s.SQL_ADDRESS = sql.ADDRESS AND s.SQL_HASH_VALUE = sql.HASH_VALUE
8WHERE STAT.NAME = 'undo change vector size' AND s.TYPE <> 'BACKGROUND' 
9  AND s.USERNAME IS NOT NULL AND ss.VALUE >= 0.01 * 1e6
10GROUP BY s.SID, s.USERNAME, sql.ELAPSED_TIME, sql.SQL_TEXT
11ORDER BY s.USERNAME, round(sum(ss.VALUE) / 1e6, 2);