Ao executar o seguinte erro foi reportado:
BEGIN dbms_advisor.create_file(dbms_advisor.get_task_script('task1'),'tune_scripts','tune.sql'); END;
Relatório de erros -
ORA-22285: diretório ou arquivo inexistente para operação FILEOPEN
ORA-06512: em "SYS.DBMS_LOB", line 1481
ORA-06512: em "SYS.DBMS_ADVISOR", line 632
ORA-06512: em line 1
22285. 00000 - "non-existent directory or file for %s operation"
*Cause: Attempted to access a directory that does not exist, or attempted
to access a file in a directory that does not exist.
*Action: Ensure that a system object corresponding to the specified
directory exists in the database dictionary, or
make sure the name is correct.
Abaixo estão meus comandos:
create table tb as select * from all_objects;
select distinct object_id from tb order by object_id;
execute dbms_advisor.quick_tune(dbms_advisor.sqlaccess_advisor, 'task1','select distinct object_id from tb order by object_id');
select * from user_advisor_actions;
create directory tune_scripts as 'C:\Tempo';
EXECUTE dbms_advisor.create_file(dbms_advisor.get_task_script('task1'),'tune_scripts','tune.sql');