Hi All,
Can anybody tell me how to detemine how much space is remaining in a datafile?Which views should I check for this?
Thanks
Printable View
Hi All,
Can anybody tell me how to detemine how much space is remaining in a datafile?Which views should I check for this?
Thanks
look on dba_data_files, you have blocks and used_blocks
The free space in a data file can be obtained by getting bytes or blocks from dba_free_space, and linking to dba_data_files by the file_id column to get at the file name.
HTH
David.
If you have OEM, you can view this information in Storage Manager.
You may use this script also. You will need to change the substr values to collect the info you need.
column PCT format 999.99
select substr(b.tablespace_name, 1, 17) ts_name,
substr(b.file_name, 21, 25) fname,
b.bytes,
sum(a.bytes) freebytes,
100*sum(a.bytes)/b.bytes "PCT"
from dba_free_space a,
dba_data_files b
where a.file_id = b.file_id
group by b.tablespace_name, b.file_name, b.bytes
order by b.tablespace_name, b.file_name;
Good luck.