AWR不自動刪除導致SYSAUX表空間滿
其主要是WRH$_ACTIVE_SESSION_HISTORY 的一個分割槽表佔了很多,沒遇到過的問題,總是感覺很緊張,尤其又是生產庫
於是乎,想了個笨方法開始手動刪WRH$_ACTIVE_SESSION_HISTORY的資料,刪的差不多了就開始收縮表,收縮完表空間有地了
可是過段時間又滿了,心想這笨方法可不行,開始找方法
在官方發現文件 387914.1就是說的這個問題
CAUSE
Oracle decides what rows need to be purged based on the retention policy. There is a special mechanism which is used in the case of the large AWR tables where we store the snapshot data in partitions. One method of purging data from these tables is by removing partitions that only contain rows that have exceeded the retention criteria. During the nightly purge task, we only drop the partition if all the data in the partition has expired. If the partition contains at least one row which, according to the retention policy shouldn't be removed, then the partition won't be dropped and as such the table will contain old data.
If partition splits do not occur (for whatever reason), then we can end up with a situation where we have to wait for the latest entries to expire before the partition that they sit in can be removed. This can mean that some of the older entries can be retained significantly past their expiry date. The result of this is that the data is not purged as expected.
SOLUTION
A potential solution to this issue is to manually split the partitions of the partitioned AWR objects such that there is more chance of the split partition being purged.You will still have to wait for all the rows in the new partitions to reach their retention time but with split partitions there is more chance of this happening. you can manually split the partitions using the following undocumented command:
alter session set "_swrf_test_action" = 72;
To perform a single split of all the AWR partitions.
-
Check
the partition details for the offending table before the
split:
SELECT owner,
segment_name,
partition_name,
segment_type,
bytes/1024/1024/1024 Size_GB
FROM dba_segments
WHERE segment_name='WRH$_ACTIVE_SESSION_HISTORY'; -
Split the
partitions so that there is more chance of the smaller partition being
purged:
alter session set "_swrf_test_action" = 72;
NOTE: This command will split partitions for ALL partitioned AWR objects. It also initiates a single split; it does not need to be disabled and will need to be repeated if multiple splits are required.
-
Check the
partition details for the offending table after the
split:
SELECT owner,
segment_name,
partition_name,
segment_type,
bytes/1024/1024/1024 Size_GB
FROM dba_segments
WHERE segment_name='WRH$_ACTIVE_SESSION_HISTORY';
其方法就是執行alter session set "_swrf_test_action" = 72; 讓AWR相關的分割槽表都建立一個新的分割槽,等待老分割槽的資料過期,oracle就會自動刪除。
可眼下表空間已經滿了,等不到老分割槽的資料過期,可咋辦
那麼可以先修改AWR的有效保留期,比如改成5天。等5天后oracle刪掉分割槽在把保留期改回來。如果老資料需要保留可以匯出AWR的資訊。
但是也有個問題,這次的資料已經刪了,那麼以後oracle會自動刪嗎?不會每次都要手動執行一下這個命了吧?希望有經驗的朋友告訴下,或者讓時間證明
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29339009/viewspace-2131604/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- AWR佔用sysaux表空間太大UX
- sysaux 表空間爆滿處理方法UX
- Oracle SYSAUX 表空間使用率100% 導致的DB 故障OracleUX
- oracle sysaux表空間滿了處理辦法OracleUX
- Oracle清理SYSAUX表空間OracleUX
- OGG相關的CPATURE導致SYSAUX表空間異常暴增處理UX
- Tablespace表空間刪除
- 2.5.4.1 關於SYSAUX表空間UX
- SYSAUX表空間清理之SM/OPTSTATUX
- 【Oracle】表空間誤刪除導致startup啟動時提示ORA-01110和ORA-01157錯誤Oracle
- 刪除臨時表空間組
- SYSAUX表空間佔用過大情況下的處理(AWR資訊過多)UX
- oracle級聯刪除使用者,刪除表空間Oracle
- 4.2.1.7 規劃 SYSTEM 和 SYSAUX 表空間UX
- MySQL 磁碟空間滿導致表空間相關資料檔案損壞故障處理MySql
- oracle建立臨時表空間和資料表空間以及刪除Oracle
- 歸檔日誌滿導致ORA-13516錯誤,awr報表不能自動收集
- ASM空間爆滿導致資料庫掛起ASM資料庫
- Oracle表空間切換路徑,解決硬碟滿導致的ORA-01653問題Oracle硬碟
- PbootCMS快取runtime能刪除嗎?空間滿了怎麼辦?boot快取
- 2.5.4 為 SYSAUX 表空間指定資料檔案屬性UX
- 刪除表空間出現ORA-22868錯誤(一)
- 刪除表空間時,遇到了ORA-14404錯誤
- ORACLE DATAGUARD災備歸檔空間滿導致的ORA-00600 [2619]Oracle
- 刪除UNDO表空間並處理ORA-01548問題
- MySQL 5.7的表刪除資料後的磁碟空間釋放MySql
- dbms_lob儲存過程導致臨時表空間100%儲存過程
- Oracle案例08——xx.xx.xx.xx,表空間 SYSAUX 使用率>95%%OracleUX
- Linux檔案刪除空間未釋放Linux
- oracle 表移動表空間Oracle
- Oracle表移動表空間Oracle
- RM刪除檔案空間釋放詳解
- SQL Server Profiler(P)導致C盤空間不足SQLServer
- Oracle 刪除使用者、表空間、資料檔案、使用者下的所有表Oracle
- 16、表空間 建立表空間
- [待整理]oracle10g刪除(釋放)資料檔案/表空間流程Oracle
- 如何刪除 Mac 儲存空間的其他選項?Mac
- [20230206]整理awr佔用空間3.txt
- 臨時表空間被佔滿的原因查詢