2009年6月24日水曜日

Oracle:テーブルスペースの容量・状態を調べるためのSQL

-- テーブルスペースに割り当てた容量を確認(MB表示)
select tablespace_name, sum(bytes)/1024/1024 tota_space
from dba_data_files
group by tablespace_name
order by tablespace_name;

-- テーブルスペースの空き容量を確認(MB表示)
select tablespace_name, sum(bytes)/1024/1024 freespace
from dba_free_space
group by tablespace_name
order by tablespace_name;

-- テーブルスペースの名前と状態を調べる
select tablespace_name, status
from dba_tablespaces
order by tablespace_name;

0 件のコメント: