
set serveroutput on
set long 999999999
set longchunksize 20000
exec dbms_output.put_line(DBMS_SQLTUNE.create_tuning_task(sql_id=>'3q2zpgycdxbv4', task_name=>'Tune_3q2zpgycdxbv4', description=>'Tune 3q2zpgycdxbv4 - Workflow Rule query'));
exec DBMS_SQLTUNE.execute_tuning_task('Tune_3q2zpgycdxbv4');

select task_name, description, advisor_name, execution_start, execution_end, status FROM dba_advisor_tasks where task_name like 'Tune%'

select DBMS_SQLTUNE.report_tuning_task('Tune_3q2zpgycdxbv4', 'TEXT', 'ALL') FROM dual;  
  

  
