Recurrent single record Insert problems

Hi,
we have on production environment a Java based application that makes aprox 40.000 single record Inserts per hour into a table.
We ha traced the performance of this Insert and the medium time is 3ms, that is ok. Our Java architecture is based in Websphere Application Server and we access to Oracle 10g through a WAS datasource.
But we have detected that 3 or 4 times a day, during aprox 30 seconds, the Java service is not able to make any insertion in that table. And suddenly it makes all the "queued inserts" in only 1 second. That "pause" in the insertion cause problems of navigation because is the top layer there is a web application.
We are sure that is not a problem with the WAS or the Java code. We are sure that is a problem with the Oracle configuration, or some tunning action for this kind of applications that we don´t know. We first thought it could be a problem with a sequence field in the table. Also, a problem when occurs the change of the redo log. But we've checked it with our DBA and this is not the problem.
Has anybody any idea of what could be the origin of this extrange behaviour?
Thanks a lot in advance.
Jose.

If by one single disk you mean a single physical disk then spreading the online redo lobs onto multiple disks would be a good idea. Log Group A should be on a seperate disk from Log Group B and the members of each log group should also be on seperate disks.
Note that Oracle does not stop processing when it does a checkpoiint. Here is basically how it works. When online redo LogA fills a checkpoint is signaled and Oracle immediately starts writing to LogB. The ckeck point is processed by ckpt and dbwr.
If logB fills and a switch to LogC occurs before the ckeckpoint signaled by the switch from LogA to LogB has completed then you get the checkpoint not complete information message. Oracle will continue processing though it has more work to do having to combine two ckeckpoints. If the problem continues then you get 3 and 4 checkpoints backed up. This will bog Oracle down as the buffer cache has to be pretty full at this point. You cannot read data unless you have a clean buffer to read into.
The checkpoint not complete message normally means your online redo logs are too small and are filling too quickly. In the absence of Data Guard configured to use log shipping you should look to see how many log switches you are doing per day. If is is more the 24 - 48 then increase the size of the online redo logs.
Database writer performance issues are the next area you would want to ckeck after properly sizing the online redo logs and verifying the IO performance of log writer. Pretty much all you can do to help log writer IO is put enough physical disk under the logs to spread the IO out.
If your problem is caused by the activity level during peak periods then setting MTTR probably will not help since dbwr will be busy writing anyway.
You really should run a statspack or AWR report to help clarify the issue.
If you determine you are switching online redo logs too many times and increase the size take a set of statspack both before and after you make the change. This will help you see the effect on the database as a whole.
HTH -- Mark D Powell --

Similar Messages

  • Single record insert performance problems

    Hi,
    we have on production environment a Java based application that makes aprox 40.000 single record Inserts per hour into a table.
    We ha traced the performance of this Insert and the medium time is 3ms, that is ok. Our Java architecture is based in Websphere Application Server and we access to Oracle 10g through a WAS datasource.
    But we have detected that 3 or 4 times a day, during aprox 30 seconds, the Java service is not able to make any insertion in that table. And suddenly it makes all the "queued inserts" in only 1 second. That "pause" in the insertion cause problems of navigation because is the top layer there is a web application.
    We are sure that is not a problem with the WAS or the Java code. We are sure that is a problem with the Oracle configuration, or some tunning action for this kind of applications that we don´t know. We first thought it could be a problem with a sequence field in the table. Also, a problem when occurs the change of the redo log. But we've checked it with our DBA and this is not the problem.
    Has anybody any idea of what could be the origin of this extrange behaviour?
    Thanks a lot in advance.
    Jose.

    There are a couple of things you'd need to look at to diagnose this - As Joe says it's not really a JDBC issue from what we know.
    I've seen issues with Oracle's automatic SGA resizing causing sporadic latency in OLTP systems. Another suspect would be log file sync wait events, which are associated with commits. Don't discount the impact of well meaning people using tools like TOAD to query the DB - they can sometimes cause more harm than good.
    Right now I'd suggest you run AWR at 10 minute intervals and compare reports from when you had your problem with a time when you didn't.

  • Multiple record insert problem in Oracle Procedure that uses a cursor

    Dear X-pert guies,
    I have a oracle procedure that use a cursor, I repeatedly make query on 1st table using cursor value and insert that queried value(of 1st table) to 2nd table
    y_summary. y_summary has composite  primary key :PK_Y_SUM (BILL_DATE, TRUNK_MGR, IDD_FLAG, PK_FLAG, PREFIX).*
    when i run the procedure explicit2('201001'); the it gives me the error:::: begin explicit2('201001'); end;_
    ORA-00001: unique constraint (PRM.PK_Y_SUM) violated_
    ORA-06512: at "PRM.EXPLICIT2", line 413_
    ORA-06512: at line 1_
    but when i remove the composite primary key from y_summary table then, the procedure runs ok and make so many duplicate entries in y_summary.
    but i want the single record  to be inserted for single time in y_summary ,so You guies are honorly requested to make the required help .
    the structure of y_summary Table and Procdure code is given below.
    Table:
    -- Create table
    create table Y_SUMMARY
    BILL_DATE VARCHAR2(10) not null,
    TRUNK_MGR VARCHAR2(20) not null,
    IDD_FLAG VARCHAR2(10) not null,
    PK_FLAG NUMBER(2) not null,
    OUTCALLS NUMBER(20,2),
    OUTDUR NUMBER(20,2),
    PREFIX VARCHAR2(10) not null
    tablespace TBS_PRM_D01
    pctfree 10
    pctused 40
    initrans 1
    maxtrans 255
    storage
    initial 64K
    minextents 1
    maxextents unlimited
    -- Create/Recreate primary, unique and foreign key constraints
    alter table Y_SUMMARY
    add constraint PK_Y_SUM primary key (BILL_DATE, TRUNK_MGR, IDD_FLAG, PK_FLAG, PREFIX)
    using index
    tablespace TBS_PRM_D01
    pctfree 10
    initrans 2
    maxtrans 255
    storage
    initial 64K
    minextents 1
    maxextents unlimited
    Procedure:
    create or replace procedure explicit2( month_val in varchar2) is
    cursor explicit_cur is select dest_code from y_table where dest_code like '44%' order by dest_code desc;
    dummy varchar2(100);
    lv_length Number(9);
    sqlstr varchar2(2500);
    rec_count1 number;
    rec_count2 number;
    rec_count3 number;
    begin
    open explicit_cur;
    LOOP
    fetch explicit_cur into dummy;
    EXIT WHEN explicit_cur%NOTFOUND;
    rec_count1 :=0;
    rec_count2 :=0;
    rec_count3 :=0;
    lv_length := length(dummy);
    sqlstr := 'select count(*) from y_table_data1 t where t.fee_dur_1_1 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'', ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''00'' and substr(t.orig_called_num,1,'||lv_length||')='||''''||dummy||'''';
    execute immediate sqlstr into rec_count1;
    sqlstr := 'select count(*) from y_table_data1 t where t.fee_dur_1_2 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'',
    ''ITAX1B'',''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''00'' and substr(t.orig_called_num,1,'||lv_length||')='||''''||dummy||'''';
    execute immediate sqlstr into rec_count2;
    sqlstr := 'select count(*) from y_table_data1 t where t.fee_dur_1_1 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'',
    ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''012'' and substr(t.orig_called_num,1,'||lv_length||')='||''''||dummy||'''';
    execute immediate sqlstr into rec_count3;
    if(rec_count1>0) then
    sqlstr := 'insert into y_summary(BILL_DATE ,PREFIX, TRUNK_MGR,OUTCALLS , OUTDUR , IDD_FLAG , PK_FLAG )
    select '|| month_val||' ,substr(t.orig_called_num,1,'||lv_length||'),t.trunkout_operator ,count(*) , round(sum(ceil(t.duration / 15) * 15) / 60, 0),''00'',''1'' from y_table_data1 t where t.fee_dur_1_1 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'', ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''00'' and substr(t.orig_called_num,1,'||lv_length||')='||''''||dummy||''''|| ' group by t.trunkout_operator,substr(t.orig_called_num,1,'||lv_length||')';
    execute immediate sqlstr;
    commit;
    sqlstr :='DELETE from y_table_data1 t where t.fee_dur_1_1 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'', ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''00'' and substr(t.orig_called_num,1,'||lv_length||')='||''''||dummy||'''';
    execute immediate sqlstr;
    commit;
    end if ;
    if(rec_count2>0) then
    sqlstr :='insert into y_summary(BILL_DATE ,PREFIX, TRUNK_MGR,OUTCALLS , OUTDUR , IDD_FLAG , PK_FLAG )
    select '|| month_val||' ,substr(t.orig_called_num,1,'||lv_length||'),t.trunkout_operator ,count(*) , round(sum(ceil(t.duration / 15) * 15) / 60, 0),''00'',''0'' from y_table_data1 t where t.fee_dur_1_2 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'', ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''00'' group by t.trunkout_operator,substr(t.orig_called_num,1,'||lv_length||')';
    execute immediate sqlstr;
    commit;
    sqlstr :='DELETE from y_table_data1 t where t.fee_dur_1_2 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'', ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''00'' and substr(t.orig_called_num,1,'||lv_length||')='||''''||dummy||'''';
    execute immediate sqlstr;
    commit;
    end if;
    if(rec_count3>0) then
    sqlstr :='insert into y_summary(BILL_DATE ,PREFIX, TRUNK_MGR,OUTCALLS , OUTDUR , IDD_FLAG , PK_FLAG )
    select '|| month_val||',substr(t.orig_called_num,1,'||lv_length||'),t.trunkout_operator ,count(*) , round(sum(ceil(t.duration / 15) * 15) / 60, 0),''012'',''0'' from y_table_data1 t where t.fee_dur_1_1 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'', ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''012'' group by t.trunkout_operator,substr(t.orig_called_num,1,'||lv_length||')';
    execute immediate sqlstr;
    commit;
    sqlstr :='DELETE from y_table_data1 t where t.fee_dur_1_1 <> 0
    and t.out_trunk in (''MHISRM'', ''GEISRM'', ''GEIMRP'', ''MHIMRP'', ''13'', ''ITAX1B'', ''ITAX3B'',''ITAX5B'', ''ITAX6B'', ''ITAX7B'', ''BTIMRP'', ''BTI5RP'', ''BTI6RP'', ''BTI7RP'')
    and t.service_code = ''012'' and substr(t.orig_called_num,1,'||lv_length||')='||''''||dummy||'''';
    execute immediate sqlstr;
    commit;
    end if;
    end loop;
    close explicit_cur;
    end explicit2;
    Edited by: user10951541 on 25.4.2010 12.08

    Dear concern
    Really sorry not to make format listing because i am amature to this blog.
    my anwser to your way .
    1. I have Tested my SQL statements manually in SQL*Plus. this runs ok
    2. "Cursor loops, such as the one you have coded here, have been obsolete in Oracle since version 8i 12+ years ago.
    Look up BULK COLLECT and FORALL in the docs and use them instead."
    I am trying to make use of the BULK COLLECT and FORALL statement in proper location.
    3. "Your procedure never performs a commit so no work actually takes place" i need to get the anwser why........................?
    4. "On what basis was the decision made to use the default PCTFREE and PCTUSED values of 10 and 40?"
    is there any problem if default is used..? if any suggestion........pls
    5." You did not format your listing using the CODE tags as explained in the FAQ making your listing unreadable ... so I've not read it.
    Please read the FAQ and use the proper way to post code so we can understand it. Then perhaps we can help you further. " really sorry not to make understandable to you..? but i will try from next post..
    I really will try to be synced..
    My aim is to make query to Table A using the cursor value like( '4422','442','4411','441','44') and get some data in accordance of these values.Then i put the data into another Table B. same time i need to delete the record from Table A containing the prefix value in accordance for example- i compute value for '4422' from Table A and put the computed value to Table B .Then i delete the record from Table A where prefix is '4422' .so that computed value for the next prefix '442' should contain the computed value for 442[0-1] and 442[3-9] .Same way it will be happened for ('4411','441','44'....bla...bla).
    Thanks in advance..

  • Record Insertion Problem

    Using the following code, am populating the internal table z_ZI2DLVSTORE.
    SELECT SINGLE * FROM VBFA
    INTO y_ZI2DLVSTORE
    WHERE VBELN = IXLIPS-VBELN AND POSNN = IXLIPS-POSNR.
    x_ZI2DLVSTORE-VBELV = y_ZI2DLVSTORE-VBELV.
    x_ZI2DLVSTORE-POSNV = y_ZI2DLVSTORE-POSNV.
    x_ZI2DLVSTORE-VBELN = y_ZI2DLVSTORE-VBELN.
    x_ZI2DLVSTORE-POSNN = y_ZI2DLVSTORE-POSNN.
    x_ZI2DLVSTORE-RFMNG = y_ZI2DLVSTORE-RFMNG.
    SELECT SINGLE PRODUCT FROM ZI2PEGPROM
    INTO CORRESPONDING FIELDS OF x_ZI2DLVSTORE
    WHERE VBELN = x_ZI2DLVSTORE-VBELV.
    SELECT SINGLE SELLER FROM ZI2DLVPROM
    INTO CORRESPONDING FIELDS OF x_ZI2DLVSTORE
    WHERE VBELN = x_ZI2DLVSTORE-VBELV.
    If not x_ZI2DLVSTORE-VBELV is initial.
    z_ZI2DLVSTORE-VBELN = x_ZI2DLVSTORE-VBELV.
    z_ZI2DLVSTORE-POSNR = x_ZI2DLVSTORE-POSNV.
    z_ZI2DLVSTORE-VGBEL = x_ZI2DLVSTORE-VBELN.
    z_ZI2DLVSTORE-VGPOS = x_ZI2DLVSTORE-POSNN.
    z_ZI2DLVSTORE-PPOS = x_ZI2DLVSTORE-PRODUCT.
    z_ZI2DLVSTORE-SELLER = x_ZI2DLVSTORE-SELLER.
    z_ZI2DLVSTORE-DELQTY = x_ZI2DLVSTORE-RFMNG.
    z_ZI2DLVSTORE-WADAT = SY-DATUM.
    z_ZI2DLVSTORE-GIFLAG = ' '.
    Here, my record is ready to get uploaded into master table
    Then, using below code, am updating the master table ZI2DLVSTORE.If record already exists, it will update or it will create a new record - thats my requirement
    if z_ZI2DLVSTORE-POSNR < '900000'.
    MODIFY ZI2DLVSTORE FROM table z_ZI2DLVSTORE.
    endif.
    endif.
    clear z_ZI2DLVSTORE.
    But, my table ZI2DLVSTORE is not accepting that entry. Why? Plz suggest.

    Hi,
      According to ur code it looks you are trying to insert work area data  but not internal table. (in the logic no Append statement, and in the last line u have used  CLEAR statement 'clear z_ZI2DLVSTORE.' )
    for updating workarea syntax is
    MODIFY ZI2DLVSTORE  FROM z_ZI2DLVSTORE.

  • Record insertion problem and another question...

    I know I'm now php mysql expert so I am trying to use the
    insertion wizard and I can make the form and have it supposed to
    link to another page after its done inserting but when I run the
    page and fill in the details it inserts the record but does not
    goto the directed page and also shows the error:
    Warning: Cannot modify header information - headers already
    sent in C:\wamp\www\toursite\admin\users\add.php on line 56
    and on line 56 is:
    header(sprintf("Location: %s", $insertGoTo));
    Can anyone help me here?
    My second problem is not really a dreamweaver problem but it
    may be linked to it. Im using a server package called WAMP and
    pages that I can run will sometimes cause and error box to popup
    saying that Apache has caused error, the box that gives you the
    option of sending the report or not. Anyone know what the problem
    is here?
    If I have not given enough information to help please ask for
    more.
    Thanks
    Dan

    mondan wrote:
    > Warning: Cannot modify header information - headers
    already sent in
    > C:\wamp\www\toursite\admin\users\add.php on line 56
    > and on line 56 is:
    > header(sprintf("Location: %s", $insertGoTo));
    > Can anyone help me here?
    The headers already sent error is a common problem that
    baffles
    beginners. It's caused by some output being sent to the
    browser before a
    call to certain functions, such as header() or
    session_start(). You need
    to eliminate that output, and the problem will go away.
    Common causes of output are:
    * Blank space before the opening PHP tag
    * Blank space before the opening PHP tage or after the
    closing PHP tag
    of any include files
    * Use of echo or print anywhere before the call to the
    problem function
    * Error messages generated by PHP
    > Im using a server package called WAMP and pages that I
    can run will
    > sometimes cause and error box to popup saying that
    Apache has caused error, the
    > box that gives you the option of sending the report or
    not.
    None of the server packages are endorsed by PHP. Some are
    good, others
    not so good. It sounds as though you have a bad installation.
    Seek
    advice from the WAMP team or support forum if they have one.
    David Powers
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    Author, "Foundation PHP 5 for Flash" (friends of ED)
    http://foundationphp.com/

  • How to insert sales text (MM02) into a single record of a Ztable.

    Hi,
    I'm extracting data from different data base tables and populating a Ztable which has Matnr as primary key and sales text as a field.
    I have already used READ_TEXT to display the text and it is displayed in multiple records which in turn leads to duplication of Material numbers.
    Now I want to avoid duplication of records (Matnr) as this being a primary record, and display the sales text of a particular material number into one single record.
    Can anyone tell me how to insert sales text (MM02) transaction into one single record.
    Thanks,
    Govind

    sorry i am not enough clear about your requirement...
    as i can understand i am explaining to you.
    suppose your itab contains repaeating matnr.
    matnr
    1
    1
    2
    2
    2
    3
    3
    like this.
    data : text(200),
             matnr like mara-matnr.
    loop at itab.
    call READ_TEXT fnmodule.
    loop at tline.
    concatenate text tline-tdline into text.
    endloop.
    matnr = itab-matnr.
    at end of matnr.
    itab1-matnr = matnr.
    itab1-text = text.
    append itab1.
    clear text.
    endat.
    endloop.
    NB change the code as per your requirement
    regards
    shiba dutta

  • Insert multiple rows into a same table from a single record

    Hi All,
    I need to insert multiple rows into a same table from a single record. Here is what I am trying to do and I need your expertise. I am using Oracle 11g
    DataFile
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    The data needs to be loaded as
    Field1      Field2
    1               1001
    1               2001
    1               3001
    1               4001
    2               1002
    2               2002
    2               3002
    2               4002
    Thanks

    You could use SQL*Loader to load the data into a staging table with a varray column, then use a SQL insert statement to distribute it to the destination table, as demonstrated below.
    SCOTT@orcl> host type test.dat
    1,"1001,2001,3001,4001"
    2,"1002,2002,3002,4002"
    SCOTT@orcl> host type test.ctl
    load data
    infile test.dat
    into table staging
    fields terminated by ','
    ( field1
    , numbers varray enclosed by '"' and '"' (x))
    SCOTT@orcl> create table staging
      2    (field1  number,
      3     numbers sys.odcinumberlist)
      4  /
    Table created.
    SCOTT@orcl> host sqlldr scott/tiger control=test.ctl log=test.log
    SQL*Loader: Release 11.2.0.1.0 - Production on Wed Dec 18 21:48:09 2013
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Commit point reached - logical record count 2
    SCOTT@orcl> column numbers format a60
    SCOTT@orcl> select * from staging
      2  /
        FIELD1 NUMBERS
             1 ODCINUMBERLIST(1001, 2001, 3001, 4001)
             2 ODCINUMBERLIST(1002, 2002, 3002, 4002)
    2 rows selected.
    SCOTT@orcl> create table destination
      2    (field1  number,
      3     field2  number)
      4  /
    Table created.
    SCOTT@orcl> insert into destination
      2  select s.field1, t.column_value
      3  from   staging s, table (s.numbers) t
      4  /
    8 rows created.
    SCOTT@orcl> select * from destination
      2  /
        FIELD1     FIELD2
             1       1001
             1       2001
             1       3001
             1       4001
             2       1002
             2       2002
             2       3002
             2       4002
    8 rows selected.

  • IDOC with Multiple Segment to One Single Record Mapping

    Hello
    I have a problem mapping the values of the segment <E1CSKTM>
    which occurs two times in my source IDOC to a single record.
    My requirement is to get one field (LTEXT) from the first E1CSKTM segment and map it to Name and take the same field (LTEXT) but from the second E1CSKTM segment and map it to OrgDescription
    The source message:
    <?xml version="1.0" encoding="UTF-8"?>
    <COSMAS01>
       <IDOC BEGIN="1">
          <EDI_DC40 SEGMENT="1">
             <TABNAM>EDI_DC40</TABNAM>
             <MANDT>300</MANDT>
             <DOCNUM>0000000000750131</DOCNUM>
             <DOCREL>700</DOCREL>
             <STATUS>30</STATUS>
             <DIRECT>1</DIRECT>
             <OUTMOD>2</OUTMOD>
             <IDOCTYP>COSMAS01</IDOCTYP>
             <MESTYP>COSMAS</MESTYP>
             <STDMES>COSMAS</STDMES>
             <SNDPOR>SAPQAE</SNDPOR>
             <SNDPRT>LS</SNDPRT>
             <SNDPRN>QAE300</SNDPRN>
             <RCVPOR>SAPQAX</RCVPOR>
             <RCVPRT>LS</RCVPRT>
             <RCVPRN>QAX304</RCVPRN>
             <CREDAT>20080308</CREDAT>
             <CRETIM>090820</CRETIM>
             <SERIAL>20080211134325</SERIAL>
          </EDI_DC40>
          <E1CSKSM SEGMENT="1">
             <MSGFN>005</MSGFN>
             <MANDT>300</MANDT>
             <KOKRS>1000</KOKRS>
             <KOSTL>0105012501</KOSTL>
             <DATBI>99991231</DATBI>
             <DATAB>19000101</DATAB>
             <ERSDA>20060219</ERSDA>
             <USNAM>HAMEED</USNAM>
             <BKZER>X</BKZER>
             <BKZOB>X</BKZOB>
             <PKZER>X</PKZER>
             <MGEFL>X</MGEFL>
             <BUKRS>1000</BUKRS>
             <GSBER>20</GSBER>
             <KOSAR>N</KOSAR>
             <VERAK>TBA</VERAK>
             <WAERS>SAR</WAERS>
             <KHINR>105012001</KHINR>
             <KOMPL>X</KOMPL>
             <OBJNR>KS10000105012501</OBJNR>
             <PRCTR>0105012000</PRCTR>
             <FUNC_AREA>Z240</FUNC_AREA>
             <FUNC_AREA_LONG>Z240</FUNC_AREA_LONG>
             <E1CSKTM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <SPRAS>A</SPRAS>
                <KTEXT>&#1605;&#1583;&#1610;&#1585; &#1575;&#1604;&#1583;&#1575;&#1574;&#1585;&#1577; &#1608;&#1605;&#1608;&#1592;&#1601;&#1608;&#1607;</KTEXT>
                <LTEXT>&#1605;. &#1583;. &#1608;&#1605;&#1608;&#1592;&#1601;&#1608;&#1607;/ &#1581;&#1587;&#1575;&#1576;&#1575;&#1578; &#1605;&#1606;&#1591;&#1602;&#1577; &#1575;&#1604;&#1605;&#1583;&#1610;&#1606;&#1577;</LTEXT>
                <SPRAS_ISO>AR</SPRAS_ISO>
             </E1CSKTM>
             <E1CSKTM SEGMENT="1">
                <MSGFN>005</MSGFN>
                <SPRAS>E</SPRAS>
                <KTEXT>DvM and Stff/AOD-Mad.</KTEXT>
                <LTEXT>Div Mgr and Staff/AOD-Madinah</LTEXT>
                <SPRAS_ISO>EN</SPRAS_ISO>
             </E1CSKTM>
          </E1CSKSM>
       </IDOC>
    </COSMAS01>
    The Target Message:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:CostElementMT xmlns:ns0="http://se.com.sa/materials">
       <INSERT>
          <COSTELEMENT_DATA action="INSERT">
             <TABLE>usmuser.OrganizationCodes_test</TABLE>
             <access>
                <OrgCode>105012001</OrgCode>
                <CostCenter>0105012501</CostCenter>
                <OrgDescription> English Name<OrgDescription/>
                <Name>Arabic Name</Name>
             </access>
          </COSTELEMENT_DATA>
       </INSERT>
    </ns0:CostElementMT>
    is this possible using the graphical mapping?

    Hi Baheej,
    If in your input "E1CSKTM" segment always occurs twice than u can go with the above UDF mentioned by Chirag and also u need to take care that field (LTEXT) also always occurs.If the field does not occur always than you need to check it using exists functions.
    Andmoreover if the "E1CSKTM" segment does occur more than twice than u need to create a UDF where u need to pass the values alternatively.
    Please check the above details and let us know if any furthur enhancements are to be made.
    Thanks,
    Bhargav
    Note:Award Points if found useful.

  • Need to commit after every 10 000 records inserted ?

    What would be the best way to Commit after every 10 000 records inserted from one table to the other using the following script :
    DECLARE
    l_max_repa_id x_received_p.repa_id%TYPE;
    l_max_rept_id x_received_p_trans.rept_id%TYPE;
    BEGIN
    SELECT MAX (repa_id)
    INTO l_max_repa_id
    FROM x_received_p
    WHERE repa_modifieddate <= ADD_MONTHS (SYSDATE, -6);
    SELECT MAX (rept_id)
    INTO l_max_rept_id
    FROM x_received_p_trans
    WHERE rept_repa_id = l_max_repa_id;
    INSERT INTO x_p_requests_arch
    SELECT *
    FROM x_p_requests
    WHERE pare_repa_id <= l_max_rept_id;
    DELETE FROM x__requests
    WHERE pare_repa_id <= l_max_rept_id;

    1006377 wrote:
    we are moving between 5 and 10 million records from the one table to the other table and it takes forever.
    Please could you provide me with a script just to commit after every x amount of records ? :)I concur with the other responses.
    Committing every N records will slow down the process, not speed it up.
    The fastest way to move your data (and 10 million rows is nothing, we do those sorts of volumes frequently ourselves) is to use a single SQL statement to do an INSERT ... SELECT ... statement (or a CREATE TABLE ... AS SELECT ... statement as appropriate).
    If those SQL statements are running slowly then you need to look at what's causing the performance issue of the SELECT statement, and tackle that issue, which may be a case of simply getting the database statistics up to date, or applying a new index to a table etc. or re-writing the select statement to tackle the query in a different way.
    So, deal with the cause of the performance issue, don't try and fudge your way around it, which will only create further problems.

  • SQL: System locks up and runs slow after performing simple DML record insert

    SQL Version:  2008 R2
    I am having a serious problem.  I ran the following code to perform a simple table record insert which ran successfully.  However, after running this code I could no longer access the related table.  I couldn't run a query against it. 
    I tried to delete all the records and that wouldn't work either.  When attempting to run any DML statements (i.e. Select * From vPCCertificateTypes) against this table SQL gets locked up and never returns anything and no error messages.  I have
    to manually stop the query.  Now the entire SQL system is running slow.
    Any help would be greatly appreciated.  The code I ran to originally insert the records is below.
    Regards,
    Bob Sutor
    CODE: 
    Begin TRAN
     INSERT INTO vPCCertificateTypes (VendorGroup, CertificateType, Description, Active, Category)
     SELECT HQCo, 'MBE', 'Minority-owned Business Enterprise', 'Y', 'Affirmative Action' 
     FROM HQCO
     Where HQCo IS NOT NULL
      AND HQCo <> 100
      AND HQCo <> 99
     IF @@ROWCOUNT <> 44 ROLLBACK ELSE COMMIT
    Bob Sutor

    The problem was an open uncommitted transaction against the table as you suspected.  I ran your code and it cleared the transaction.  In the past I would intentionally leave our the Commit statement and then if the transaction ran fine, I would
    simply highlight and run 'COMMIT' and it would close the transaction.  Apparently that is not the correct approach.  I'll use your suggested code from now on.
    Thanks for the help.
    Bob Sutor

  • How to use execute query For a single record

    Hi All,
    I am working with oracle forms 10g, I have developed a custom form.
    I the form user enter some data and click save in the menu and data get inserted into my table. Inside the insert statement i have hardcoded some values, Once data get inserted i cant able to see that values immediately in my text fields in my form.After requerying i can able to see the changes.
    For example I have a text field called Status, and the field is display only field. At that time of insert i have hardcoded as "INCOMPLETE". Once the user enter the data in the form and click save the data get inserted in to my table but i cant able to see the status, after i requery my form i can able to see the status.
    Here i do multi insert also.
    This is my insert statement
    BEGIN
    First_Record;
    LOOP
    IF :BANK_GUARANTEE_BLK.CHECK_IN_OUT = 'Y'
    THEN
    XXBANK_GUARANTEE_HEADERS.XXBANK_GUARANTEE_INSERT;(this is my package, here i have written my insert statement)
    --Execute_query;
    END IF;
    Exit when :System.Last_Record = 'TRUE';
    Next_Record;
    END LOOP;
    END;
    If user insert only one row and i gave Execute_query to refresh and bring the current data, but when i use execute_query Its brings up all the datas in the table.
    Can any one tell me how to avoid this and how to use execute_query for a single record.
    Thanks &regards
    Srikkanth

    Solved,
    The solution is
    set_block_property('LC_REQ_BLK',ONETIME_WHERE,'LC_PO_NUMBER='||:LC_REQ_BLK.LC_PO_NUMBER);
    go_block('LC_REQ_BLK');
    execute_query;
    Works fine.
    Regards
    Sri

  • Dreamweaver CS4 - Record Insertion Form js error

    Hi
    I'm dreamweaver cs4 and started using the Record Insertion form, I was mainly experimenting with it and just seeing what it could do.
    However when I get to the wizard i have to wait a few seconds for it to connect to the database and then I get an error message that says:
    While executing onLoad in ServerObject-InsRecPHP.htm, the following Javascript error(s) occured:
    At line 283 of the file "Macintosh HD:Application:Adobe Dreamweaver
    CS4:Configuration:Commands:ServerObject-FormCmnPHP.js":
    invalid array length
    I was just wondering if this was a common problem, or I've messed something up either in Dreamweaver, or in the SQL database that I'm using.
    I've also noticed that its the same for Update and Delete Records Wizards aswell.
    Any help would be greatly appreciated
    Aaron Kennedy

    I see it's your first post. Welcome to the forum.
    A good place to start looking for answers is the Dreamweaver FAQ. You'll find the answer to your question under "Crashes, installation, JavaScript, and unexplained problems".

  • How can I add recording time to a single recording not a series recording?

    If I set-up a series recording it allows me to add minutes to the recording time why can't I add time to a single recording? For example if I want to record a single show tomorrow I find it on the guide and hit record. Now I want to add a few minutes on the end of the show because I know it always runs over it's advertised time why can't I add the time? It doesn't gives to extra options for a single recording. The only time I can add time to a single recording is if the show is currently on then it allows me to add time but, not before the show is on. So what good does that do? Comcast allowed me to set-up extra options to a single recording.

    Actually you can.  It's a bit clumsy but what you have to do is go to the DVR menu, select scheduled reordings, select the recording you want to extend, scroll through the menu and you will find an option to modify the start / end time.
    If a forum member gives an answer you like, give them the Kudos they deserve. If a member gives you the answer to your question, mark the answer as Accepted Solution so others can see the solution to the problem.

  • How to determine the last record inserted

    hi
    I have a table abc ( x number, y number, z date ) columns, there
    is no primary or unique key.
    I have been inserting values into it. there r some duplicate
    values to.
    but now I want to modify only the record inserted at the end.
    i.e
    if initially ABC is having
    x y z
    10 20 01-nov-2001
    11 20 01-nov-2001
    out of these records I want to change the value of x to 50 for
    the record which was inserted last or shall I say whose z is the
    greatest.
    I have been trying to do but what I see that the z column is not
    getting the time in increasing order. i.e even though I tried to
    display the dated in dd-mon-yyyy 24hh:mm:ss format still and I
    found that date is not consistant. the record I inserted first
    is have a much more value than the record I inserted last.
    please help...
    Sreekant

    rowid refers to the current position of the record; if the
    record has been moved (and there are any number of reasons why
    the database might shift a record) the order of rowid will not
    reflect the order of insertion.
    the only way to guarantee order of insertion is to timestamp the
    record. if I understand the original posting, you have been
    doing this.
    Now you should have been using SYSDATE. if you are saying that
    SYSDATE is giving you inconsistent results then you have a real
    problem: has somebody been tinkering with your database server -
    changing the system clock or something?
    Or are you using some other method to set the value for Z
    column? If so, what?
    rgds, APC

  • Record Insertion Form Wizard, page not displaying

    I used the "Record Insertion Form Wizard" in Dreamweaver 8 to
    build the following code. Problem is that when I upload this to my
    server and load the page nothing is being displayed. Anybody have
    any thoughts on this?

    Hi yea,
    you need to upload the includes folder that is created when
    using the
    interakt extensions.
    "Herman2468" <[email protected]> wrote in
    message
    news:e7mmi0$ic3$[email protected]..
    > Dreamweaver's "Record insertion form wizard" creates
    this code in my
    > add_products.php page
    >
    > 1 <?php
    require_once('../Connections/connStore1.php'); ?>
    > 2 <?php
    >
    > 4 //Alternative for PHAkt's functions.inc.php
    > 5 require_once('../includes/tNG_functions.inc.php');
    >
    > 7 //load the tNG classes
    > 8 require_once('../tNG/KT_tNG.inc.php');
    >
    > Which causes this error message:
    >
    > Warning: main(../includes/tNG_functions.inc.php): failed
    to open stream:
    > No
    > such file or directory in
    /home/herm1/public_html/admin/add_product.php on
    > line
    > 5
    >
    > Fatal error: main(): Failed opening required
    > '../includes/tNG_functions.inc.php'
    > (include_path='.:/usr/lib/php:/usr/local/lib/php') in
    > /home/herm1/public_html/admin/add_product.php on line 5
    >
    >
    > Dreamweaver is telling add_products.php to access a
    folder that does not
    > exist.
    > I'm stuck.
    >
    >
    >

Maybe you are looking for

  • I have nothing but trouble putting podcasts on my devices.

    With earlier versions of iTunes, I could just check the box of the podcast I wanted, and it would load onto my device.  With the current version (11 and later), when I try to check the box, nothing happens.  Sometimes I can check the box below the po

  • Posting only possible in periods 2007/09 and 2007/08 in CoCd 1234.

    Hello all, I would appreciate some clarification on the following issue. We are getting a error message. It is a Goods movement error log message. This is how it appreas in the system: <b>MT.....Area.....Msg....Item.....Message text</b> E.........M7.

  • Signature in Logic Post

    Ok, this is not a direct Logic question but rather a question about posting on the Logic Forum. After the latest redesign of the Forum, there is no signature field any more that gets added automatically at the end of the post. If I understand correct

  • Childrens accounts and payment method bypass

    when i am trying to set up a child's account under my apple id, it is asking me for a payment method and saying i only have a Debit card on file when it is a visa.  how do i fix this? I can't go past this step

  • Apple Caching Server 403 errors

    I have a caching server enabled for a IOS installation Im doing. The mac has been at the customers for a while and I don't know its origin. It is running 3.2.1 Server OS Ive had a lot of trouble with the upstream proxy and the fact that its some kind