Skip to main content

Posts

Showing posts from December 2, 2014

Tablespace usage details (Current size,used size and free space with extendable)

Need tablespace usage details? want to check how much space used from current size and max size of the tablespace? Below are some queries to check the free space with extendable size,used space & their percentage of usage. The below query is to check the particular tablespace usage details set lines 300 col TABLESPACE_NAME for a30 col file_name for a45 select    a.TABLESPACE_NAME,    round(avail,1) curr_size_MB,    round(used,1) used_MB,    round(total,1) Maxsize_MB,    round(free+extentable_MB,1) "Free+extendable_MB",    round(100*(1-(free+extentable_MB)/total),1)"Usage %" from (       select         TABLESPACE_NAME,         sum(BYTES)/(1024*1024) avail,         sum(MAXBYTES)/(1024*1024) total,         (sum(MAXBYTES)/(1024*1024) - sum(BYTES)/(1024*1024)) extentable_MB       from dba_data_files       group by TABLESPACE_NAME) a,      (       select          TABLESPACE_NAME,          sum(BYTES)/(1024*1024) free       from dba_free_space