zilong198738 发表于 2015-3-11 11:54:12

接受Oracle自动优化任务产生的SQL Profile 时候的报错

在执行完oracle自动优化任务后,在接受产生的sql profile的时候产生如下报错:
SQL> execute dbms_sqltune.accept_sql_profile(task_name => 'tuning_sql_test',task_owner => 'POSP', replace => TRUE);
BEGIN dbms_sqltune.accept_sql_profile(task_name => 'tuning_sql_test',task_owner => 'POSP', replace => TRUE); END;

*
ERROR at line 1:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16446
ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
ORA-06512: at "SYS.DBMS_SQLTUNE", line 7568
ORA-06512: at line 1


请大神看看是什么原因造成的,感谢





Liu Maclean(刘相兵 发表于 2015-3-12 14:37:11

1、提问至少说明 版本! 版本!

odm finding :






Bug 8910144  DBMS_SQLTUNE.CREATE_SQL_PLAN_BASELINE may get ORA-1422

This note gives a brief overview of bug 8910144.
The content was last updated on: 28-JUN-2013
Click here for details of each of the sections below.
Affects:

Product (Component)        Oracle Server (Rdbms)
Range of versions believed to be affected        Versions >= 11 but BELOW 12.1
Versions confirmed as being affected       
11.2.0.1
Platforms affected        Generic (all / most platforms affected)
Fixed:

This issue is fixed in       
12.1.0.1 (Base Release)
11.2.0.2 (Server Patch Set)
Symptoms:

Related To:

Error May Occur
ORA-1422
PL/SQL (DBMS Packages)
Optimizer (SQL Plan Management)
DBMS_SQLTUNE
Description

DBMS_SQLTUNE.CREATE_SQL_PLAN_BASELINE may get ORA-1422

Rediscovery Notes:
If you hit ORA-1422 while executing DBMS_SQLTUNE.CREATE_SQL_PLAN_BASELINE,
probably you hit this issue.

Run following query with parameter passed to create_sql_plan_baseline procedure.

select * from dba_advisor_sqlstats where task_name='<TASK_NAME>'
and object_id='<OBJECT_ID>' and plan_hash_value='<PLAN_HASH_VALUE>'

If this query returns more than one row, your problem would be solved
by this bug fix.

Workaround
None

zilong198738 发表于 2015-4-9 13:38:23

失误,最近太忙 没注意看这个 ,版本是11.2.3+centos5.8的
页: [1]
查看完整版本: 接受Oracle自动优化任务产生的SQL Profile 时候的报错