Dba_data_files: The dba_data_files means total size of the data file.
SQL> Select tablespace_name,sum(bytes)/(1024*1024*1024) from dba_data_files group by tablespace_name order by 1;
This example display the total size of the data file:
SQL> Select sum(bytes)/(1024*1024*1024) from dba_data_files;
---------------------------
526.2392578125
DBA_SEGMENTS: The dba_segments means used size of the data file.
SQL> select tablespace_name,sum(bytes)/(1024*1024*1024) from dba_segments group by tablespace_name order by 1;
This example display the total size of the segments:
SQL> select sum(bytes)/(1024*1024*1024) from dba_segments;
SUM(BYTES)/(1024*1024*1024)
---------------------------
279.55779
DBA_FREE_SPACE: The dba_free_space means free size of the data file.
SQL> select tablespace_name,sum(bytes)/(1024*1024*1024)from dba_free_space group by tablespace_name order by 1;
This example display the total size of the free space:
SQL> select sum(bytes)/(1024*1024*1024) from dba_free_space;
SUM(BYTES)/(1024*1024*1024)
---------------------------
246.29922
DBA_DATA_FILES = DBA_SEGMENTS + DBA_FREE_SPACE + Oracle overhead (header, bitmap... in few KBs)
SQL> Select tablespace_name,sum(bytes)/(1024*1024*1024) from dba_data_files group by tablespace_name order by 1;
This example display the total size of the data file:
SQL> Select sum(bytes)/(1024*1024*1024) from dba_data_files;
---------------------------
526.2392578125
DBA_SEGMENTS: The dba_segments means used size of the data file.
SQL> select tablespace_name,sum(bytes)/(1024*1024*1024) from dba_segments group by tablespace_name order by 1;
This example display the total size of the segments:
SQL> select sum(bytes)/(1024*1024*1024) from dba_segments;
SUM(BYTES)/(1024*1024*1024)
---------------------------
279.55779
DBA_FREE_SPACE: The dba_free_space means free size of the data file.
SQL> select tablespace_name,sum(bytes)/(1024*1024*1024)from dba_free_space group by tablespace_name order by 1;
This example display the total size of the free space:
SQL> select sum(bytes)/(1024*1024*1024) from dba_free_space;
SUM(BYTES)/(1024*1024*1024)
---------------------------
246.29922
DBA_DATA_FILES = DBA_SEGMENTS + DBA_FREE_SPACE + Oracle overhead (header, bitmap... in few KBs)
No comments:
Post a Comment