I’ve been running out of disk space on my virtual machine and didn’t want to mount another volume to add more room (because the problem isn’t more room; it’s that I’m sloppy with disk space) 🙂
So I was looking around on how to easily query for the schema size to find out which little project of mine was taking up way too much room. I found a nice solution on this blog:
SELECT tablespace_name , SUM(bytes)/1024/1024 AS total_size_mb FROM dba_segments WHERE owner = Upper('&User_Name') GROUP BY owner , rollup(tablespace_name);
When you run the query it’ll ask you which user you want to check: