How to check tablespace size.



Below sql query is used to find total tablespace size of your database. which includes Tablespace name used size in MB, free size in MB and Total size in MB

Sql command which fetch tablesapce size in GB Click here to get sample output

select d.tablespace_name "Tablespace",
totalusedspace "Used MB",
(d.totalspace - s.totalusedspace) "Free MB",
d.totalspace "Total MB",
round(100 * ( (d.totalspace - s.totalusedspace)/ d.totalspace)) "Pct. Free"
(select tablespace_name,
round(sum(bytes) / 1048576) TotalSpace
from dba_data_files
group by tablespace_name) d,
(select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name
from dba_segments
group by tablespace_name) s
where d.tablespace_name = s.tablespace_name ;

We always encourage the technical person to visit section SCRIPTS to get more daily usage SQL commands.

Hope so you like this script!
Please share your valuable feedback/comments
/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to know more about our pursuit.


 455 Total Views,  1 Views Today

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 2

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *

8 + 20 =

Follow us on Social Media
Open chat
Contact Us:

Greetings of the day! How can we help you?

Team DBsGuru
Direct Call:+91-9310167776