Useful shortcuts for vi editor

Friday 10 October 2014

How to see the size of users on specific tablespace in Oracle?

Please execute following command as "sys";

SELECT tablespace_name, owner, segment_type "Object Type",
       COUNT(owner) "Number of Objects",
       ROUND(SUM(bytes) / 1024 / 1024, 2) "Total Size in MB"
FROM   sys.dba_segments
WHERE  tablespace_name IN ('ALPERTABLESPACE')
GROUP BY tablespace_name, owner, segment_type
ORDER BY tablespace_name, owner, segment_type;