This content has been marked as final. Show 2 replies
What version of Oracle? What edition? What options are licensed?
Do you know what the "good" plan was?
Since this doesn't appear to have anything to do with database security, you are probably much better off posting it in a more appropriate forum (one of the nice mods will probably move it to the Database - General forum shortly if you don't close this thread and open a new one there). If you do post in a more appropriate forum, please at a minimum answer the questions I asked above.
Identify the sql_id (and replace it with d9vm06y4jk4z6) of the query run below & accept the sql_profile or refer recommended changes , don't know if it will return you the prev. good plan but it will give you best plan with good response /cost
DECLARE my_task_name VARCHAR2(30); my_sqltext CLOB; BEGIN my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK( sql_id =>'d9vm06y4jk4z6', scope => 'COMPREHENSIVE', time_limit => 60, task_name => 'sql_ims1_d9vm06y4jk4z6', description => 'Task to tune a query'); END; Begin dbms_sqltune.Execute_tuning_task (task_name => 'sql_ims1_d9vm06y4jk4z6'); end; set long 100000 set linesize 5000 set pages 4000 select dbms_sqltune.report_tuning_task('sql_ims1_d9vm06y4jk4z6') from dual;