Sample space queries for Oracle
You can estimate the space that is required
to back up the working metric data.
Determine tablespace size
The Dba_Data_Files view provides this information:
Select Sum(Bytes)/1048576
From Dba_Data_Files
Where Tablespace_Name = '<TABLESPACE_NAME>';For example:
Select Sum(Bytes)/1048576
From Dba_Data_Files
Where Tablespace_Name = 'PV_CFGD';Determine free space in a tablespace
The Dba_Free_Space view provides this information:
Select Sum(Bytes)/1048576
From Dba_Free_Space
Where Tablespace_Name = '<TABLESPACE_NAME>';For example:
Select Sum(Bytes)/1048576
From Dba_Free_Space
Where Tablespace_Name = 'PV_CFGD';Determine space used by objects in a tablespace
The Dba_Segments view provides this information:
Select Sum(Bytes)/1048576
From Dba_Segments
Where Tablespace_Name = '<TABLESPACE_NAME>';For example:
Select Sum(Bytes)/1048576
From Dba_Segments
Where Tablespace_Name = 'PV_CFGD'