日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

oracle+system空间满了,oracle审计导致system表空间爆满的处理方法

發(fā)布時間:2025/4/5 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 oracle+system空间满了,oracle审计导致system表空间爆满的处理方法 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

現(xiàn)象描述:

開發(fā)人員通過plsql登錄或者操作數(shù)據(jù)庫,提示如下錯誤:

ORA-00604: error occurred at recursive SQL level 1

ORA-01653: unable to extend table SYS.AUD$ by 8192 in tablespace SYSTEM

ORA-02002: error while writing to audit trail

ORA-00604: error occurred at recursive SQL level 1

ORA-01653: unable to extend table SYS.AUD$ by 8192 in tablespace SYSTEM

解決方法:

根據(jù)提示很明顯是system空間無法擴展,審計記錄無法寫入,表面上是system表空間不足,其實不然,從錯誤信息可以看出,該環(huán)境審計功能是開啟的,這種情況大多數(shù)都是由于審計信息太多,導(dǎo)致系統(tǒng)表空間緊張導(dǎo)致的,清空審計信息就可以解決,此處就是由于審計信息記錄太大導(dǎo)致的,如果沒有審計需求,可以關(guān)閉審計功能。以下是清理審計的方法:

先通過以下語句查出審計表占用的空間大小:

select?owner,

table_name,

sum(decode(seg_type,?'table',?size_mb))?"數(shù)據(jù)段大小",

sum(decode(seg_type,?'index',?size_mb))?"索引段大小",

sum(decode(seg_type,?'lob',?size_mb))?"大字段大小",

sum(size_mb)?"表總大小"

from?(

---所有表大小

select?t.owner,

t.table_name,

sum(s.bytes)?/?1024?/?1024?size_mb,

'table'?seg_type

from?dba_segments?s,?dba_tables?t

where?s.owner?=?t.owner

and?s.segment_name?=?t.table_name

group?by?t.owner,?t.table_name

union?all

---大字段大小

select?l.owner,

l.table_name,

sum(s.bytes)?/?1024?/?1024?size_mb,

'lob'?seg_type

from?dba_segments?s,?dba_lobs?l

where?s.owner?=?l.owner

and?s.segment_name?=?l.segment_name

group?by?l.owner,?l.table_name

union?all

---索引段大小

select?i.table_owner,

i.table_name,

sum(s.bytes)?/?1024?/?1024?size_mb,

'index'?seg_type

from?dba_segments?s,?dba_indexes?i

where?s.owner?=?i.owner

and?s.segment_name?=?i.index_name

group?by?i.table_owner,?i.table_name)

where?owner?=?'SYS'?and?table_name='AUD$'

group?by?owner,?table_name;

根據(jù)查出的審計表的大小分段釋放空間,如查出來大小10G

,分5段釋放

,逐次將審計表中的數(shù)據(jù)清除,使之逐步釋放空間,過程語句如下:

TRUNCATE?TABLE?sys.aud$?reuse?storage;

ALTER?TABLE?sys.aud$?deallocate?unused?keep?10800M;

ALTER?TABLE?sys.aud$?deallocate?unused?keep?6144M;

ALTER?TABLE?sys.aud$?deallocate?unused?keep?4096M;

ALTER?TABLE?sys.aud$?deallocate?unused?keep?2048M;

ALTER?TABLE?sys.aud$?deallocate?unused?keep?0M;

總結(jié)

以上是生活随笔為你收集整理的oracle+system空间满了,oracle审计导致system表空间爆满的处理方法的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。