2 Replies Latest reply: Jun 18, 2010 10:52 AM by RPuttagunta RSS

    DBMS_SQLTUNE ORA-16951

    RPuttagunta
      Hi,
      Connected to:
      Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
      With the Partitioning, OLAP and Data Mining options
      
      SQL> DECLARE
        2    my_task_name VARCHAR2(30);
        3    my_sqltext   CLOB;
        4  BEGIN
        5    my_sqltext := 'select * from dual';
        6    -- uncomment to re-run
        7    dbms_sqltune.drop_tuning_task(task_name => 'rahul_sql_tuning_task');
        8    my_task_name := dbms_sqltune.create_tuning_task(sql_text    => my_sqltext,
        9                                                    bind_list   => sql_binds(anydata.convertnumber(100)),
       10                                                    scope       => 'comprehensive',
       11                                                    time_limit  => 60,
       12                                                    task_name   => 'rahul_sql_tuning_task',
       13                                                    description => 'task TO tune OPEN pallets query');
       14  END;
       15  /
      
      PL/SQL procedure successfully completed.
      
      SQL> BEGIN
        dbms_sqltune.execute_tuning_task(task_name => 'rahul_sql_tuning_task');
      END;
      /  2    3    4
      
      PL/SQL procedure successfully completed.
      
      SQL> SET LONG 10000
      SQL> SET LONGCHUNKSIZE 10000
      SQL> SET LINESIZE 100
      SQL> SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'rahul_sql_tuning_task')
        2  FROM DUAL;
      
      DBMS_SQLTUNE.REPORT_TUNING_TASK('RAHUL_SQL_TUNING_TASK')
      ----------------------------------------------------------------------------------------------------
      GENERAL INFORMATION SECTION
      -------------------------------------------------------------------------------
      Tuning Task Name                  : rahul_sql_tuning_task
      Tuning Task Owner                 : private
      Scope                             : COMPREHENSIVE
      Time Limit(seconds)               : 60
      Completion Status                 : COMPLETED
      Started at                        : 06/18/2010 10:10:01
      Completed at                      : 06/18/2010 10:10:01
      Number of Errors                  : 1
      
      
      DBMS_SQLTUNE.REPORT_TUNING_TASK('RAHUL_SQL_TUNING_TASK')
      ----------------------------------------------------------------------------------------------------
      -------------------------------------------------------------------------------
      Schema Name: private
      SQL ID     : bqf9h9bhb6c88
      SQL Text   : select * from dual
      
      -------------------------------------------------------------------------------
      ERRORS SECTION
      -------------------------------------------------------------------------------
      - ORA-16951: Too many bind variables supplied for this SQL statement.
      
      -------------------------------------------------------------------------------
      
      DBMS_SQLTUNE.REPORT_TUNING_TASK('RAHUL_SQL_TUNING_TASK')
      ----------------------------------------------------------------------------------------------------
      
      
      SQL>
      What am I doing wrong?