天天看點

oracle+system空間滿了,oracle資料庫解決system表空間已爆滿的問題

有時會發現資料庫system表空間增長很快,使用以下語句檢視system表空間使用量。也可以使用toad直接看。

select b.tablespace_name "表空間",

b.bytes / 1024 / 1024 "大小m",

(b.bytes - sum(nvl(a.bytes, 0))) / 1024 / 1024 "已使用m",

substr((b.bytes - sum(nvl(a.bytes, 0))) / (b.bytes) * 100, 1, 5) "使用率"

from dba_free_space a, dba_data_files b

where a.file_id = b.file_id

and b.tablespace_name = 'system'

group by b.tablespace_name, b.file_name, b.bytes

order by b.tablespace_name;

執行以下語句檢視是哪個對象占用較大

select *

from (select segment_name, sum(bytes) / 1024 / 1024 mb

from dba_segments

where tablespace_name = 'system'

group by segment_name

order by 2 desc)

where rownum < 10;

一般發現都是發現是aud$審計表占用資源量大。

直接登入資料庫,清理掉sys.aud$表。

truncate table sys.aud$;

oracle+system空間滿了,oracle資料庫解決system表空間已爆滿的問題

如果想關閉資料庫審計,可以參考以下連結

http://blog.sina.com.cn/s/blog_b56640170102xbj7.html

如您對本文有疑問或者有任何想說的,請點選進行留言回複,萬千網友為您解惑!