Over a million developers have joined DZone.

Used Space In Tablespaces Without Admin Rights

DZone's Guide to

Used Space In Tablespaces Without Admin Rights

Free Resource

select t.tablespace_name "Tablespace", 
    count(*) "Tables", 
    sum(bytes/1024/1024) "Megabytes", 
    t.max_megabytes "Max_Megabytes", 
    t.quota "Quota"
from user_segments s,
    (select tablespace_name, 
            (case when max_bytes = -1
                  then null
                  else max_bytes/1024/1024
             end) max_megabytes,
            (case when max_bytes = -1
                  then 'UNLIMITED'
                  else null
             end) quota
       from user_ts_quotas) t
--where segment_type = 'TABLE'
where t.tablespace_name(+) = s.tablespace_name
group by t.tablespace_name, t.max_megabytes, t.quota;

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}