给大家推荐一个sql 调优工具---mytun

给大家推荐一个sql 调优工具
tool download: http://dbhelper.itpub.net/get/26969/mytun.zip
mytun区别于awr
oracle的awr只能看的plan变化,确没采集相关对象(表、列、index)的统计信息 ,及其变化, 所以使plan变化的本质原因并不清晰。
mytun 可采集相关对象统计信息的变化,可发现plan变化的原因。mytun是对awr的一个补充, 侧重对sql情况,执行原因的相关数据信息的收集, 为远程的问题诊断提供帮助。
-----------------------mytun生成报表内容-----------------
sql % : 某sql在各类别的排名
sql total : 某sql耗用资源量。
sql per execs : 某sql一次执行的平均消耗
sql的原始文本
sql窥视绑定变量后的sql文本
sql在v$sqlarea的情况---sql的执行情况
sql在v$sqlarea_plan_hash(一个sql可能多种计划)---sql在不同计划下的执行情况
sql在dba_hist_sql_plan ----sql的历史计划(一般是 7-30天内的)
sql在wrh$_sqlstat -----在历史时间各时段的执行情况(频次, 计划hash, 效率等)
sql在v$sql_bind_capture ------带入的绑定变量
sql在dba_hist_sqlbind -------历史时段的绑定变量
sql 涉及的对象 :
1. dba_tables --表的分析
2. dba_segments --段的大小,
3. 对象的产生, 修改时间等
4. sql所涉及对象:
4.1 表的index 统计分析情况
4.2 表的index 的中包含的列
4.3 table的定义
4.4 table的当前统计值, 历史统计值
4.5 table的列的当前统计值, 历史统计值
4.6 列的柱状图, 历史柱状图。
mytun使用说明
http://dbhelper.itpub.net/
mytun2.0简介: 是一款sql调优工具, 它可快速采集(或远程)sql优化所需的信息, 定位产生错误执行计划的原因,
为远程问题诊断提供新的途径。采集信息包括: plan, 变量值, 分析信息(表/列/索引), 柱状图,
段信息(表/分区/索引),历史执行情况等。
适用范围 : 只适用于Oracle10g的各版本及平台。
目录
一. mytun.zip把上传至数据库服务器, 解压后会生成mytun目录和几个文件。
二. 安装软件包(第一次使用前需要安装, 以后使用就不需要了) 。
三. 使用mytun
附件1: 运行mytunrpt.sql提示过程
附件2: 运行mytunrpt.sql报告结果
四. 卸载mytun
一. mytun.zip把上传至数据库服务器, unzip解压后会生成mytun目录和几个文件。
$ unzip mytun.zip
Archive: mytun.zip
creating: mytun/
inflating: mytun/awrinpnm.sql
inflating: mytun/awrinput.sql
inflating: mytun/awrrpti.sql
inflating: mytun/checkmytun.sql
inflating: mytun/mytun.sql
inflating: mytun/mytunrpt.sql
inflating: mytun/p_mytun1.plb
inflating: mytun/p_mytun2.plb
inflating: mytun/running_sql.sql
二. 安装软件包(第一次使用时需要安装, 以后使用就不需要了)
方法1
$cd mytun
$sqlplus "/ as sysdba"
SQL> @p_mytun1.plb
Package created.
SQL> @p_mytun2.plb
Package body created.
方法2
sqlplus "/ as sysdba" @p_mytun1.plb
sqlplus "/ as sysdba" @p_mytun2.plb
三.使用mytun
使用mytun的方式有3种:
方式1: 采集历史时段的数据库性能sql报告
sqlplus "/ as sysdba"
SQL> @mytunrpt.sql;
《下面的附件1显示在运行mytunrpt.sql提示过程》
注意: 如果没有 执行(二. 安装软件包 ), 运行mytunrpt.sql时会提醒安装。
note: please first install p_mytun1.plb in another session, method: sqlplus "sys/change_on_install as sysdba" @p_mytun1.plb
note: please second install p_mytun2.plb in another session, method: sqlplus "sys/change_on_install as sysdba" @p_mytun2.plb
方式2: 采集正在运行的sql报告
sqlplus "/ as sysdba"
SQL> @running_sql.sql;
方式3:根据sql_id直接查询。 会生成一个clob的报告。
3.1 在工具(PL/SQL Developer等工具)中, 查询会生成一个clob的报告。
select mytun.mysql( (select dbid from v$database),
(select instance_number from v$instance),
'056j4snsvphk5' , --sql_id
100)
from dual;
100: 每个查询子集返回的行数, 建议值100
3.2 在工具(sqlplus 环境中)中, 把结果输出到文件中。
sqlplus "/ as sysdba"
set long 999999999
set heading off
set pages 40000
set feedback off
set echo off
SET LONGCHUNKSIZE 500
set linesize 500
SET LOBOFFSET 1
spool /xxx/xxx/a.txt;
select mytun.mysql( (select dbid from v$database),
(select instance_number from v$instance),
'056j4snsvphk5' , --sql_id
100)
from dual;
spool off;
四. 卸载mytun
$ sqlplus "/ as sysdba"
SQL> drop package mytun;
Package dropped.
[ 本帖最后由 dbhelper 于 2010-8-10 10:51 编辑 ]

Similar Messages

  • Logical Operations in SQL decode function ?

    Hi,
    Is it possible to do Logical Operations in SQL decode function
    like
    '>'
    '<'
    '>='
    '<='
    '<>'
    not in
    in
    not null
    is null
    eg...
    select col1 ,order_by,decode ( col1 , > 10 , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 , <> 10 , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 , not in (10,11,12) , 0 , 1)
    from tab;
    select col1 ,order_by,decode ( col1 ,is null , 0 , 1)
    from tab;
    Regards,
    infan
    Edited by: user780731 on Apr 30, 2009 12:07 AM
    Edited by: user780731 on Apr 30, 2009 12:07 AM
    Edited by: user780731 on Apr 30, 2009 12:08 AM
    Edited by: user780731 on Apr 30, 2009 12:08 AM
    Edited by: user780731 on Apr 30, 2009 12:09 AM

    example:
    select col1 ,order_by,case when col1 > 10 then 0 else 1 end
    from tab;
    select col1 ,order_by,case when col1 &lt;&gt; 10 then 0 else 1 end
    from tab;
    select col1 ,order_by,case when col1 not in (10,11,12) then 0 else 1 end
    from tab;As for testing for null, decode handles that by default anyway so you can have decode or case easily..
    select col1 ,order_by,decode (col1, null , 0 , 1)
    from tab;
    select col1 ,order_by,case when col1 is null then 0 else 1 end
    from tab;

  • Unable to capture the parameter values from a PL/SQL procedure

    hi.
    i'm trying to capture the parameter values of a PL/SQL procedure by calling inside a anonymous block but i'm getting a "reference to uninitialized collection error" ORA-06531.
    Please help me regarding.
    i'm using following block for calling the procedure.
    declare
    err_cd varchar2(1000);
    err_txt VARCHAR2(5000);
    no_of_recs number;
    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
    cntr_var number:=0;
    begin
         rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
         dbms_output.put_line('The error is ' ||err_cd);
         dbms_output.put_line('The error is ' ||err_txt);
         dbms_output.put_line('The cntr is ' ||cntr_var);
         for incr in 1 .. OUT_SIGN_TAB.count
         loop
         cntr_var := cntr_var + 1 ;
    Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN_TAB(incr).txn_type||','||OUT_SIGN_TAB(incr).objid);
    end loop;
    end;
    Error is thrown on "for incr in 1 .. OUT_SIGN_TAB.count" this line
    Following is some related information.
    the 3rd parameter of the procedure is a out parameter. it is a type of a PL/SQL table (SEARCH_SIGN_TAB_TYPE) which is available in database as follows.
    TYPE "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
    TYPE "SEARCH_SIGN_TYPE" AS OBJECT
    (ref_no VARCHAR2(22),
    ciref_no VARCHAR2(352),
    ac_no VARCHAR2(22),
    txn_type VARCHAR2(301),
    objid VARCHAR2(1024))............

    We don't have your rt843pq procedure, but when commenting that line out, everything works:
    SQL> create TYPE "SEARCH_SIGN_TYPE" AS OBJECT
      2  (ref_no VARCHAR2(22),
      3  ciref_no VARCHAR2(352),
      4  ac_no VARCHAR2(22),
      5  txn_type VARCHAR2(301),
      6  objid VARCHAR2(1024))
      7  /
    Type is aangemaakt.
    SQL> create type "SEARCH_SIGN_TAB_TYPE" IS TABLE OF SEARCH_SIGN_TYPE
      2  /
    Type is aangemaakt.
    SQL> declare
      2    err_cd varchar2(1000);
      3    err_txt VARCHAR2(5000);
      4    no_of_recs number;
      5    out_sign_tab search_sign_tab_type:=search_sign_tab_type(search_sign_type(NULL,NULL,NULL,NULL,NULL));
      6    cntr_var number:=0;
      7  begin
      8    -- rt843pq('DWS','3000552485',out_sign_tab,no_of_recs,err_cd,err_txt);
      9    dbms_output.put_line('The error is ' ||err_cd);
    10    dbms_output.put_line('The error is ' ||err_txt);
    11    dbms_output.put_line('The cntr is ' ||cntr_var);
    12    for incr in 1 .. OUT_SIGN_TAB.count
    13    loop
    14      cntr_var := cntr_var + 1 ;
    15      Dbms_output.put_line(OUT_SIGN_TAB(incr).ref_no||','||OUT_SIGN_TAB(incr).ciref_no||','||OUT_SIGN_TAB(incr).ac_no||','||OUT_SIGN
    TAB(incr).txntype||','||OUT_SIGN_TAB(incr).objid);
    16    end loop;
    17  end;
    18  /
    The error is
    The error is
    The cntr is 0
    PL/SQL-procedure is geslaagd.Regards,
    Rob.

  • Unable to capture SQL Server Schema

    I am trying to capture SQL Server 2005 demo schema (AdventureWorks). It does shows the numbers of Tables/Indexes captured..but finishes with this error..
    Error ocurred during capture: Exhausted Resultset
    Column not found. Skipping index detail on index 'IX_StoreContact_ContactTypeID'
    Column not found. Skipping index detail on index 'IX_StoreContact_ContactID'
    Column not found. Skipping index detail on index 'AK_StoreContact_rowguid'
    Column not found. Skipping index detail on index 'IX_ProductVendor_VendorID'
    Column not found. Skipping index detail on index 'IX_ProductVendor_UnitMeasureCode'
    Column not found. Skipping index detail on index 'IX_Address_StateProvinceID'
    Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
    Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
    Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
    Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
    Column not found. Skipping index detail on index 'IX_Address_AddressLine1_AddressLine2_City_StateProvinceID_PostalCode'
    Column not found. Skipping index detail on index 'AK_Address_rowguid'
    Column not found. Skipping index detail on index 'AK_Department_Name'
    Any help is appreciated..
    Ajay

    Hi Nandu,
    As your description, you come across an error(vsjitdebugger.exe cannot be found). Please confirm if the error occurs during the installation of SQL Server 2012.  If so, please help post SQL Server setup logs. By default, SQL Server setup log file locates
    in C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log.
    Base on my research, this error could be caused by that the previous uninstallation is improper and vsjitdebugger.exe file could be mistakenly deleted.
    To troubleshoot the issue, you could start your computer into Safe Mode and fix your problem with one of the following methods. For more information, please refer to the article:
    http://www.fixerrorkit.com/fix-error/fix-vsjitdebugger.exe-error.html.
    1. You could execute the sfc /scannow command following steps below.
    a. Press "Windows+R", type in cmd and then right click "Run as administrator"
    b. Type in sfc /scannow (There's a space between sfc and /scannow) into the dialog and hit Enter key and click ok.
    c. Wait until the System File Checker finishes the check.
    2. You could use a Windows repair installation, also known as a Startup Repair to repair your Windows system files.
    3. You could install the latest Windows updates to fix vsjitdebugger.exe error. Microsoft often releases new service packs and system patches to replace or update some DLL files of Windows system.
    4. You could use third-party tool such as Automatic Error Fix Tool to fix your vsjitdebugger.exe error. However, Microsoft cannot make any representations regarding the quality, safety, or suitability of any third-party software or information found there.
    In addition, if you are unable to install  Visual Studio, I suggest you post your question in Visual Studio Setup and Installation forum at
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vssetup  . It is appropriate and more experts will assist you.
    Regards,
    Michelle Li

  • NoClassDefFoundError: com/sap/sql/log/OpenSQLException

    I have developed a Java project. It consists of 2 SQLJ files and then a Java class. When I try to execute the Java program, I get a Java error:
    java.lang.NoClassDefFoundError: com/sap/sql/log/OpenSQLException
         at com.mbb.crrs.business.report.dao.ReportDAO.<init>(ReportDAO.sqlj:23)
         at com.mbb.crrs.business.report.dao.Test.main(Test.java:24)
    Exception in thread "main"
    I notice a similar problem on message: Re: Which jar to include com.sap.sql.log.OpenSQLException
    Is that something that I need to maintain for it to work? Thank you.

    Hi,
    the problem one year ago was that the SQLException class was not available through remote access. I don't know if that might have been changed meanwhile in the latest release.
    I implemented a simple work around: I caught every SQL-exception in the method where it was thrown, wrapped the exception message and any nested exception in a self written exception and threw this new exception. That worked fine.
    Regards, Astrid

  • AND / OR  truth table in SQL

    why null is introduced in the AND and OR truth table?when will a statement/part of a statement return a null value??
    |AND               |True          |False             |NULL??        |
    |True               |True          |False             |Null             |
    |False              |False          |False             |False           |
    |Null                |Null             |Null               |Null             |is it introduced in AND/OR truth table for the null containing row(s)??
    select employee_id,last_name,job_id,salary
    from employees
    wheere salary >= 1000
    And job_id like '%man%';
    how the statement after the where cluz can return null value??Edited by: sayantan chakraborty on Aug 14, 2009 11:36 AM

    sayantan chakraborty wrote:
    how either of X and Y will return a null value?can you put any example?is there any syntax/ command which will print the return value of a statement as null?Say you had a table with columns X and Y. As long as NOT NULL constraints WERE NOT defined these values could contain NULLs. Then if you apply the WHERE condition of X = Y you would have the case of NULL = NULL which results in UNKNOWN.
    Simple Example:
    SQL > WITH test_data AS
      2  (
      3          SELECT 1 AS X, 1 AS Y FROM DUAL UNION ALL
      4          SELECT 2 AS X, 2 AS Y FROM DUAL UNION ALL
      5          SELECT 3 AS X, 5 AS Y FROM DUAL UNION ALL
      6          SELECT 4 AS X, 6 AS Y FROM DUAL UNION ALL
      7          SELECT 1 AS X, NULL AS Y FROM DUAL
      8  )
      9  SELECT  *
    10  FROM    test_data
    11  WHERE   X = Y
    12  /
             X          Y
             1          1
             2          2

  • If statement in sql

    regarding the following sql:
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id(+)
    AND c.statetypeid = d.statetypeid(+)
    AND c.addresstypeid in (1,2,3,4)
    I have a database of users and addresses. Each user can
    have multiple addresses and the addresses are
    designated by addresstypeid. In plain english, what I want
    to pull is "If they have an addresstypeid of 1, pull that one
    only, if not, check if they have a 2 and use that, if not, check
    for a 3, etc..".
    Any help with this?

    What you want, then, is to pull the address with the minimum addresstypeid ..
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id(+)
    AND c.statetypeid = d.statetypeid(+)
    AND c.addresstypeid =
    (select min(c2.addresstypeid)
    from address c2
    where c2.userid=a.userid
    I'm not sure what this will do to your outerjoin, though. You might have to get funky with a union ...
    SELECT a.lname, a.fname, a.user_id, c.address, c.city,
    c.zip, c.addresstypeid, d.descriptor as state
    FROM users a, address c, maintstatetype d
    WHERE a.user_id = c.user_id
    AND c.statetypeid = d.statetypeid
    AND c.addresstypeid =
    (select min(c2.addresstypeid)
    from address c2
    where c2.userid=a.userid
    Union all
    SELECT a.lname, a.fname, a.user_id, to_char(null), to_char(null),
    to_char(null), to_char(null), to_char(null)
    FROM users a
    WHERE not exists
    (select 1
    from address c
    where c.userid=a.userid
    )

  • If statement in reqular sql statement

    Hi everyone;
    I am trying to alter some trigger if I am in a certain environment. here what I am trying to do in pseudo-code
    if ((select dbenv from environments) = 'DEV') THEN
    ALTER TRIGGER XXX disable;
    end if;
    this sql script will be run from sqlplus' comand line
    reminder I don't want to do that from package or a procedure

    this to just explain
    i think select in the IF is not allowed that way please see the examples below
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2  vename VARCHAR2(10);
      3  BEGIN
      4   SELECT ename INTO vename FROM EMP WHERE ename='BLAKE';
      5   IF vename='BLAKE' THEN
      6    DBMS_OUTPUT.PUT_LINE('data found');
      7   ELSE
      8     DBMS_OUTPUT.PUT_LINE('no data found');
      9   END IF;
    10* END;
    11  /
    data found
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2  vename VARCHAR2(10);
      3  BEGIN
      4   --SELECT ename INTO vename FROM EMP WHERE ename='SMITH';
      5   IF ((SELECT ename FROM EMP WHERE ename ='SMITH')='BLAKE') THEN
      6    DBMS_OUTPUT.PUT_LINE('data found');
      7   ELSE
      8     DBMS_OUTPUT.PUT_LINE('no data found');
      9   END IF;
    10* END;
    SQL> /
    IF ((SELECT ename  FROM EMP WHERE ename ='SMITH')='BLAKE') THEN
    ERROR at line 5:
    ORA-06550: line 5, column 7:
    PLS-00103: Encountered the symbol "SELECT" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    ORA-06550: line 5, column 50:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    . ( * @ % & - + ; / at for mod rem <an exponent (**)> and or
    group having intersect minus order start union where connect
    ||
    but this is allowed
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2  vename VARCHAR2(10);
      3  BEGIN
      4   --SELECT ename INTO vename FROM EMP WHERE ename='SMITH';
      5   IF 'BLAKE'='BLAKE' THEN
      6     SELECT ename INTO vename FROM EMP WHERE ename='SMITH';
    7    DBMS_OUTPUT.PUT_LINE(vename);
      8   ELSE
      9     DBMS_OUTPUT.PUT_LINE('no data found');
    10   END IF;
    11* END;
    SQL> /
    SMITH
    PL/SQL procedure successfully completed.formated
    Message was edited by:
    devmiral

  • IF statement in SQL*Plus - how to do it

    Hi,
    In SQL*Plus script, I would like to keep conditional checking (IF statement) and proceed. For example, whatever is done in PL/SQL block below, want to do the same in SQL*Plus script, I know partly it can be done using VARIABLE keyword, conditional checking can be done using DECODE in SELECT statement, but I want to carry out a more complex requirement, hence I want to use IF statement somehow in SQL*Plus.
    Another question, how to do spooling in PL/SQL script, it can be done using UTL_FILE, any other option is there to achieve this.
    declare
    v_ind_count int;
    begin
    select count(1) into v_ind_count from user_indexes where index_name = 'index_object_name';
    IF v_ind_count > 0
    THEN
    dbms_output.put_line('index found');
    ELSE
    dbms_output.put_line('index does not exist');
    END IF;
    end;
    /

    Hello,
    SQL*PLUS has no scripting language. It can only execute SQL and PL/SQL scripts. There are some commands like SPOOL or SET but no commands for conditional statements. You should describe your requirements, maybe we can find a way.
    Or you can search the forum, maybe your question has already been answered
    [Google for SQL*PLUS + condition|https://www.google.de/search?q=site%3Aforums.oracle.com+"SQL*PLUS"+condition]
    # {message:id=4189517}
    # {message:id=4105290}
    how to do spooling in PL/SQL scriptFrom within PL/SQL you can use dbms_output, the spool has to be started by the calling SQL script when it is executed in SQL*PLUS. Or you can use utl_file, but then you can only write to a server directory, not into a client file. To give an advice we need more information about what you want to do.
    Regards
    Marcus

  • Partner Application written in other language than PL/SQL and Java

    I have an application written in another language than PL/SQL or Java. I want to integrate this application as an Partner apps where I use the same user repository as Portal.
    Can I integrate the application by calling a stored PL/SQL-procedure based on the PLSQL SSO APIs examples that authenticates the user based on the username/password in portal and redirects the user to the application ?
    Are there any examples / references where this has been done ?
    Jens

    Check out the PDK referance for URL-Services, which allow you to integrate with any web based service/content.
    http://portalstudio.oracle.com/servlet/page?_pageid=350&_dad=ops&_schema=OPSTUDIO

  • NULL and dynamic SQL

    If table testrh2 has the following columns and data
    col1 --> NULL
    col2 --> 2
    and table testrh has the following columsn and data
    col1 --> NULL
    How could I write a dynamic SQL statement to join on the nulls? I've written the following block as a starting point.
    declare
    cursor c1 is select col1 from isis.testrh;
    lval varchar2(1000);
    lval2 varchar2(1000);
    begin
    for r1 in c1 loop
    lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
    execute immediate lval into lval2;
    dbms_output.put_line(lval2);
    end loop;
    end;

    You can't compare null values with '=' in Oracle SQL.
    Null can only be compared with <column> is null .
    You can see it when you try these two queries:
    select * from dual where null is null;  -- you will see one row
    select * from dual where null=null;  -- you will see no rowsThat's why you have to write something like
    (<column1>=<column1>   or   (<column1> is null and <column2> is null))This should also work with null:
    decode(<column1>,<column2>,1,0)=1By the way, why do you use dynamic sql?
    lval := 'select col2 from isis.testrh2 where col1 = '||r1.col1;
    I think you could replace your two lines ( lval:= ... AND execute immediate) by this:
    begin
      select col2
      into lval
      from isis.testrh2
      where decode(col1,r1.col1,1,0)=1;
      dbms_output.put_line('lval='||lval);
    exception
    when no_data_found then
      dbms_output.put_line('no data found'); -- or whatever you want
    end;Edited by: hartmutm on 02.10.2010 23:54

  • How do I connect to SQL Server with Muse?

    I want to query items from database and load it back to front end. Is there a way Muse can connect to sql server database?

    You cannot connect to databases via Muse at the moment. Please refer: http://forums.adobe.com/message/5090145#5090145
    Cheers,
    Vikas

  • Problem with item and/or data during page-processing-PS/SQL

    Greetings!
    On my page I have a custom report (from 2 tables) and a small form-field, that adds and edits data in the report. After generating the form with the wizard I added an extra item, to store the id from one of the tables from the report data.
    Now, on submit a calculation should take place, that updates data according user input with a procedure in Page-Prosseses:
    declare a number;
    begin
    case :PLATZ
    when 1 then a:=100;
    when 2 then a:= 50;
    else a:=25;
    end case;
    update TBL_MITGLIEDER set TURNIERPUNKTE = TURNIERPUNKTE + a
    where ID_MITGL = :P14_ID_MITGL;
    end;
    :PLATZ is user selected (1,2,3), :P14_ID_MITGL stores the reference to TBL_MITGLIEDER (and shows the change, when I select another record)
    As I understand, that process should also run, when I submit a chance, but nothing happens then.
    But when I try to save a new record (which worked without any problems before adding that process), I get this error message:
    ORA-06550: line 1, column 64: PL/SQL: ORA-00957: duplicate column name ORA-06550: line 1, column 7: PL/SQL: SQL Statement ignored
         Error      Unable to process row of table TBL_TURNIERSIEGER.
    Then, when I go back into the app-builder and try to run the page again, I get this message:
    ORA-01403: no data found
         Error      Unable to fetch row.
    I am not sure, if you guys have all the information you need, to know whats going on. Maybe this has to do with session-id and the whay, items are updated. I hope you can help me.
    Thanks, best regards,
    tobi

    First can you please post all log file errors
    >> I can't really give you a solution or specific recommendation since I did not saw this error yet myself, but on your own risk you can try:
    1. You may try to just register 'dts.dll' using regsvr32.exe, but this error may indicate a bigger problem with setup.
    If you are running SQL Server 64bit then try running this at the command prompt: %windir%\syswow64\regsvr32 "%ProgramFiles(x86)%\Microsoft SQL Server\90\dts\binn\dts.dll"
    2. You can try reinstall from start (In this case you have to make sure that you un-install all)
    [Personal Site] [Blog] [Facebook]

  • I am trying to have access tables of the Sql Server through the Oracle

    I am trying to have access tables of the Sql Server through the Oracle and this being occurred the error:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Generic Connectivity using ODBC][H006] The init parameter <HS_FDS_CONNECT_INFO> is not set.
    Please set it in init <orasid>.ora file.
    ORA-02063: preceding 2 lines from HSMSQL
    I created the ODBC with name HSMSQL.
    I made all the configurations in the archives
    tnsnames.ora:
    HSMSQL=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL = tcp)(HOST = wsus)(PORT = 1521))
    (CONNECT_DATA =
    (SID = HSMSQL)
    (HS = OK)
    listener.ora:
    (SID_DESC = (SID_NAME=HSMSQL)
    (ORACLE_HOME= C:\oracle\ora92)
    (PROGRAM =hsodbc)
    initHS_SID.ora:
    HS_FDS_CONNECT_INFO = HSMSQL
    HS_FDS_TRACE_LEVEL = OFF
    -- Create database link
    create database link HSMSQL.US.ORACLE.COM
    connect to TESTE identified by TESTE2
    using 'HSMSQL';
    But when I execute query the error occurs:
    Select * from TabTeste@HSMSQL
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message: [Generic Connectivity using ODBC][H006] The init parameter <HS_FDS_CONNECT_INFO> is not set.
    Please set it in init <orasid>.ora file.
    ORA-02063: preceding 2 lines from HSMSQL
    Please they help me, thanks, Paulo.

    Hi,
    It seems that your configuration is Ok. By the way, the workaround for this error is:
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Transparent gateway for ODBC][H001] The environment variable <HS_FDS_CONNECT_INFO> is not set.
    * Set HS_FDS_CONNECT_INFO in the hs{sid}init.ora file to the data source name.
    Example: HS_FDS_CONNECT_INFO = <ODBC DataSource Name>
    * Make sure the hs{sid}init.ora file exists in the ORACLE_HOME/hs/admin directory and has the same name as the SID in the LISTENER.ORA.
    Example: If SID=hsodbc in the listener.ora file, then the hs{sid}init.ora file would be named ORACLE_HOME/hs/admin/inithsodbc.ora
    For more information see if this [url http://forums.oracle.com/forums/thread.jspa?forumID=61&threadID=576975]thread can help you.
    Cheers

  • Report performance - PL/SQL vs SQL type

    Hello,
    Is it possible that report built as PL/SQL function returning SQL query is slower (much more) than common SQL report?
    I’ve got a view, that I read data from. When I use SQL query report with variables in :PX_NAME format, it takes about 5 seconds to show the page. If I use PL/SQL report with variables in v('PX_NAME') format inside query string like:
    'SELECT * FROM myview where myname like v(''P5_NAME'')';it takes about 3 minutes to get the same data.
    Do you have any idea why?
    Regards,
    Przemek

    It's hard to tell without knowing how many rows we are talking about, the CPU load, and so on, but in a heavily loaded system i can easily imagine that a query containing a call to V function might cause a not optimized access path, whereas the same query with a bind variable might work much better.
    Said that, the rule of thumb is to use bind variables every time you can and avoid V as much as you can.
    If you can do the same thing with :PX_NAME, use that, there is no justification for using V('PX_NAME').
    Flavio
    http://oraclequirks.blogspot.com

Maybe you are looking for

  • How to delete duplicate pictures in iPhoto

    I have many duplicate pictures in iPhoto. Is there an easy way to identify and delete duplicates?

  • I bought a iPhone from a person. it was for AT

    I need help. I put in a  TMobile card. Than, it send me a message saying "SIM NOT VALID" the Sim card that you currently have installed in this iPhone is from a carrier that is not supported under the activation policy that is currently assigned by t

  • Precompile web application in cluster

    We are running 6.0 sp2 and are trying to determine how to have a web           application precompile when deployed to a cluster.           We have seen messages that there is an issue with 6.0 where you can only           precompile if the web appli

  • Photoshop Touch seems corrupted on ICS Motorola XYBOARD 8.2: Bad Screen Flicker

    Hi Adobe, I've checked all the other Adobe apps after receiving a new tablet after a theft and reinstalling all my apps. Photoshop Touch, updated in Sept. 2012, which I've uninstalled and reinstalled again, acts very strange; as soon as you try and l

  • The speed of the latest Firefox version is NOT awesome - it's crap

    Firefox keeps crashing with the message "Well, this is embarrassing" coming up all the time. Also, the speed is far from "Awesome" as you claim - it is in fact so slow I have started to go back to IE or Safari.