-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathundo.sql
More file actions
32 lines (29 loc) · 742 Bytes
/
undo.sql
File metadata and controls
32 lines (29 loc) · 742 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
----------------------------------------------------------------------------------------
--
-- File name: undo.sql
--
-- Purpose: List undo usage
--
-- Author: jpsaraiva
--
-- Version: 2017/02/22
--
-- Example: @undo.sql
--
-- Notes: Developed and tested on 11.2.0.4.
--
---------------------------------------------------------------------------------------
--
set pagesize 100 lines 120 pages 1000 heading on feed off null '' ver off
col owner for a13
col tablespace_name for a30
col status for a10
col "TOTAL MB" for 999999.99
select
owner
, tablespace_name
, trunc(sum(bytes)/1024/1024,2) as "TOTAL MB"
, status
from dba_undo_extents
group by owner,tablespace_name,status
order by 3,4;