Update 20a_tbs_details.sql

This commit is contained in:
Yacine31
2024-02-02 03:11:51 +01:00
parent 4d93f45e49
commit 5ed8a80cf9

View File

@@ -45,6 +45,7 @@ COL Pct_Used FORMAT 999.00 HEAD "% Used"
select select
a.tablespace_name, a.tablespace_name,
t.bigfile,
a.bytes_alloc/1024/1024 alloc, a.bytes_alloc/1024/1024 alloc,
(a.bytes_alloc - nvl(b.bytes_free, 0))/1024/1024 used, (a.bytes_alloc - nvl(b.bytes_free, 0))/1024/1024 used,
(nvl(b.bytes_free, 0))/1024/1024 free, (nvl(b.bytes_free, 0))/1024/1024 free,
@@ -77,6 +78,7 @@ where
union all union all
select select
h.tablespace_name, h.tablespace_name,
dt.bigfile,
(sum(h.bytes_free + h.bytes_used))/1024/1024 alloc, (sum(h.bytes_free + h.bytes_used))/1024/1024 alloc,
(sum(nvl(p.bytes_used, 0)))/1024/1024 used, (sum(nvl(p.bytes_used, 0)))/1024/1024 used,
(sum((h.bytes_free + h.bytes_used) - nvl(p.bytes_used, 0)))/1024/1024 free, (sum((h.bytes_free + h.bytes_used) - nvl(p.bytes_used, 0)))/1024/1024 free,
@@ -95,7 +97,8 @@ where
and h.tablespace_name = dt.tablespace_name and h.tablespace_name = dt.tablespace_name
group by group by
h.tablespace_name, h.tablespace_name,
dt.contents dt.contents,
dt.bigfile
order by order by
1 1
; ;