Hi,
I am using the below SQL to find the size of a tablespace:
--free space in tablespace
select b.tablespace_name, tbs_size SizeMb, a.free_space FreeMb, round((tbs_size - free_space)*100/tbs_size, 2) "%Free"
from (select tablespace_name, TRUNC(sum(bytes)/1024/1024) as free_space
from dba_free_space
where tablespace_name in ('ABCD')
group by tablespace_name
) a,
(select tablespace_name, sum(bytes)/1024/1024 as tbs_size
from dba_data_files
group by tablespace_name) b
where a.tablespace_name=b.tablespace_name
;
But I also know that Oracle provides the facility to autoextend tablespace:
select tablespace_name, autoextensible, maxbytes/1024/1024, increment_by/1024/1024
from dba_data_files
where tablespace_name in ('ABCD')
order by 1,2;
Now,
What is the meaning of the tablespace size as per first query?
If AUTOEXTEND is on for tablespace so till what limit does it autoextend?
What triggers the autoextending of tablespace size? Does it happen when the free space in tablespace becomes 0?