Avatar of dbadm
dbadm
Flag for Italy

asked on 

Run SQL Access Advisor from SQL*Plus

Hi,
I Know that the SQL Access Advisor is an useful advisor like SQL Tuning Advisor, It makes suggestions about  SQL access methods and helps resolve performance problems in Oracle database.

I create SQL Tuning Advisor manually with 3 sample steps:

1) Create Tuning Task
declare
   my_task_name VARCHAR2(30);
begin
   my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
       sql_id => '50d2sfn999phq',
       scope => 'COMPREHENSIVE',
       time_limit => 3600,
       task_name => 'sql_tuning_task_50d2sfn999phq',
       description => 'Task to tune query 50d2sfn999phq');
   DBMS_OUTPUT.PUT_LINE(my_task_name);
end;
/

Open in new window


2) Execute Tuning task
begin
   DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'sql_tuning_task_50d2sfn999phq');
end;

Open in new window


3) Get the Tuning advisor report
SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'sql_tuning_task_50d2sfn999phq') from DUAL;

Open in new window


How can I create the "SQL Access Advisor" using SQL*Plus (without Enterprise Manager) for sql_id 50d2sfn999phq? The Oracle documentation is not very clear on this.

Thanks!
SQLOracle Database* perfomance tuning* Database Performance

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)

8/22/2022 - Mon