ORACLE: Füllgrad der Tablespaces feststellen
Wie findet man raus, wie voll die Tablespaces schon sind? Darüber gibt folgendes SQL-Skript Auskunft:
SELECT a.TABLESPACE_NAME,
a.BYTES bytes_used,
b.BYTES bytes_free,
b.largest,
round(((a.BYTES-b.BYTES)/a.BYTES)*100,2) percent_used
FROM
(
SELECT TABLESPACE_NAME,
sum(BYTES) BYTES
FROM dba_data_files
GROUP BY TABLESPACE_NAME
)
a,
(
SELECT TABLESPACE_NAME,
sum(BYTES) BYTES ,
max(BYTES) largest
FROM dba_free_space
GROUP BY TABLESPACE_NAME
)
b
WHERE a.TABLESPACE_NAME=b.TABLESPACE_NAME
ORDER BY ((a.BYTES-b.BYTES)/a.BYTES) DESC;
Posted at 06:45nachm. Feb. 07, 2006 by cetixx in Tipps | Kommentare [0]