How to tune the update query?

HI Expert,
Our client is facing a performance problem.
Every alternate day they use to run a load on the database.
Database is RAC and when they execute a load database used to get hang.
Everytime we have to regather a stats, after that the update statement execute.
They are also saying that the query is taking time to execute.
previously it used to execute fast.
It would be great if you expert help to find out the bottleneck and solutions.
this stats i generated before creating the indexes on PRIM_IND column
SQL> Update /*+ index(IND) */ ENT_HUB.ADDR set PRIM_IND=0 where PRIM_IND=1 and SCD_ACTV_IND=1;
1477866 rows updated.
Execution Plan
Plan hash value: 2784578406
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | UPDATE STATEMENT | | 1321K| 7743K| 25185 (1)| 00:05:03 |
| 1 | UPDATE | ADDR | | | | |
|* 2 | TABLE ACCESS FULL| ADDR | 1321K| 7743K| 25185 (1)| 00:05:03 |
Predicate Information (identified by operation id):
2 - filter("PRIM_IND"=1 AND "SCD_ACTV_IND"=1)
below stats i generated after creating the index.
SQL> Update /*+ index(addr IND) */ ENT_HUB.ADDR set PRIM_IND=0 where PRIM_IND=1 and SCD_ACTV_IND=1;
1478212 rows updated.
Execution Plan
Plan hash value: 736707583
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | UPDATE STATEMENT | | 622K| 2432K| 102K (1)| 00:20:33 |
| 1 | UPDATE | ADDR | | | | |
|* 2 | TABLE ACCESS BY INDEX ROWID| ADDR | 622K| 2432K| 102K (1)| 00:20:33 |
|* 3 | INDEX RANGE SCAN | IND | 1245K| | 2382 (1)| 00:00:29 |
Predicate Information (identified by operation id):
2 - filter("SCD_ACTV_IND"=1)
3 - access("PRIM_IND"=1)
Thanks,

user646034 wrote:
Hi,
Currently we are using without index.
however we are not getting performance improvement.
Please suggest us what can we do to achieve the performance again.
ThanksDon't update that many rows?
Not sure what else we can offer you for assistance, it's possible you could change the process flow of your application to not need to update the rows (possibly decode values upon the insert) or change the data model, etc....
But that's all outside the scope of possibility based on the information you've provided.
You're doing a LOT (relative to the number of rows in the table) of updating, that takes time and is bound by the laws of physics, we can't alter those here.

Similar Messages

  • How to tune the Update statement for 20 million rows

    Hi,
    I want to update 20 million rows of a table. I wrote the PL/SQL code like this:
    DECLARE
    v1
    v2
    cursor C1 is
    select ....
    BEGIN
    Open C1;
    loop
    fetch C1 bulk collect into v1,v2 LIMIT 1000
    exit when C1%NOTFOUND;
    forall i in v1.first..v1.last
    update /*+INDEX(tab indx)*/....
    end loop;
    commit;
    close C1;
    END;
    The above code took 24 mins to update 100k records, so for around 20 million records it will take 4800 mins (80 hrs).
    How can I tune the code further ? Will a simple Update statement, instead of PL/SQL make the update faster ?
    Will adding few more hints help ?
    Thanks for your suggestions.
    Regards,
    Yogini Joshi

    Hello
    You have implemented this update in the slowest possible way. Cursor FOR loops should be absolute last resort. If you post the SQL in your cursor there is a very good chance we can re-code it to be a single update statement with a subquery which will be the fastest possible way to run this. Please remember to use the {noformat}{noformat} tags before and after your code so the formatting is preserved.
    David                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • How to tune the below query?is taking 1min 15 sec to process 16,34,300 reco

    SELECT
    user_id,
    ispeak,
    round(sum(DURATION_seconds*convert_duration(pulseunit,ratingunit))/decode(ispeak,0,max(offpeakpulse),max(peakpulse))),
    round(sum(download_bytes*convert_bytes(pulseunit,ratingunit))/decode(ispeak,0,max(offpeakpulse),max(peakpulse))),
    round(sum(upload_bytes*convert_bytes(pulseunit,ratingunit))/decode(ispeak,0,max(offpeakpulse),max(peakpulse))),
    max(packageid),
    max(peakrate),
    max(offpeakrate),
    max(bstplantype),
    max(freevalue),
    max(peakpulse),
    max(offpeakpulse),
    max(pulseunit),
    max(ratingunit)
    FROM aaa_sessions a,subscriber_rate_tab srt
    where
    a.user_id=srt.externalid
    group by user_id,packageid,ispeak
    having
    trunc(min(start_time_utc)) between min(srt.activedt) and min(srt.inactivedt)
    and
    trunc(max(end_time_utc)) between min(srt.activedt) and min(srt.inactivedt);

    Do you have multiprocessor CPU .
    if the value is greater then 3 then you can try with parallel processing
    select value from v$parameter where name ='cpu_count' ;Try this :-
    ALTER SESSION ENABLE PARALLEL QUERY
    SELECT /*+ parallel (a) */
    user_id,
    ispeak,
    round(sum(DURATION_seconds*convert_duration(pulseunit,ratingunit))/decode(ispeak,0,max(offpeakpulse),max(peakpulse))),
    max(ratingunit),
    round(sum(download_bytes*convert_bytes(pulseunit,ratingunit))/decode(ispeak,0,max(offpeakpulse),max(peakpulse))),
    max(ratingunit),
    round(sum(upload_bytes*convert_bytes(pulseunit,ratingunit))/decode(ispeak,0,max(offpeakpulse),max(peakpulse))),
    max(packageid),
    max(peakrate),
    max(offpeakrate),
    max(bstplantype),
    max(freevalue),
    max(peakpulse),
    max(offpeakpulse),
    max(pulseunit),
    max(ratingunit),
    min(start_time_utc) ,
    max(end_time_utc),
    min(srt.activedt),
    min(srt.inactivedt)
    FROM aaa_sessions a,subscriber_rate_tab srt
    where
    a.user_id=srt.externalid(+)
    group by user_id,packageid,ispeak
    having
    trunc(min(start_time_utc)) between min(srt.activedt) and min(srt.inactivedt)
    and
    trunc(max(end_time_utc)) between min(srt.activedt) and min(srt.inactivedt)Cheers
    Nawneet
    Edited by: Nawneet_Aswal on Aug 2, 2010 4:48 AM

  • How to tune the query...?

    Hi all,
    I am having a table with millions of records and the query is taking hours
    time. How to tune the query apart from doing the following things.
    1. Creating or Deleting indexes.
    2. Using Bind variables.
    3. Using Hints.
    4. Updating the Statitics regurarly.
    Actually, i have asked this question in interview how to tune the query.
    I told him the above 4 things. Then he told, these are not working, then
    how you will tune this query.
    Thanks in advance,
    Pal

    user546710 wrote:
    Actually, i have asked this question in interview how to tune the query.
    I told him the above 4 things. Then he told, these are not working, then
    how you will tune this query.It actually depends on the scenario/problem given.
    You may want to read this first.
    When your query takes too long ...
    When your query takes too long ...
    HOW TO: Post a SQL statement tuning request - template posting
    HOW TO: Post a SQL statement tuning request - template posting

  • How to tune the follwoing procedure?

    create or replace procedure sample(verror_msg in out varchar2,
    vbrn_num in tb_branches.brn_num%type) is
    ltext1 varchar2(500);
    ltext2 varchar2(500);
    ltable_name varchar2(50);
    lcolumn_name varchar2(50);
    ldata_type varchar2(50);
    lold_rcn_num number;
    lnew_rcn_num number;
    lvalue varchar2(50);
    lunit_type char(1);
    lsql_stmt1 varchar2(500);
    lstring varchar2(500);
    lcol varchar2(10);
    lstart_time VARCHAR2(100);
    lend_time VARCHAR2(100);
    lcommit VARCHAR2(10) := 'COMMIT;';
    lfile_handle1 utl_file.file_type;
    lfile_handle2 utl_file.file_type;
    lfile_handle3 utl_file.file_type;
    lfile_handle4 utl_file.file_type;
    lfile_name1 VARCHAR2(50) := 'RCN_UPDATE_STMTS_' || vbrn_num || '.SQL';
    lfile_name2 VARCHAR2(50) := 'RCNSUCCESS_' || vbrn_num || '.TXT';
    lfile_name3 VARCHAR2(50) := 'RCNFAIL_' || vbrn_num || '.TXT';
    lfile_name4 VARCHAR2(50) := 'RCNERROR_' || vbrn_num || '.TXT';
    ldirectory_name VARCHAR2(100);
    ldirectory_path VARCHAR2(100);
    lspool_on VARCHAR2(100);
    lspool_off VARCHAR2(100);
    TYPE ref_cur IS REF CURSOR;
    cur_tab_cols ref_cur;
    cursor c1 is
    SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE
    FROM USER_TAB_COLS
    WHERE TABLE_NAME NOT LIKE 'TB_CONV%'
    and TABLE_NAME LIKE 'TB_%'
    AND COLUMN_NAME LIKE '%RCN%'
    UNION
    SELECT TABLE_NAME, COLUMN_NAME, DATA_TYPE
    FROM USER_TAB_COLS
    WHERE TABLE_NAME in ('TB_UNITCODES', 'TB_HIST_UNITCODES')
    AND COLUMN_NAME = 'UNIT_CODE'
    order by table_name;
    BEGIN
    verror_msg := nvl(verror_msg, 0);
    begin
    SELECT DISTINCT directory_path, directory_name
    INTO ldirectory_path, ldirectory_name
    FROM tb_conv_path
    WHERE brn_num = vbrn_num;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    SP_CO_RAISEERROR('00SY00402', 'F', 'T');
    WHEN others THEN
    SP_CO_RAISEERROR('00SY00401X', 'F', 'T');
    END;
    lfile_handle1 := utl_file.fopen(ldirectory_name, lfile_name1, 'W', 32767);
    lfile_handle2 := utl_file.fopen(ldirectory_name, lfile_name2, 'W', 32767);
    lfile_handle3 := utl_file.fopen(ldirectory_name, lfile_name3, 'W', 32767);
    lfile_handle4 := utl_file.fopen(ldirectory_name, lfile_name4, 'W', 32767);
    SELECT 'SPOOL ' || ldirectory_path || '/LOG_' || lfile_name1
    INTO lspool_on
    FROM dual;
    utl_file.put_line(lfile_handle1, lspool_on);
    utl_file.new_line(lfile_handle1, 1);
    select 'EXEC SP_CONV_START_TIMELOG(' || '''' || 'LOG_' || lfile_name1 || '''' || ',' ||
    vbrn_num || ');'
    into lstart_time
    from dual;
    UTL_FILE.PUT_LINE(lfile_handle1, lstart_time);
    UTL_FILE.NEW_LINE(lfile_handle1, 1);
    open C1;
    loop
    Fetch C1
    into ltable_name, lcolumn_name, ldata_type;
    Exit When C1%notFound;
    lsql_stmt1 := 'select column_name from user_tab_columns where table_name =' || '''' ||
    ltable_name || '''' ||
    ' AND column_name in (''BRN_NUM'',''BRANCH'',''BRANCH_NUMBER'')';
    begin
    execute immediate lsql_stmt1
    into lcol;
    exception
    when no_data_found then
    lcol := null;
    end;
    if lcol is not null then
    if ltable_name in ('TB_UNITCODES', 'TB_HIST_UNITCODES') then
    ltext2 := 'select distinct ' || lcolumn_name || ' from ' ||
    ltable_name ||
    ' a, (select distinct new_rcn_num col from tb_conv_rcn_mapping where brn_num = ' ||
    vbrn_num || ') b where a.' || lcolumn_name ||
    ' = b.col(+) and b.col is null and a.' || lcolumn_name ||
    ' is not null and ' || lcol || ' = ' || vbrn_num ||
    ' and a.unit_type=''9''';
    else
    ltext2 := 'select distinct ' || lcolumn_name || ' from ' ||
    ltable_name ||
    ' a, (select distinct new_rcn_num col from tb_conv_rcn_mapping where brn_num = ' ||
    vbrn_num || ') b where a.' || lcolumn_name ||
    ' = b.col(+) and b.col is null and a.' || lcolumn_name ||
    ' is not null and ' || lcol || ' = ' || vbrn_num;
    end if;
    OPEN cur_tab_cols FOR ltext2;
    loop
    fetch cur_tab_cols
    into lvalue;
    exit when cur_tab_cols%notfound;
    begin
    IF VBRN_NUM IN (21, 6, 7, 8) THEN  Commented during NAP HK SIT cycle1
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND BRN_NUM = VBRN_NUM;
    /* ELSE
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND NEW_RCN_NUM NOT LIKE '40%'
    AND NEW_RCN_NUM NOT LIKE '41%'
    AND NEW_RCN_NUM NOT LIKE '42%'
    AND NEW_RCN_NUM NOT LIKE '65%'
    AND BRN_NUM = VBRN_NUM;
    END IF; */ -- Commented during NAP HK SIT cycle1
    if ldata_type = 'NUMBER' then
    if ltable_name in ('TB_UNITCODES', 'TB_HIST_UNITCODES') and
    lcolumn_name = 'UNIT_CODE' then
    begin
    select distinct unit_type
    into lunit_type
    from TB_UNITCODES
    where lcol = vbrn_num
    and unit_code = lvalue
    and unit_type = '9';
    exception
    when no_data_found then
    lunit_type := null;
    end;
    if lunit_type is not null then
    ltext1 := 'update ' || ltable_name || ' set ' ||
    lcolumn_name || ' = ' || lnew_rcn_num ||
    ' where ' || lcolumn_name || ' = ' ||
    lold_rcn_num || ' and ' || lcol || ' = ' ||
    vbrn_num || ' and unit_type = ' || '''9''' || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    else
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || lnew_rcn_num || ' where ' || lcolumn_name ||
    ' = ' || lold_rcn_num || ' and ' || lcol || ' = ' ||
    vbrn_num || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    else
    if ltable_name in ('TB_UNITCODES', 'TB_HIST_UNITCODES') and
    lcolumn_name = 'UNIT_CODE' then
    begin
    lstring := 'select distinct unit_type from ' || ltable_name ||
    ' where ' || lcol || ' = ' || vbrn_num ||
    ' and ' || lcolumn_name || ' = ' || '''' ||
    lvalue || '''' || ' and unit_type = ' || '''9''';
    execute immediate lstring
    into lunit_type;
    exception
    when no_data_found then
    lunit_type := null;
    end;
    if lunit_type is not null then
    ltext1 := 'update ' || ltable_name || ' set ' ||
    lcolumn_name || ' = ' || '''' || lnew_rcn_num || '''' ||
    ' where ' || lcolumn_name || ' = ' || '''' ||
    lold_rcn_num || '''' || ' and ' || lcol || ' = ' ||
    vbrn_num || ' and unit_type = ' || '''9''' || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    else
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || '''' || lnew_rcn_num || '''' || ' where ' ||
    lcolumn_name || ' = ' || '''' || lold_rcn_num || '''' ||
    ' and ' || lcol || ' = ' || vbrn_num || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name ||
    ' - ' || lold_rcn_num || ' - ' ||
    lnew_rcn_num || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    end if;
    exception
    When NO_DATA_FOUND THEN
    utl_file.put_line(lfile_handle3,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || 'NO MAPPING FOUND' ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle3, 0);
    when others then
    utl_file.put_line(lfile_handle4,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || SQLERRM || ' - ' ||
    vbrn_num);
    utl_file.new_line(lfile_handle4, 0);
    end;
    end loop;
    ELSE
    ltext2 := 'select distinct ' || lcolumn_name || ' from ' ||
    ltable_name ||
    ' a, (select distinct new_rcn_num col from tb_conv_rcn_mapping where brn_num = ' ||
    vbrn_num || ') b where a.' || lcolumn_name ||
    ' = b.col(+) and b.col is null and a.' || lcolumn_name ||
    ' is not null';
    OPEN cur_tab_cols FOR ltext2;
    loop
    fetch cur_tab_cols
    into lvalue;
    exit when cur_tab_cols%notfound;
    begin
    IF VBRN_NUM IN (21, 6, 7, 8) THEN  Commented during NAP HK SIT cycle1
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND BRN_NUM = VBRN_NUM;
    /* ELSE
    SELECT DISTINCT NEW_RCN_NUM, OLD_RCN_NUM
    INTO LNEW_RCN_NUM, LOLD_RCN_NUM
    FROM TB_CONV_RCN_MAPPING
    WHERE OLD_RCN_NUM = LVALUE
    AND NEW_RCN_NUM NOT LIKE '40%'
    AND NEW_RCN_NUM NOT LIKE '41%'
    AND NEW_RCN_NUM NOT LIKE '42%'
    AND NEW_RCN_NUM NOT LIKE '65%'
    AND BRN_NUM = VBRN_NUM;
    END IF; */ -- Commented during NAP HK SIT cycle1
    if ldata_type = 'NUMBER' then
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || lnew_rcn_num || ' where ' || lcolumn_name ||
    ' = ' || lold_rcn_num || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lold_rcn_num || ' - ' || lnew_rcn_num ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    else
    ltext1 := 'update ' || ltable_name || ' set ' || lcolumn_name ||
    ' = ' || '''' || lnew_rcn_num || '''' || ' where ' ||
    lcolumn_name || ' = ' || '''' || lold_rcn_num || '''' || ';';
    utl_file.put_line(lfile_handle1, ltext1);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle1, lcommit);
    utl_file.new_line(lfile_handle1, 0);
    utl_file.put_line(lfile_handle2,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lold_rcn_num || ' - ' || lnew_rcn_num ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle2, 0);
    end if;
    exception
    When NO_DATA_FOUND THEN
    utl_file.put_line(lfile_handle3,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || 'NO MAPPING FOUND' ||
    ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle3, 0);
    when others then
    utl_file.put_line(lfile_handle4,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || SQLERRM || ' - ' ||
    vbrn_num);
    utl_file.new_line(lfile_handle4, 0);
    end;
    end loop;
    end if;
    end loop;
    close c1;
    utl_file.new_line(lfile_handle1, 1);
    select 'EXEC SP_CONV_END_TIMELOG(' || '''' || 'LOG_' || lfile_name1 || '''' || ',' ||
    vbrn_num || ');'
    into lend_time
    from dual;
    UTL_FILE.PUT_LINE(lfile_handle1, lend_time);
    UTL_FILE.NEW_LINE(lfile_handle1, 1);
    SELECT 'SPOOL OFF;' INTO lspool_off FROM dual;
    utl_file.put_line(lfile_handle1, lspool_off);
    utl_file.new_line(lfile_handle1, 1);
    utl_file.fclose(lfile_handle1);
    utl_file.fclose(lfile_handle2);
    utl_file.fclose(lfile_handle3);
    utl_file.fclose(lfile_handle4);
    exception
    when others then
    verror_msg := sqlcode || ' ~ ' || sqlerrm;
    utl_file.put_line(lfile_handle4,
    ltable_name || ' - ' || lcolumn_name || ' - ' ||
    lvalue || ' - ' || SQLERRM || ' - ' || vbrn_num);
    utl_file.new_line(lfile_handle4, 0);
    utl_file.new_line(lfile_handle4, 0);
    utl_file.fclose(lfile_handle1);
    utl_file.fclose(lfile_handle2);
    utl_file.fclose(lfile_handle3);
    utl_file.fclose(lfile_handle4);
    end sample;

    duplicate:
    how to tune the follwoing procedure?

  • How to view the sql query?

    hi,
      how to view the sql query formed from the xml structure in the receiver jdbc?

    You can view SAP Note at
    http://service.sap.com/notes
    But you require SMP login ID for this which you should get from your company. The content of the notes are as follows:
    Reason and Prerequisites
    You are looking for additional parameter settings. There are two possible reasons why a feature is available via the "additional parameters" table in the "advanced mode" section of the configuration, but not as documented parameter in the configuration UI itself:
    Category 1: The parameter has been introduced for a patch or a SP upgrade where no UI upgrade and/or documentation upgrade was possible. In this case, the parameter will be moved to the UI and the documentation as soon as possible. The parameter in the "additional parameters" table will be deprecated after this move, but still be working. The parameter belongs to the supported adapter functionality and can be used in all, also productive, scenarios.
    Category 2. The parameter has been introduced for testing purposes, proof-of-concept scenarios, as workaround or as pre-released functionality. In this case, the parameter may or may not be moved to the UI and documentation, and the functionality may be changed, replaced or removed. For this parameter category there is no guaranteed support and usage in productive scenarios is not supported.
    When you want to use a parameter documented here, please be aware to which category it belongs!
    Solution
    The following list shows all available parameters of category 1 or 2. Please note:
    Parameter names are always case-sensitive! Parameter values may be case-sensitive, this is documented for each parameter.
    Parameter names and values as documented below must be used always without quotaton marks ("), if not explicitly stated otherwise.
    The default value of a parameter is always chosen that it does not change the standard functionality
    JDBC Receiver Adapter Parameters
    1. Parameter name: "logSQLStatement"
                  Parameter type: boolean
                  Parameter value: true for any string value, false only for empty string
                  Parameter value default: false (empty String)
                  Available with: SP9
                  Category: 2
                  Description:
                  When implementing a scenario with the JDBC receiver adapter, it may be helpful to see which SQL statement is generated by the JDBC adapter from the XI message content for error analysis. Before SP9, this can only be found in the trace of the JDBC adapter if trace level DEBUG is activated. With SP9, the generated SQL statement will be shown in the details page (audit protocol) of the message monitor for each message directly.
                  This should be used only during the test phase and not in productive scenarios.
    Regards,
    Prateek

  • How to transport the BW query's variable to BO  webi report

    Hi all
    I'd like to know how to transport the BW query's variable to BO 's webi . today ,I created a sap customer varible in my bw system to get the max calmonth in the active table.The varible in the BW side run's well ,but I use this query to build a new univers ,and created a new webi report base on this univers ,but the question is the webi report can't get the varible's value I wann to know how to transport the bw varible value to BO webi report
    Thanks and regards,
    Peter .zhu

    I have changed my variaable in my bw query ,I found if you use SAP default variable it is ok in BO side . So I get a guidline by SAP default variable ,I changed my customer variable in variables edite ,don't use 'ready for input' .And then the variable can be useful in BO side .
    Edited by: peter zhu on Jun 16, 2008 11:43 AM

  • How to use the updated value in the same update statement

    Hello,
    I just wonder how to use the updated new value of other column in the same udpate statement. I am using Oracle 11.2, and want to update the two columns with one update statement as following:
    create table tb_test (id number(5), tot number(5), mon_tot number(5));
    update tb_test set (tot = 15, mon_tot = tot *15) where id = 1;
    ...I would like to update both tot and mon_tot column, the value of mon_tot shall be determinted by the new value of tot.
    Thanks,
    Edited by: 939569 on 1-Feb-2013 7:00 AM

    Edit: example added
    SQL> create table tb_test
      2  ( id number(5)
      3  , tot number(5)
      4  , mon_tot number generated always as (tot*15) virtual
      5  );
    Table created.
    SQL> insert into tb_test (id, tot) values (1, 5);
    1 row created.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1          5         75
    1 row selected.
    SQL> update tb_test
      2  set    tot = 15
      3  where  id = 1;
    1 row updated.
    SQL> select * from tb_test;
            ID        TOT    MON_TOT
             1         15        225
    1 row selected.

  • How to display the updated data from db to user interface in sruts framewor

    A beginner in this area, I have been able to read a record from a
    MySQL database and populate in jsp form . Now, my goal is to
    allow the user to edit the contents of the form and then update the
    record in MySQL and then display the same in jsp. page
    The scenario in detail
    1)the data is fetched from db and displayed in non-editable format
    2)Next button is clicked
    3)Now in the same jsp page I view the same data from db in editable format
    4)The user is allowed to change the information
    5)Now update button is clicked
    6)the records are updated in the db -Finished doing till this step
    7)But the updated info in non - editable format to be displayed in jsp page is left pending.
    Here is my code for jsp,i want know how to write an action for this,tried doing the same in java and I'm successful.but what I need is how to fetch the updated information in the user interface.
    I've made both editable as well as non editable info in the same page with different actions.
    pl help me,I'm a newbie
    <%@ taglib uri="/WEB-INF/struts-bean" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic" prefix="logic" %>
    <%@ page language="java" %>
    <%@ page import="java.util.ArrayList,java.util.Iterator" %>
    <%@ page import="com.finocus.common.container.CustomerDetailsTest;" %>
    <html:html>
    <head>
         <title>CUSTOMER DISPLAY</title>
    </head>
    <body>
         <table width="100%" bgcolor="darkkhaki">
         <tr>
              <td><table width="100%" bgcolor="indigo">
                   <tr>
                        <td><font color="white">Display</font></td>
                        <td><font color="white">Update</font></td>
                        <td><font color="white">Verify</font></td>
                        <td><font color="white">Confirm</font></td>
                   </tr>
                   </table>
              </td>
         </tr>
    <%
              //Container for holding data
              ArrayList list = (ArrayList)session.getAttribute("CUSTOMERDETAILS");
              Iterator itr=list.iterator();
              while(itr.hasNext())
              CustomerDetailsTest cust = (CustomerDetailsTest) itr.next();
              System.out.println("testGetCustomerDetails()-successed. retrieved CustomerDetailsTest="+cust.toString());
    %>
    <%
              //Session for checking whether edit or non-edit mode
              String pageMode = (String)session.getAttribute("CUSTOMER_PAGE_MODE");
              session.removeAttribute("CUSTOMER_PAGE_MODE");
              if(null==pageMode)
                   pageMode = "EDIT";
              if(pageMode.equals("EDIT"))
                   //display data in the form
                   System.out.println("Editable mode");
    %>
              <html:form action="/nonedit">
                   <tr>
              <td><table width="100%" bgcolor="darkkhaki">
              <tr>
                        <td><b><bean:message key="label.id"/></b></td>
                        <td><font color="red"><%=cust.getCusId()%></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Company"/></b>
                        </td><br>
                        <tr>
                   <td><bean:message key="label.cname"/></td>
                   <td><font color="blue"><html:text property="name" value="<%=cust.getCname()%>"/></font></td>
                        <td><bean:message key="label.cphone"/></td>
                        <td><font color="blue"><html:text property="phone" value="<%=cust.getCphone()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr1"/></td>
                   <td><font color="blue"><html:text property="address1" value="<%=cust.getCaddress1()%>"/></font></td>
                        <td><bean:message key="label.cemail"/></td>
                        <td><font color="blue"><html:text property="email" value="<%=cust.getCemail()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr2"/></td>
                   <td><font color="blue"><html:text property="address2" value="<%=cust.getCaddress2()%>"/></font></td>
                        <td><bean:message key="label.cfax"/></td>
                        <td><font color="blue"><html:text property="fax" value="<%=cust.getCfax()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.ccity"/></td>
                   <td><font color="blue"><html:text property="city" value="<%=cust.getCcity()%>"/></font></td>
                        <td><bean:message key="label.czip"/></td>
                        <td><font color="blue"><html:text property="zip" value="<%=cust.getZip()%>"/></font></td>
              </tr><br>
         <tr>
                   <td><b><bean:message key="label.cstate"/></b></td>
                   <td><font color="red"><html:text property="state" value="<%=cust.getCstate()%>"/></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Admin"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AAname"/></b></td>
                   <td><font color="red"><html:text property="adminname" value="<%=cust.getAname()%>"/></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAemail"/></b></td>
                   <td><font color="red"><html:text property="adminemail" value="<%=cust.getAemail()%>"/></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAphone"/></b></td>
                   <td><font color="red"><html:text property="adminphone" value="<%=cust.getAphone()%>"/></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.User"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AUname"/></b></td>
                   <td><font color="red"><html:text property="adminusername" value="<%=cust.getUname()%>"/></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AUemail"/></b></td>
                   <td><font color="red"><html:text property="adminuseremail" value="<%=cust.getUemail()%>"/></font></td>
         </tr><br>
              <tr align="center">
                        <td><html:cancel value="Cancel"/>
                        <html:submit value="Next"/></td>
              </tr>
              </html:form>
    <%               
              }else
                   //display data in the text
                   System.out.println("Non-Editable mode");
    %>
              <html:form action="/edit">
              <tr>
              <td><table width="100%" bgcolor="darkkhaki">
                   <tr>
                        <td><b><bean:message key="label.id"/></b></td>
                        <td><font color="red"><%=cust.getCusId()%></font></td>
                        <td><b><bean:message key="label.status"/></b></td>
                        <td><font color="red"><%=cust.getStatus() %></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Company"/></b>
                        </td><br>
                        <tr>
                   <td><bean:message key="label.cname"/></td>
                   <td><font color="blue"><%=cust.getCname()%></font></td>
                        <td><bean:message key="label.cphone"/></td>
                        <td><font color="blue"><%=cust.getCphone()%></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr1"/></td>
                   <td><font color="blue"><%=cust.getCaddress1()%></font></td>
                        <td><bean:message key="label.cemail"/></td>
                        <td><font color="blue"><%=cust.getCemail()%></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.caddr2"/></td>
                   <td><font color="blue"><%=cust.getCaddress2()%></font></td>
                        <td><bean:message key="label.cfax"/></td>
                        <td><font color="blue"><%=cust.getCfax()%></font></td>
              </tr><br>
         <tr>
                   <td><bean:message key="label.ccity"/></td>
                   <td><font color="blue"><%=cust.getCcity()%></font></td>
                        <td><bean:message key="label.czip"/></td>
                        <td><font color="blue"><%=cust.getZip()%></font></td>
              </tr><br>
         <tr>
                   <td><b><bean:message key="label.cstate"/></b></td>
                   <td><font color="red"><%=cust.getCstate()%></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.Admin"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AAname"/></b></td>
                   <td><font color="red"><%=cust.getAname()%></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAemail"/></b></td>
                   <td><font color="red"><%=cust.getAemail()%></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AAphone"/></b></td>
                   <td><font color="red"><%=cust.getAphone()%></font></td>
         </tr><br>
         <td>
                             <font color="brown" face="Courier New"><b>
                        <bean:message key="label.User"/></b>
                        </td><br>
         <tr>
                   <td><b><bean:message key="label.AUname"/></b></td>
                   <td><font color="red"><%=cust.getUname()%></font></td>
         </tr><br>
         <tr>
                   <td><b><bean:message key="label.AUemail"/></b></td>
                   <td><font color="red"><%=cust.getUemail()%></font></td>
         </tr><br>
         <tr align="center">
                        <td><html:submit value="Update"/></td>
              </tr>
              </html:form>
    <%
    %>
    <%
    %>
                   </table>
              </td>
              </tr>
         </table>
    </body>
    </html:html>

    u r using action classes. so after calling the insert method in Action Class to a dao... the next statement should be retrieve statement. so at the time of updating first it will get updated.. the next statement it will execute is retrieve and then set these details in VO or FORM and show it on JSP
    Message was edited by:
    leo_michael

  • Missing update for a game app after updating ios7 any ideas how to get the update

    Went to update a game app this morning, had already hit update when the i os7 update screen popped went through with the ios update but after ipad restarted the game update is completely missing any ideas how to get the update back no luck so far

    Hello THEVIN7
    The next step if it is not updating, would be to delete the app and then download it again. Check out the general troubleshooting for apps purchased form the App Store.
    iOS: Troubleshooting apps purchased from the App Store
    http://support.apple.com/kb/ts1702
    Regards,
    -Norm G.

  • I have an older mac and it wants me to update to itunes 10 but my mac is too old and I cant figure out how to disable the update

    I have an older mac and it wants me to update to itunes 10 but my mac is too old and I cant figure out how to disable the update so I can use the store.

    If Software Update is offering the update then it would be compatible with your model.  Unfortunately, you haven't provided us with any information on your hardware that would enable us to determine if it really is too old.
    If you really wish to disable the update alert then the next time Software Update opens, select the update in the list then select "Ignore update" from SU's Update menu.

  • How to analyzer the BI query in VISUAL COMPOSER?

    hi experts,
    could you please explain me how to analyze the Bex query in VISUAL COMPOSER? could you please provide me the step-by-step documentation if possible??
    regards
    vadlamudi

    Hi Vadlamudi,
    Here is some documentation for using BI Queries in VC:
    [Modeling Composite Views Using BI Data Services|http://help.sap.com/saphelp_nwce10/helpdata/en/46/081ed5f8685875e10000000a11466f/frameset.htm]
    [Maintaining BI System Connections|http://help.sap.com/saphelp_nwce10/helpdata/en/7e/6dbcea3700452195e3bddaa47c5906/frameset.htm]
    I hope it helps,
    Regards,
    Udi

  • How to extract the Physical Query(database Query)

    Hi ,
    How to extract the Physical Query(database Query) from obiee which was fired in obiee
    Regards
    Ranga

    Hi Ranganath,
    Have a look the following links.
    Setting Logging level:
    http://gerardnico.com/wiki/dat/obiee/loglevel
    How to see physical query:
    http://gerardnico.com/wiki/dat/obiee/manage_session_log
    If you are new to OBIEE, spend some hours on the following blog to learn from basics to advanced level.
    http://gerardnico.com/wiki/
    http://obiee101.blogspot.com/
    http://www.rittmanmead.com/blog/
    Hope it helps you.
    Regards,
    Kalyan Chukkapalli
    http://123obi.com

  • How to improve the updating a sql server table with another table in Oracle

    Hi there.
    I am trying to do the next updating in SSIS
    UPDATE S
    SET
    S.COLUMN_A = OT.COLUMN_A,
    S.COLUMN_B = OT.COLUMN_B
    FROM 
    SQLT1 S INNER JOIN ORACLET1  OT ON
    S. COLUMN_C = OT.COLUMN_C
    This is what I am doing:
    I am taking the Oracle data with the ODBC Source like this.
    Select column_A, column_B, column_C
    from OracleT1
    The thing is, the Oracle table has millions of registers and this updating is taking a lot. But I am not sure if it is maybe because of the design of the update query.
    I wonder is if there is another way to design this query or improve the performance of this task.
    Thanks a lot.

    Yes
    Use a OLEDB destination instead and save the records to a staging table
    Then use a subsequent Execute sql task and do the set based update in it as below
    UPDATE t
    SET COLUMN_A = s.COLUMN_A,
    COLUMN_B = s.COLUMN_B
    FROM SQLT1 t
    INNER JOIN stagingTable s
    ON s.COLUMN_C = t.COLUMN_C
    This would be much faster as its set based
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Can we rollback the update query using Transaction?

    Can we rollback the Update query by writing the update query with in the transaction, as i am implementing different update queries, sometimes I am mistakenly updating the table without where criteria, which is messing up the table. Is there anyway where
    we can write the update query within a transaction and rollback that particular update query which I am writing. I do have a backup table, but that wont be useful because we are doing lot of updates in a span of minutes. I researches about Apex Sql logs too,
    but we do not have access to download such tools. So, can anyone give me a good solution for this?

    Sure, if you use transaction like this
    begin transaction
    update 1
    update 2
    rollback transaction
    both updates will be rollbacked.
    If you want to always be sure about rows you're about to change, always first try with SELECT statement and put each individual UPDATE into separate transaction with rollback at the end, e.g.
    begin transaction
       select ... where some condition
       update . where same condition
       select ... where same condition to verify update
    rollback transaction
    If your last select showed correct info, change ROLLBACK into COMMIT and re-run that script again to perform the actual update.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

Maybe you are looking for