Posts

Showing posts from November, 2018

Creating SQL Tuning Task with sql_id

Creating SQL Tuning Task with sql_id ============================= First get sql_id of sql those who try to create task Hope as dba you all know how get sql_id. and here i take below sql-id to create task sql_id= 2w3y1nfj1uanf Note: remember in below red color sql_id change as per your id. Step1: - Create task:  SET serveroutput ON DECLARE   v_tune_taskid  VARCHAR2(100); BEGIN   v_tune_taskid := dbms_sqltune.create_tuning_task (                           sql_id      => ' 2w3y1nfj1uanf ',                           scope       => dbms_sqltune.scope_comprehensive,                           time_limit  => 30,                           task_name...

SQL Tuning Task Creation ORA-13780: SQL statement does not exist.

SQL Tuning Task Creation ORA-13780: SQL statement does not exist. ================================================= example:- declare  l_sql_tune_task_id  varchar2(100); begin  l_sql_tune_task_id := dbms_sqltune.create_tuning_task (         sql_id      => 'your sql_id',         scope       => dbms_sqltune.scope_comprehensive,         time_limit  => 10800,         task_name   => 'tuning task name',         description => 'tuning task description');  dbms_output.put_line('l_sql_tune_task_id: ' || l_sql_tune_task_id); end; / declare * ERROR at line 1: ORA-13780: SQL statement does not exist. ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79 ORA-06512: at "SYS.PRVT_SQLADV_INFRA", line 125 ORA-06512: at "SYS.DBMS_SQLTUNE", line 655 solution :----  SELECT SNAP_ID FROM DBA_HIST_...