Query to determine tablespace usage (for both data and temp), taking into account any autoextend settings.
Autoextend is ignored by sys.sm$ts_used, so that view is not really usable. The results from that view are shown in column pct_used_wrong, the correct result is shown in column pct_used.
Execute as sys or system: