Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ORACLE 11G disable SQL TUNING ADVISOR

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

There is a set of 11g database alert.log error ORA-16957: SQL Analyze time limit interrupt on production.

Troubleshooting: ORA-16957: "SQL Analyze time limit interrupt" Errors (Doc 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;/

This means that background automatic sql analysis takes more than the default time limit of 3600s, and you need to use the DBMS_SQLTUNE.SET_TUNING_TASK_PARAMETER package to increase the time limit.

Generally, SQL TUNING ADVISOR is not enabled by default in production. Automatic SQL TUNING ADVISOR can be turned off using the following code:

SYS@db2> select client_name,status from DBA_AUTOTASK_CLIENT;CLIENT_NAME STATUS---------------------------------------------------------------- --------auto optimizer stats collection ENABLEDauto space advisor ENABLEDsql tuning advisor ENABLED--disable sql tuning advisorSYS@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 ENABLEDauto space advisor ENABLEDsql tuning advisor DISABLED--enable sql tuning advisorBEGINdbms_auto_task_admin.enable( client_name => 'sql tuning advisor', operation => NULL, window_name => NULL);END;

Reference: blog.chinaunix.net/uid-25528717-id-3172008.html

Reference: www.cnblogs.com/suredandan/p/3200157.html

Reference: blog.itpub.net/235507/viewspace-1137629/

Official Document: docs.oracle.com/cd/E11882_01/server.112/e25494/tasks.htm#ADMIN12332

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report