Oracle Temp Segment Usage Report

Displays temporary segment usage for sessions currently using TEMP space, including session details, SQL identifiers, segment type, extents, and blocks. Useful for troubleshooting TEMP space consumption and session-level analysis.

oraclesqlmonitoring-alertsv1.0.0
0 stars0 downloads15 views0 comments
By OracleDba • Created

Code

(24 lines)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
-- -----------------------------------------------------------------------------------
-- File Name    : https://oracle-base.com/dba/monitoring/tempseg_usage.sql
-- Author       : Tim Hall
-- Description  : Displays temp segment usage for all session currently using temp space.
-- Requirements : Access to the V$ views.
-- Call Syntax  : @tempseg_usage
-- Last Modified: 01/04/2006
-- -----------------------------------------------------------------------------------

SET LINESIZE 200
COLUMN username FORMAT A20

SELECT username,
       session_addr,
       session_num,
       sqladdr,
       sqlhash,
       sql_id,
       contents,
       segtype,
       extents,
       blocks
FROM   v$tempseg_usage
ORDER BY username;

General Comments(0)

Tip: Click on a line number in the code to add a line-specific comment

No general comments yet. Be the first to comment!