ORACLE Color profile: DisabledT&T Composite Default screen
396
/ Oracle Database 11g Release 2 Performance Tuning Tips & Techniques / Niemiec / 178026-2 / Chapter 8 Blind Folio 8:396
Oracle Database 11g Release 2 Performance Tuning Tips & Techniques
Making Sure the Task Can Be Seen in the Advisor Log To see the task, query the USER_ADVISOR log: select task_name from user_advisor_log; TASK_NAME ------------------first_tuning_task13
Executing the SQL Tuning Task To execute the tuning task, you use the DBMS_SQLTUNE package, as shown here: BEGIN DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'first_tuning_task13' ); END; /
Checking Status of the Tuning Task To see the specific tuning task, query the USER_ADVISOR log: select status from user_advisor_tasks where task_name = 'first_tuning_task13'; STATUS --------COMPLETED
Displaying the SQL Tuning Advisor Report To see the SQL Tuning Advisor Report, you also use the DBMS_SQLTUNE package: SET SET SET SET
LONG 8000 LONGCHUNKSIZE 8000 LINESIZE 100 PAGESIZE 100
select dbms_sqltune.report_tuning_task('first_tuning_task13') from dual;
ch08.ps P:\010Comp\Oracle_Tip\026-2_Oracle_Tip\ch08.vp 08 February 2012 16:38:42