OracleStorage
Space used per schema
Total segment size per owner, largest first.
Not yet verified. How scripts are tested
1CLEAR COLUMNS2SET LINESIZE 100 PAGESIZE 100 TRIMOUT ON TAB OFF3COLUMN owner FORMAT A304COLUMN size_gb HEADING "SIZE GB" FORMAT 999,990.995COLUMN segments FORMAT 9,999,9906 7SELECT owner,8 ROUND(SUM(bytes) / POWER(1024, 3), 2) AS size_gb,9 COUNT(*) AS segments10FROM dba_segments11GROUP BY owner12ORDER BY SUM(bytes) DESC;Save it as ora-schema-sizes.sql and run it with SQL> @ora-schema-sizes.
More Oracle scripts: Storage
- Datafile usage with a bar graphEvery datafile with its size, used space, max size and a ten-character usage bar (X = used, - = free). Free_MB is the largest free extent in the…
- Database size three ways: allocated, used and totalAllocated datafile size, space actually used by segments, and the overall footprint including temp files, online redo logs and control files. All in…
- Database size summary: total, used and freeOne line with the database name and its total size (datafiles, temp files and redo logs), used space and free space, rounded to whole GB.
- Size of one schemaTotal segment size in GB for the schema you enter.
- Tablespace usageUsed and free space in GB against the maximum each tablespace can autoextend to, with its type (permanent, temporary or undo), fullest first.
- Datafiles with size and autoextend limitsEvery datafile, its current size, whether it can grow, and how far. Files with AUTOEXTEND NO in a busy tablespace are the ones that page you at night.