1. alert.log 錯誤內容指向一個 trace file

2. 查 trace file 很明確指出是哪個 module name ( emagent_SQL_rac_database )

3. 進資料庫查了一下目前開啟的 cursor 是多少 ( DB open_cursor 是設定為 1000 )
set line 200
col user_name format a13
SELECT user_name, count(*) as "OPEN CURSORS" FROM v$open_cursor GROUP BY user_name;

發現 DBSNMP Cursor 開了 1033 個,
4. 檢查執行中的 Query
set line 200
col user_name format a13
SELECT sql_text, count(*) as "CURSORS", user_name FROM v$open_cursor GROUP BY sql_text, user_name ORDER BY COUNT(*) desc;

5. Query 內容查詢與 tablespace 空間有關
懷疑 EM Agent 是否當機,就做了以下 EM Agent 的測試,都是正常可識別
cd <agent_home>/bin
./emctl status agent
./emctl pingOMS
./emctl upload
6. 重啟 EM Agent
清掉卡很久的 Query,或許使用 kill session 也可以,但怕 session 會清不乾淨,才選擇重啟 EM Agent
cd <AGENT_HOME>/bin
./emctl stop agent
./emctl start agent

後記:
Oracle Doc ORA-6544[pevm_peruws_callback-1][604] is caused (Doc ID 2638095.1) 文內指出
alertlog所產生的error stack dump檔案內容出現ORA-01000: maximum open cursors exceeded是根因
解決方式則是直接增加open_cursor的值
SQL> alter system set open_cursor=10000 scope=both sid='*';
文內提到需要重啟資料庫,使其open_cursor新值生效,由於設定open_cursor是可以立即生效,但可能只適用於新連線的session,因此才會需要做到重啟資料庫的動作
0 留言