Tablespace usage
When to use it
Every day, and whenever an application fails with ORA-01653, ORA-01654 or ORA-01688 (unable to extend).
Run this
Script: 10_show_tablespace_usage_percent.sql. Full version in Administration › Storage management › Tablespaces.
select trunc(USED_PERCENT) USED_PERCENT, tablespace_name from dba_tablespace_usage_metrics
where tablespace_name in (select tablespace_name from dba_tablespaces where contents='PERMANENT')
order by 1 desc;
How to read the output
- One row per permanent tablespace, fullest first.
used_percentalready takes autoextend into account: it is measured against the maximum size the files can grow to, not only the current size.- As a common starting point, look closer at anything above about 85 percent and act above about 90 percent. Follow your team thresholds if they exist.
- A tablespace that grows several points from one day to the next matters more than one that has been stable at a high value for months.
What to do next
- For a tablespace that is filling up, go to "Tablespaces and datafiles" in chapter 5 to see its files.
- If it is already full and something is failing, go to "A tablespace is full" in chapter 10.
Risk level
READ ONLY Safe to run at any time. It only queries the data dictionary.