/* Formatted on 6/4/2014 2:41:17 PM (QP5 v5.115.810.9015) */
SELECT t.tablespace_name,
NVL (ROUND ( ( (SUM (u.blocks) * p.VALUE) / 1024 / 1024), 2), 0)
used_mb,
t.tot_mb,
NVL (ROUND (SUM (u.blocks) * p.VALUE / 1024 / 1024 / t.tot_mb * 100, 2),
0
)
"USED %"
FROM gv$sort_usage u,
gv$parameter p,
(SELECT tablespace_name, SUM (bytes) / 1024 / 1024 tot_mb
FROM dba_temp_files
GROUP BY tablespace_name) t
WHERE p.name = 'db_block_size' AND u.tablespace(+) = t.tablespace_name
GROUP BY t.tablespace_name, p.VALUE, t.tot_mb
ORDER BY 1, 2;
SELECT t.tablespace_name,
NVL (ROUND ( ( (SUM (u.blocks) * p.VALUE) / 1024 / 1024), 2), 0)
used_mb,
t.tot_mb,
NVL (ROUND (SUM (u.blocks) * p.VALUE / 1024 / 1024 / t.tot_mb * 100, 2),
0
)
"USED %"
FROM gv$sort_usage u,
gv$parameter p,
(SELECT tablespace_name, SUM (bytes) / 1024 / 1024 tot_mb
FROM dba_temp_files
GROUP BY tablespace_name) t
WHERE p.name = 'db_block_size' AND u.tablespace(+) = t.tablespace_name
GROUP BY t.tablespace_name, p.VALUE, t.tot_mb
ORDER BY 1, 2;
No comments:
Post a Comment