2018年春節後第一天上班就遇到一個審計日誌無法寫入的問題,具體解決思路如下。
一、錯誤日誌
資料庫錯誤日誌內容:
Fri Feb 23 11:16:30 2018
OS Audit file could not be created; failing after 6 retries
Fri Feb 23 11:16:36 2018
OS Audit file could not be created; failing after 6 retries
Fri Feb 23 11:16:43 2018
OS Audit file could not be created; failing after 6 retries
Fri Feb 23 11:16:57 2018
OS Audit file could not be created; failing after 6 retries
Fri Feb 23 11:17:25 2018
OS Audit file could not be created; failing after 6 retries
OS Audit file could not be created; failing after 6 retries
Fri Feb 23 11:17:33 2018
OS Audit file could not be created; failing after 6 retries
Fri Feb 23 11:17:35 2018
OS Audit file could not be created; failing after 6 retries
程式錯誤日誌內容:
ORA-09925: Unable to create audit trail file
1、首先檢查磁碟空間是否爆滿
2、檢視資料庫審計型別
3、檢視審計日誌所在目錄空間
4、檢視審計日誌目錄檔案數
5、檢查磁碟是否有損壞
6、為儘快恢復業務,採取緊急清理adump審計目錄的方法
因為日誌內容較多,無法直接按時間清理的情況下(一般通過ls *.aud|xargs -n 10 rm -rf),可以通過清理目錄的方式清理
7、檢視審計日誌內容、頻率等排查具體問題
經過排查發現每分鐘生成18個審計日誌,而且連線程式號都不同(說明是短連線,不斷的斷開重連),然後根據日誌內容找到具體的連線使用者、程式IP,聯絡相關程式溝通處理。