We may get below error while accepting sql profile.
execute dbms_sqltune.accept_sql_profile(task_name =>’3q16sk8g7fu1w_tuning_task’, task_owner => ‘SYS’, replace =>TRUE);
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
Solution:
Drop the tuning task:
SQL> exec DBMS_SQLTUNE.DROP_TUNING_TASK(‘3q16sk8g7fu1w_tuning_task’);
PL/SQL procedure successfully completed.
Then recreate and rerun the tuning task and accept the profile.
Metalink ID – 2013618.1