您好,登錄后才能下訂單哦!
生產上有一套11g數據庫alert.log報錯ORA-16957: SQL Analyze time limit interrupt。
查詢MOS相關文檔Troubleshooting: ORA-16957: "SQL Analyze time limit interrupt" Errors (文檔 ID 1275248.1)
The ORA-16957 error is an internal error code used to indicate that SQL Tuning Task has reached the time limit for tuning a specific sql.
The default time limit is 3600 seconds.
1. Check the current timing:
COLUMN parameter_value FORMAT A30 SELECT parameter_name, parameter_value FROM dba_advisor_parameters WHERE task_name = 'SYS_AUTO_SQL_TUNING_TASK' AND parameter_name IN ('TIME_LIMIT', 'DEFAULT_EXECUTION_TYPE', 'LOCAL_TIME_LIMIT');
Then, increase the time:
Using:
BEGIN DBMS_SQLTUNE.SET_TUNING_TASK_PARAMETER(task_name => 'SYS_AUTO_SQL_TUNING_TASK', parameter => 'TIME_LIMIT', value => 7200); END; /
意思是后臺自動分析sql耗時超過了默認的時間限制3600s,需要使用DBMS_SQLTUNE.SET_TUNING_TASK_PARAMETER包增長時間限制。
一般在生產上不默認是不開啟SQL TUNING ADVISOR。可以使用下面代碼關閉自動SQL TUNING ADVISOR。
--查詢當前任務狀態 SYS@db2> select client_name,status from DBA_AUTOTASK_CLIENT; CLIENT_NAME STATUS ---------------------------------------------------------------- -------- auto optimizer stats collection ENABLED auto space advisor ENABLED sql tuning advisor ENABLED --禁用sql tuning advisor SYS@db2> BEGIN 2 dbms_auto_task_admin.disable( 3 client_name => 'sql tuning advisor', 4 operation => NULL, 5 window_name => NULL); 6 END; 7 / PL/SQL procedure successfully completed. --再次查詢狀態 SYS@db2> select client_name,status from DBA_AUTOTASK_CLIENT; CLIENT_NAME STATUS ---------------------------------------------------------------- -------- auto optimizer stats collection ENABLED auto space advisor ENABLED sql tuning advisor DISABLED --啟用sql tuning advisor BEGIN dbms_auto_task_admin.enable( client_name => 'sql tuning advisor', operation => NULL, window_name => NULL); END;
參考文檔:http://blog.chinaunix.net/uid-25528717-id-3172008.html
參考文檔:http://www.cnblogs.com/suredandan/p/3200157.html
參考文檔:http://blog.itpub.net/235507/viewspace-1137629/
官方文檔:http://docs.oracle.com/cd/E11882_01/server.112/e25494/tasks.htm#ADMIN12332
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。