Skip to Main Content
  • Questions
  • How to calculate free space in the Database

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Amarsinh.

Asked: November 01, 2017 - 9:07 am UTC

Last updated: November 01, 2017 - 11:07 am UTC

Version: 10.2.0

Viewed 10K+ times! This question is

You Asked

How to calculate the actual database size and the free space in the database.
I tried below queries
select round(sum(bytes)/1024/1024/1024) size_in_gb from dba_data_files; = 1073 GB
select round(sum(bytes)/1024/1024/1024) size_in_gb from dba_segments; = 357 GB


Then where is the remaining i.e. (1073-357 = 716 GB )size is being utilized.


and Chris said...

It isn't being used.

dba_data_files reports the size of the files on disk.
dba_segments reports the storage allocated by the database.

The difference is available-but-not-yet-used space for the database.

You can get a breakdown of the space available by tablespace using the script in this question:

https://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:285415955510


Rating

  (2 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, November 02, 2017 - 3:50 am UTC


Amarsinh Jadhav, November 02, 2017 - 11:56 am UTC


More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database