DBMS_SQLTUNE ORA-16951

Hello
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 I am doing wrong?

Try out this last:

sql_binds(anydata.ConvertNumber(100))

refer to the metalink document ID 813596.1

Tags: Database

Similar Questions

  • ORA-00911: invalid character in DBMS_SQLTUNE. REPORT_TUNING_TASK 11.2.0.1

    DECLARE
     my_task_name VARCHAR2(30);
     my_sqltext   CLOB;
    BEGIN
     my_sqltext := 'select l.cp_name, (select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '|| 
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''committed'' and e.mop_id=l.id) as Committed, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''published'' and e.mop_id=l.id) as Published, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''quarantined'' and e.mop_id=l.id) as Quarantined, '||
    '(select count(distinct e.youview_id)  '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''expiredFromQuarantine'' and e.mop_id=l.id) as Expired, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''failed'' and e.mop_id=l.id) as Failed, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id  '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''valid'' and e.mop_id=l.id) as Valid, '||
    '(select count(distinct e.youview_id) '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and s.status=''invalid'' and e.mop_id=l.id) as Invalid, '||
    '(select count(distinct e.youview_id)  '||
    'from mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id '||
    'where e.date_created < TO_TIMESTAMP_TZ(''15-MAY-2011 23.59.59.000000000 +00:00'',''DD/MM/YYYY HH24:MI:SS.FF TZH:TZM'') '||
    'and e.mop_id=l.id) as Total '||
    'from mips_mdm.mop_lookup l order by l.id;';
     my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(
             sql_text    => my_sqltext,
             user_name   => 'MIPS_MDM',
             scope       => 'COMPREHENSIVE',
             time_limit  => 60,
             task_name   => 'my_sql_tuning_taskMIPS4',
             description => 'Task to tune a query on a specified employee');
    END;
    /
    
    
    
    SELECT DBMS_SQLTUNE.REPORT_TUNING_TASK( 'my_sql_tuning_taskMIPS4')
      FROM DUAL;
      
    
    GENERAL INFORMATION SECTION
    -------------------------------------------------------------------------------
    Tuning Task Name   : my_sql_tuning_taskMIPS4
    Tuning Task Owner  : DEPLOY_CTL
    Workload Type      : Single SQL Statement
    Scope              : COMPREHENSIVE
    Time Limit(seconds): 60
    Completion Status  : COMPLETED
    Started at         : 05/24/2011 10:31:59
    Completed at       : 05/24/2011 10:32:53
    
    -------------------------------------------------------------------------------
    Schema Name: MIPS_MDM
    SQL ID     : 9246fjyc01k83
    SQL Text   : select l.cp_name, (select count(distinct e.youview_id) from
                 mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on
                 e.youview_id = s.youview_id where e.date_created <
                 TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='committed' and e.mop_id=l.id) as Committed, (select
                 count(distinct e.youview_id) from mips_mdm.entity_lookup e inner
                 join mips_mdm.tx_status s on e.youview_id = s.youview_id where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='published' and e.mop_id=l.id) as Published, (select
                 count(distinct e.youview_id) from mips_mdm.entity_lookup e inner
                 join mips_mdm.tx_status s on e.youview_id = s.youview_id where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='quarantined' and e.mop_id=l.id) as Quarantined,
                 (select count(distinct e.youview_id)  from
                 mips_mdm.entity_lookup e inner join mips_mdm.tx_status s on
                 e.youview_id = s.youview_id where e.date_created <
                 TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='expiredFromQuarantine' and e.mop_id=l.id) as Expired,
                 (select count(distinct e.youview_id) from mips_mdm.entity_lookup
                 e inner join mips_mdm.tx_status s on e.youview_id = s.youview_id
                 where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011
                 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM')
                 and s.status='failed' and e.mop_id=l.id) as Failed, (select
                 count(distinct e.youview_id) from mips_mdm.entity_lookup e inner
                 join mips_mdm.tx_status s on e.youview_id = s.youview_id  where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and s.status='valid'
                 and e.mop_id=l.id) as Valid, (select count(distinct
                 e.youview_id) from mips_mdm.entity_lookup e inner join
                 mips_mdm.tx_status s on e.youview_id = s.youview_id where
                 e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011 23.59.59.000000000
                 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM') and
                 s.status='invalid' and e.mop_id=l.id) as Invalid, (select
                 count(distinct e.youview_id)  from mips_mdm.entity_lookup e
                 inner join mips_mdm.tx_status s on e.youview_id = s.youview_id
                 where e.date_created < TO_TIMESTAMP_TZ('15-MAY-2011
                 23.59.59.000000000 +00:00','DD/MM/YYYY HH24:MI:SS.FF TZH:TZM')
                 and e.mop_id=l.id) as Total from mips_mdm.mop_lookup l order by
                 l.id;
    
    -------------------------------------------------------------------------------
    ERRORS SECTION
    -------------------------------------------------------------------------------
    - ORA-00911: invalid character
    
    -------------------------------------------------------------------------------
    Please can I know what is cauing this error to occur in SQL tunning games.

    Published by: BluShadow on May 24, 2011 11:13
    addition of {noformat}
    {noformat} tags                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    >
    "of mips_mdm.mop_lookup the order by l.id;"
    >

    Try to remove the semicolon ';' sql statement (quoted string) and re - run.

    Thank you

    REDA

  • ORA-04063: package body 'SYS. DBMS_SQLTUNE error' during the upgrade

    Hello
    I am trying to upgrade the oracle 10.2.0.2 on 11.2.0.1 with dbua tool database. During the upgrade "Oracle Server" ORA-04063: package body 'SYS. DBMS_SQLTUNE"error has occurred.
    In the oracle server log:

    ---------------------------------------------------------------------------------------------------------------

    REM create the automated SQL Tuning task
    REM If the task exists already (catproc is re-of running) is not error.
    Start
    2 sys.dbms_sqltune_internal.i_create_auto_tuning_task;
    exception 3
    so 4 than others then
    5 if (sqlcode =-13607) then - task already exists
    6 null;
    7 other
    8 lift;
    9 end if;
    10 end;
    11.
    Start
    *
    ERROR on line 1:
    ORA-04063: package body 'SYS. DBMS_SQLTUNE"contains errors
    ORA-06508: PL/SQL: called program unit is not found: 'SYS. DBMS_SQLTUNE ".
    ORA-06512: at line 8 level

    ------------------------------------------------------------------------------------------------------------------------------------------------------------

    After unsuccessful upgrade I have restore and recover the database. SYS. The DBMS_SQLTUNE package and package body were valid. But when I compile them the package becomes invalid.
    I get the error and reach 390221.1 metalink Note:

    ------------------------------------------------------------------------------------------------------------------------------------------------------

    Solution
    -Drop synonyms
    Drop public synonym existsnode.
    excerpt from Drop public synonym;

    ----------------------------------------------------------------------------------------------------------------------------------------------------

    But there are no synonyms, which is mentioned in this note in my PB.

    How can I solve this problem? Thank you.

    If you have not read the note ORA-04063: package body 'SYS. DBMS_SQLTUNE' errors - upgrade to 10 G and 11 G fails on ID Dbms_sqltune 1271490.1+?

    Nicolas.

  • Run DBMS_SQLTUNE as a user not sys, getting ORA-13774

    Hello
    I am trying to run DBMS_SQLTUNE as a user not sys and
    ORA-13774: not sufficient privileges to select data in the repository of the workload
    ORA-06512: at "SYS." DBMS_SYS_ERROR', line 79
    ORA-06512: at "SYS." PRVT_SQLADV_INFRA', line 240
    ORA-06512: at "SYS." DBMS_SQLTUNE', line 542
    ORA-06512: at line 4 level

    I grant all on

    SYS. DBA_HIST_BASELINE
    SYS. DBA_HIST_SQLTEXT
    SYS. DBA_HIST_SQLSTAT
    SYS. DBA_HIST_SQLBIND
    SYS. DBA_HIST_OPTIMIZER_ENV
    SYS. DBA_HIST_SNAPSHOT

    but still get the error.
    Anyone can share a thought?
    Thank you
    Anatoliy

    Handle: asmirnov
    Status level: Beginner
    Join date: January 10, 2001
    Messages total: 327
    Total Questions: 79 (47 pending)
    many questions and so few answers.
    :-(

    It works for me.

    SQL> !cat hr-privs.sql
    grant select on sys.DBA_HIST_BASELINE  to hr;
    grant select on sys.DBA_HIST_SQLTEXT to hr;
    grant select on sys.DBA_HIST_SQLSTAT to hr;
    grant select on sys.DBA_HIST_SQLBIND to hr;
    grant select on sys.DBA_HIST_OPTIMIZER_ENV to hr;
    grant select on sys.DBA_HIST_SNAPSHOT to hr;
    GRANT ADVISOR TO HR;
    
    SQL> show user
    USER is "SYS"
    SQL> connect hr/oracle
    Connected.
    SQL> @tt
    
    PL/SQL procedure successfully completed.
    
    SQL> BEGIN
    dbms_sqltune.execute_tuning_task (task_name => 'vega_tuning_task');
    END;
    /  2    3    4  
    
    PL/SQL procedure successfully completed.
    

    http://www.orafaq.com/node/1837

  • Exception ORA when accepting SQL Tuning Set

    Hello

    RDBMS version: 11.2.0.1.0 & 11.2.0.4.0

    OS: OEL 5 (64-bit)

    I am creating a SQL tuning set and get both to do exception below. Tried to search on the forums also with the exception of the ORA, but unable to get any resolution for this exception ORA.

    The following awards were made: -.

    GRANT CREATE ANY SQL PROFILE TO SCOTT;
    GRANT DROP ANY SQL PROFILE TO SCOTT;
    GRANT ALTER ANY SQL PROFILE TO SCOTT;
    GRANT ADVISOR TO SCOTT;
    GRANT ADMINISTER SQL MANAGEMENT OBJECT TO SCOTT;
    grant execute on dbms_spm to SCOTT;
    grant administer sql management object to SCOTT;
    
    

    DECLARE
      my_task_name VARCHAR2(30);
      my_sqltext CLOB;
      my_sqlprofile_name VARCHAR2(4000);
    BEGIN
      my_sqltext   := 'SELECT * FROM emp';
      my_task_name := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_text => my_sqltext, user_name => 'SCOTT', scope => 'COMPREHENSIVE', time_limit => 60, task_name => 'my_sql_tuning_task3', description => 'Demo Task to tune a query');
      DBMS_SQLTUNE.EXECUTE_TUNING_TASK( task_name => 'my_sql_tuning_task3');
      my_sqlprofile_name := DBMS_SQLTUNE.ACCEPT_SQL_PROFILE (task_name =>'my_sql_tuning_task3', name => 'my_sql_profile');   -- Culprit for the exception
      --dbms_output.put_line(my_sqlprofile_name);
    END;
    /
    
    Error report -
    ORA-13786: missing SQL text of statement object "1" for tuning task "my_sql_tuning_task3"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16255
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7133
    ORA-06512: at line 4
    13786. 00000 -  "missing SQL text of statement object \"%s\" for tuning task \"%s\""
    *Cause:    The user attempted to accept SQL profile for an object
               that has not a SQL text associated to it.
    *Action:   Check the identifier of the object and retry the operation.
    
    
    

    Would be really grateful if someone could point me in the right direction here.

    TIA...

    Personally, I wouldn't bother with a task of setting.

    If you are lucky who will recommend a sql profile based on adjustments of cardinality which may or may not be effective.

    I would just use either the COE_XFR_SQL_PROFILE. SQL script SQLT ( doc-id 1487302.1Support) or use SQL Plan baseline to apply the previous execution plan. The latter has the advantage of being able to make an evolution controlled all plans potentially better which would otherwise be generated.

    You can choose the older, better plan AWR in the same database or a different database, and then transport it.

  • ORA-13607 in sql developer

    Hello

    in devlopper sql in reports view. Reports of data dictionary. Administration of databases | Top of page SQL | Top of page SQL by expected when I select any line the top grid waiting SQL (SQL statement), then try to switch to the sql tuning tips of the pane tab below I get ora-13607.

    ORA-13607: the sql_id_tuning_task_SD of id task or the specified object already exists

    Any solution?

    If I use dbms_sqltune.drop_tuning_task to remove the task how to find the name of the task?

    Thank you.

    This should help you.

    SQL > select master, TaskName, dba_advisor_log status where TaskName not like '% ADDM. "

    STATUS OF OWNER TASKNAME

    -------------------- ------------------------------ ----------

    SYS FINISHED SYS_AUTO_SPCADV_903492013

    SYS FINISHED SYS_AUTO_SPCADV_4032982013

    SYS FINISHED SYS_AUTO_SPCADV_10032482013

    SYS FINISHED SYS_AUTO_SPCADV_50112582013

    SYS FINISHED SYS_AUTO_SPCADV_3032382013

    SYS FINISHED SYS_AUTO_SPCADV_13031292013

    SH COMPLETED my_sql_tuning_task1

    SH COMPLETED my_sql_tuning_task

    SYS FINISHED SYS_AUTO_SPCADV_282191782013

    SYS FINISHED SYS_AUTO_SPCADV_511151782013

    SH COMPLETED TASK_98511

    SYS FINISHED my_sql_tuning_task_2

    SYS FINISHED my_sql_tuning_task_3

    SQL > START
    2 DBMS_SQLTUNE.drop_tuning_task (task_name => '& TaskName');
    3 END;
    4.
    Enter the value for TaskName: my_sql_tuning_task_2
    2 old: DBMS_SQLTUNE.drop_tuning_task (task_name => '& TaskName');
    new 2: DBMS_SQLTUNE.drop_tuning_task (task_name-online 'my_sql_tuning_task_2');

    PL/SQL procedure successfully completed.

    SQL > /.
    Enter the value for TaskName: my_sql_tuning_task_3
    2 old: DBMS_SQLTUNE.drop_tuning_task (task_name => '& TaskName');
    new 2: DBMS_SQLTUNE.drop_tuning_task (task_name-online 'my_sql_tuning_task_3');

    PL/SQL procedure successfully completed.

    Thank you

    Asif Haliyal

  • ORA-13780: SQL statement does not exist

    Hello
    on the 11g R2, I get the following message:
    SQL> variable stmt_task VARCHAR2(64);
    SQL> EXEC :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'gh9p77g1fr0kd');
    BEGIN :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => 'gh9p77g1fr0kd'); END;
    
    *
    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
    ORA-06512: at line 1
    Any idea?

    Thank you.

    Sql and the sql_id execution plan has been emptied out of the shared pool, so oracle could not find it.

    -Thank you

  • ORA-13786: lack of SQL text

    Hello
    11g R2, connected sysdba, I got the following errors. Any idea? Any help? Thanks before.
    SQL> select sql_id, sql_text from v$sql where sql_text like '%SELECT A.BUSINESS_UNIT, D.DESCR FROM PS_SP_RECV1_NONVW%' and sql_text not like '%v$sq
    ;
    
    SQL_ID
    -------------
    
    6d66jzkkyg2sw
    SQL_TEXT
    --------------------------------------------------------------------------------
    SELECT A.BUSINESS_UNIT, D.DESCR FROM PS_SP_RECV1_NONVW A, PS_SP_RCV1_NONVWLN D W
    
    
    
    HERE D.BUSINESS_UNIT LIKE 'IFP%' AND D.BUSINESS_UNIT=A.BUSINESS_UNIT AND D.LANGU
    AGE_CD='FRA' UNION SELECT  BUSINESS_UNIT, DESCR FROM PS_SP_RECV1_NONVW A WHERE B
    USINESS_UNIT LIKE 'IFP%' AND NOT EXISTS (SELECT 'X' FROM PS_SP_RCV1_NONVWLN D WH
    ERE  D.BUSINESS_UNIT=A.BUSINESS_UNIT AND D.LANGUAGE_CD='FRA') ORDER BY 1
    
    
    SQL> variable stmt_task VARCHAR2(64);
    SQL>
    SQL> EXEC :stmt_task := DBMS_SQLTUNE.CREATE_TUNING_TASK(sql_id => '6d66jzkkyg2sw');
    
    PL/SQL procedure successfully completed.
    
    SQL>
    SQL> EXEC DBMS_SQLTUNE.EXECUTE_TUNING_TASK(:stmt_task);
    
    PL/SQL procedure successfully completed.
    
    SQL> EXEC dbms_sqltune.accept_sql_profile(:stmt_task);
    BEGIN dbms_sqltune.accept_sql_profile(:stmt_task); END;
    
    *
    ERROR at line 1:
    ORA-13786: missing SQL text of statement object "1" for tuning task "TASK_2767"
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 95
    ORA-06512: at "SYS.DBMS_SQLTUNE_INTERNAL", line 16442
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 31
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7568
    ORA-06512: at line 1
    SQL> DECLARE
      2    l_sql_tune_task_id  VARCHAR2(200);
      3  BEGIN
      4    l_sql_tune_task_id := DBMS_SQLTUNE.accept_sql_profile (
      5                            task_name => ':stmt_task',
      6                            name      => 'TEST_PROFILE',
      7                            force_match  => TRUE,
      8                            profile_type => DBMS_SQLTUNE.PX_PROFILE);
      9  END;
     10  /
    DECLARE
    *
    ERROR at line 1:
    ORA-13605: The specified task or object :stmt_task does not exist for the
    current user.
    ORA-06512: at "SYS.DBMS_SYS_ERROR", line 86
    ORA-06512: at "SYS.PRVT_ADVISOR", line 5878
    ORA-06512: at "SYS.PRVT_SQLPROF_INFRA", line 28
    ORA-06512: at "SYS.DBMS_SQLTUNE", line 7544
    ORA-06512: at line 4

    I think you forgot the taskname-online setting "TaskName":

    DECLARE
    stmt_task VARCHAR2 (64);
    BEGIN
    stmt_task: = dbms_sqltune.create_tuning_task (sql_id-online '6d66jzkkyg2sw', task_name-online 'task_name');
    END;
    /

    SQL > EXEC dbms_sqltune.accept_sql_profile ('task_name');

  • "ORA-13787: lack of profile SQL ' acceptance of profile sql error!

    Hi all.

    The oracle is 10.2.0.4 on solaris machine.

    I tried to use the profile of sql, but I got some errors when acceptiing "sql profile.

    I've done are as follwoings:

    ----------------------------------
    1 create a tuning task

    DECLARE
    l_sql_tune_task_id VARCHAR2 (100);
    BEGIN
    l_sql_tune_task_id: = DBMS_SQLTUNE. () CREATE_TUNING_TASK
    sql_id = > "1pyfat4wjj7t8"
    plan_hash_value = > null,
    scope = > 'GLOBAL ',.
    time_limit = > 60,
    Task_Name = > '1pyfat4wjj7t8_hoho',-replace TaskName
    Description = > 'Tuning report');
    Dbms_output.put_line ('l_sql_tune_task_id: ' | l_sql_tune_task_id);
    end;
    /

    2 the task of tuning

    BEGIN
    DBMS_SQLTUNE. EXECUTE_TUNING_TASK (task_name = > '1pyfat4wjj7t8_hoho');
    end;
    /

    3. report of the task of tuning

    THE VALUE OF 10000 LONG
    SET LONGCHUNKSIZE 10000
    SET LINESIZE 100
    SELECT DBMS_SQLTUNE. REPORT_TUNING_TASK ('1pyfat4wjj7t8_hoho') from DUAL;


    4 accept the tuning task

    DECLARE
    my_sqlprofile_name VARCHAR2 (30);
    BEGIN
    my_sqlprofile_name: = DBMS_SQLTUNE. () ACCEPT_SQL_PROFILE
    Task_Name = > "1pyfat4wjj7t8_hoho"
    force_match = > true,
    name = > '1pyfat4wjj7t8_lim');
    END;
    /

    DECLARE
    *
    ERROR on line 1:
    ORA-13787: lack of profile SQL of the statement '1' for task tuning "1pyfat4wjj7t8_hoho" object
    ORA-06512: at "SYS." DBMS_SQLTUNE_INTERNAL', line 7087
    ORA-06512: at "SYS." DBMS_SQLTUNE', line 5559
    ORA-06512: at line 4 level

    ------------------------------------------------

    I got the error at the final stage of 4.

    What are my mistakes in step 4?

    Thanks in advance.
    Best regards.

    869578 wrote:
    Thanks for your reply.
    DECLARE
    *
    ERROR on line 1:
    ORA-13787: lack of profile SQL of the statement '1' for task tuning "1pyfat4wjj7t8_hoho" object
    ORA-06512: at "SYS." DBMS_SQLTUNE_INTERNAL', line 7087
    ORA-06512: at "SYS." DBMS_SQLTUNE', line 5559
    ORA-06512: at line 4 level

    Thank you.

    Hello

    Check the output of SELECT DBMS_SQLTUNE. REPORT_TUNING_TASK ('1pyfat4wjj7t8_hoho') from DUAL;

    Otherwise any recommendation that the error is thrown

    See you soon

  • ORA-13754: 'SQL Tuning Set' 'string' does not exist for the user "sysman."

    ORA-13754: 'SQL Tuning Set' 'string' does not exist for the user "sysman."

    Hello
    in 10g R2 when I run the following in isqlplus I error of the United Nations:
    SELECT * FROM TABLE(DBMS_SQLTUNE.SELECT_SQLSET(
    'my_sql_tuning_set',
    '(disk_reads/buffer_gets) >= 0.05'));
    
    ORA-13754: "SQL Tuning Set"'my_sql_tuning_set" does not exist for user "sysman". 
    No problem if I run it as sys to sqlplus.

    Thanks for the help.

    How to activate for sys isqlplus?

    You are logged in as sysman,

    Check the user from the sql prompt.

    show user
    
  • dbms_sqltune - table does not exist

    I've run this package from Oracle:
    exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF(table_name=>'test_prof', schema_name=>'USER');
    
    exec dbms_sqltune.pack_stgtab_sqlprof(staging_table_name=>'test_prof',profile_name=>'SYS_SQLPROF_TEMP');
    and two of them are successfully. But when I try to run a query on the table or simply describe the columns in this table I ORA-04043: test_prof of the object does not exist. Could someone explain to me where this table is stored?

    Tutu wrote:
    I've run this package from Oracle:

    exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF(table_name=>'test_prof', schema_name=>'USER');
    
    exec dbms_sqltune.pack_stgtab_sqlprof(staging_table_name=>'test_prof',profile_name=>'SYS_SQLPROF_TEMP');
    

    and two of them are successfully. But when I try to run a query on the table or simply describe the columns in this table I ORA-04043: test_prof of the object does not exist. Could someone explain to me where this table is stored?

    You create the table in lowercase! From there, you use your name of the table in lowercase surrounded by quotation marks:

    SQL> exec DBMS_SQLTUNE.CREATE_STGTAB_SQLPROF(table_name=>'test_prof', schema_name=>'MYUSER');
    
    PL/SQL procedure successfully completed.
    
    SQL> desc test_prof
    ERROR:
    ORA-04043: object test_prof does not exist
    
    SQL> desc "test_prof"
     Name                                      Null?    Type
     ----------------------------------------- -------- ----------------------------
     PROFILE_NAME                                       VARCHAR2(30)
     CATEGORY                                           VARCHAR2(30)
     SIGNATURE                                          NUMBER
     SQL_TEXT                                           CLOB
     DESCRIPTION                                        VARCHAR2(500)
     TYPE                                               VARCHAR2(9)
     STATUS                                             VARCHAR2(8)
     BOOLEAN_FLAGS                                      NUMBER
     ATTRIBUTES                                         SQLPROF_ATTR
     VERSION                                            NUMBER
     SPARE1                                             CLOB
     SPARE2                                             BLOB
    

    Or better, specify uppercase when you create the staging table.

    The most interesting is that when I try to run the package even once again, I have this pile of errors:

    Of course, the table already exists. You should drop everything first to be able to recreate it.

    Nicolas.

  • ORA-27300: OS dependent operating system: CreateThread failed with status: 8

    Hi all

    I'm looking for information on the guide follow error

    ORA-27300: OS dependent operating system: CreateThread failed with status: 8

    ORA-27301: OS Error Message: not enough memory is available to process this command.

    ORA-27302: an error occurred at: ssthrddcr

    Thank you
    Waqas

    Please don't be crazy on me, but in my opinion, this is the wrong place for your question. The fact is that Toshiba doesn't support Windows 2003 server for mobile computing. If you have problems try again with Microsoft.
    As a manufacturer of operating system, they should be able to offer an explanation for each error message. Sorry, but I see no connection between the problems described and Toshiba as a hardware manufacturer.

  • ORA-12154 tns could not resolve the specified correct identifier

    I am facing the following problem:

    labVIEW 2012 32 bits 64 bits of Windows 7, 10.2.0.1.0 oracle client (32-bit).

    I created a DSN from Data Sources (ODBC) (32-bit version of what in % windir%\syswow64\odbcad32.exe) pointing to an instance of Oracle 10 g.

    I have test the DSN in this way (IE. Data sources (ODBC) and the connection is successful (which means that the tnsnames.ora is correct).

    I use the "DB tools Open Connection.vi" in order to get connected to this database, passing as parameters the DSN above, the user name and password.

    I get the error:

    ADO error: 0x80040E4D
    Exception occurred in the Microsoft OLE DB provider for ODBC drivers:

    [Oracle] [ODBC] [Ora] ORA-12154: TNS could not resolve the specified correct identifier

    all will help much appreciated

    Thanks in advance

    Hello everyone.

    I already solved the problem (work until late Saturday).

    the solution was to install the latest version of the Oracle customer, namely: Oracle 11 g Release 2 CLIENT for Windows 32 (11.2.0.1.0).

    Now everything works OK.

    I also tested in Windows 7 32 bit (the .vi even and the same Oracle client). This will also OK.

    Thans a lot.

  • ORA-12154 for sqlplus username/password@TNS but tns ping works and sqlplus username@TNS works.

    Hello-

    I am facing the following question when I try to connect by using the command prompt sqlplus for Oracle 11.2.0.3 DB installed and running on HP - UX.

    The password is not all special characters & I also tried with the double quotes which did not work.

    Following want to work with username/password@TNSNAME because I'm trying to get my application to connect to the database, the schema mentioned because it uses the jdbc connection with the connection as (username/password@TNS:1521) string.

    C:\Users>sqlplus username/Pa55w0rd@DBNAME;
    
    
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 10 07:21:43 2016
    
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    
    ERROR:
    ORA-12154: TNS:could not resolve the connect identifier specified
    
    
    
    
    Enter user-name:
    C:\Users>tnsping DBNAME
    
    
    TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 - Production on 10-FEB-2
    016 07:21:57
    
    
    Copyright (c) 1997, 2010, Oracle.  All rights reserved.
    
    
    Used parameter files:
    C:\app\product\11.2.0\client_2\network\admin\sqlnet.ora
    
    
    
    
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = server.domain) (PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = DBNAME)))
    OK (50 msec)
    
    
    C:\Users>sqlplus username@DBNAME
    
    
    SQL*Plus: Release 11.2.0.1.0 Production on Wed Feb 10 07:22:05 2016
    
    
    Copyright (c) 1982, 2010, Oracle.  All rights reserved.
    
    
    Enter password:
    
    
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    
    
    SQL> show user
    USER is "username"
    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64
    bit Production
    With the Partitioning, Automatic Storage Management, OLAP, Data Mining
    and Real Application Testing options
    
    
    C:\Users>
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    content content of tnsnames.ora & sqlnet.ora:

    DBNAME =
    (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP) (HOST = server.domain)  (PORT = 1521))
        (CONNECT_DATA =
            (SERVER = DEDICATED)
            (SERVICE_NAME = DBNAME)
        )
    )
    

    # sqlnet.ora Network Configuration File: C:\app\product\11.2.0\client_2\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.
    
    
    # This file is actually generated by netca. But if customers choose to 
    # install "Software Only", this file wont exist and without the native 
    # authentication, they will not be able to connect to the database on NT.
    
    
    #SQLNET.AUTHENTICATION_SERVICES= (NTS)
    
    
    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
    
    
    
    
    
    
    
    

    Thanks in advance

    Hello

    sqlplus username/Pa55w0rd@DBNAME;

    Try it without the semicolon;

    sqlplus username/Pa55w0rd@DBNAME

    Regards Thomas

  • ORA-02089: COMMIT is not allowed in a session of subordinate.

    Hi all

    We call our Oracle stored procedure in a database link from a MS SQL database and get the following error...

    Error was not able to run native in bulk handling request: exec AddBookingToCRM @p_attribute1 = "other bulky ', @p_attribute2 = '1 ', @p_attribute3 ="Not specified", @p_attribute4 =" N/a", @p_attribute5 ="Not specified", @p_attribute8 = ' 1231', @p_attribute9 = ' 91665 ', @p_customer_title = 'Mr', @p_customer_firstname is 'Scott', @p_customer_surname = 'Burton', @p_customer_uprn = ' 64004572', @p_customer_area_code = ' 01234 ', @p_customer_phone = ' 567984' , @p_customer_email = ' [email protected]', @p_contact_title = 'Mr', @p_contact_firstname is 'Scott', @p_contact_surname = 'Burton', @p_contact_area_code = ' 01234 ', @p_contact_phone = ' 567984', @p_contact_email = ' [email protected]', @p_resolution_date = ' 2016-02-11 07:00 ' [SQL: exec AddBookingToCRM @p_attribute1 = "other bulky ', @p_attribute2 = '1 ' @p_attribute3 ="Not specified", @p_attribute4 =" N/a", @p_attribute5 ="Not specified", @p_attribute8 = ' 1231', @p_attribute9 = ' 91665' @p_customer_title = 'Mr'] [@p_customer_firstname = 'Scott', @p_customer_surname = 'Burton', @p_customer_uprn is '64004572 ', @p_customer_area_code = '01234', @p_customer_phone = ' 567984', @p_customer_email = ' [email protected]', @p_contact_title = 'Mr', @p_contact_firstname is 'Scott', @p_contact_surname = 'Burton', @p_contact_area_code is '01234', @p_contact_phone = ' 567984', @p_contact_email = ' [email protected]', @p_resolution_date = ' 2016-02-11 07:00 '] could not execute statement on remote server 'LLPGDEV '. "OraOLEDB.Oracle" provider OLE DB linked server 'LLPGDEV' returned message ' ORA-02089: COMMIT is not allowed in a session subordinate ORA-06512: at "XXCRM." XXCRM_CREATE_INCIDENT_DETAILS', line 376 ".

    Thank you very much

    Mike Williams.

    You must be in a comeback or XA transaction. This means that you can not call a procedure that has a COMMIT, because hiring the framework of a transaction is logically impossible. So remove the VALIDATION of the procedure. Which you should do anyway: to engage in a procedure is usually a bad thing.

Maybe you are looking for