1. Create SQL Tuning Advisor task
DECLARE
my_task_name VARCHAR2(30);
begin
my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'd6v2m5q1t3hpp',scope => 'COMPREHENSIVE',time_limit => 60,task_name => 'my_tune',description => '7a6b4442j5pcz');
end;
/
2. Run Task
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'my_tune');
3. View results
SET LONG 10000
SET PAGESIZE 1000
SET LINESIZE 200
SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK('my_tune') from dual;
4.drop the sql_tunning task
exec DBMS_SQLTUNE.drop_tuning_task (task_name => 'my_tune');
5.to list the tunning task job details
dba_advisor_tasks,DBA_ADVISOR_FINDINGS
DECLARE
my_task_name VARCHAR2(30);
begin
my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'd6v2m5q1t3hpp',scope => 'COMPREHENSIVE',time_limit => 60,task_name => 'my_tune',description => '7a6b4442j5pcz');
end;
/
2. Run Task
EXEC DBMS_SQLTUNE.execute_tuning_task(task_name => 'my_tune');
3. View results
SET LONG 10000
SET PAGESIZE 1000
SET LINESIZE 200
SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK('my_tune') from dual;
4.drop the sql_tunning task
exec DBMS_SQLTUNE.drop_tuning_task (task_name => 'my_tune');
5.to list the tunning task job details
dba_advisor_tasks,DBA_ADVISOR_FINDINGS
No comments:
Post a Comment