OWB and COMMIT

OWB version: 9.0.2.
I realized that OWB puts several COMMIT statement in the generated PL/SQL packages code.
I need to execute the COMMIT statement only after the end of the PL/SQL procedure, or when I decided,or make a ROLLBACK if some error occurs, and so my question is:
Is it possible to configure an OWB mapping in order to completely remove the COMMIT statement from the generated code?
I remove COMMIT sentences manually, but it seems that some part of the generated code makes a COMMIT, because when the transaction finishes, I make a rollback, but all inserts remains in tables.
TIA

Javier,
OWB indeed always includes commit statements in its code. However, even if you would remove all commits (assuming you run 904 or 92 version of OWB) you will end up with commits after every execution, because every execution runs in a separate session. When a session is exited cleanly the database will implicitly commit.
In OWB92 we introduced a feature correlated commit (configuration parameter on a mapping) that helps you control commits in a multi-target mapping. With that feature you can control commits to only happen at the end of the mapping in set-based mode. In row-based mode or row-based bulk mode, the behavior is that rows from a PL/SQL cursor are being applied to all targets rather than just at the time.
The commit behavior is following:
- in set-based mode, there is one commit per statement and with correlated commit set to true, it will be once at the end of the mapping.
- in row-based bulk mode, the commit frequency is the bulk size. To force row-based mode, set the bulk size to 1.
- in row-based mode, the commit frequency can be configured by the commit frequency configuration parameter.
So, if possible, run in set-based mode (this is fastest anyway) and set correlated commit to true. This will commit the mapping at the end. In case of any error, the entire mapping will rollback.
Hope this helps,
Mark.

Similar Messages

  • Problem with sqlldr and commit

    Hi,
    i have a problem with sqlldr and commit.
    I have a simple table with one colum [ col_id number(6) not null ]. The column "col_id" is primary key in the table. I have one file with 100.000 records ( number from 0 to 99.999 ).
    I want load the file in the table with sqlldr ( sql*loader ) but i want commit only if all records are loaded. If one record is discarded i want discarded all record of file.
    The proble is that in coventional path the commit is on 64 row but if i want the same records of file isn't possible and in direct path sqlldr disable primary key :(
    There are a solutions?
    Thanks
    I'm for the bad English

    This is my table:
    DROP TABLE TEST_SQLLOADER;
    CREATE TABLE TEST_SQLLOADER
    (     COL_ID NUMBER NOT NULL,
         CONSTRAINT TEST_SQLLOADER_PK PRIMARY KEY (COL_ID)
    This is my ctlfile ( test_sql_loader.ctl )
    OPTIONS
    DIRECT=false
    ,DISCARDMAX=1
    ,ERRORS=0
    ,ROWS=100000
    load data
    infile './test_sql_loader.csv'
    append
    into table TEST_SQLLOADER
    fields terminated by "," optionally enclosed by '"'
    ( col_id )
    test_sql_loader.csv
    0
    1
    2
    3
    99999
    i run sqlloader
    sqlldr xxx/yyy@orcl control=test_sql_loader.ctl log=test_sql_loader.log
    output on the screen
    Commit point reached - logical record count 92256
    Commit point reached - logical record count 93248
    Commit point reached - logical record count 94240
    Commit point reached - logical record count 95232
    Commit point reached - logical record count 96224
    Commit point reached - logical record count 97216
    Commit point reached - logical record count 98208
    Commit point reached - logical record count 99200
    Commit point reached - logical record count 100000
    Logfile
    SQL*Loader: Release 11.2.0.1.0 - Production on Sat Oct 3 14:50:17 2009
    Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
    Control File: test_sql_loader.ctl
    Data File: ./test_sql_loader.csv
    Bad File: test_sql_loader.bad
    Discard File: none specified
    (Allow all discards)
    Number to load: ALL
    Number to skip: 0
    Errors allowed: 0
    Bind array: 100000 rows, maximum of 256000 bytes
    Continuation: none specified
    Path used: Conventional
    Table TEST_SQLLOADER, loaded from every logical record.
    Insert option in effect for this table: APPEND
    Column Name Position Len Term Encl Datatype
    COL_ID FIRST * , O(") CHARACTER
    value used for ROWS parameter changed from 100000 to 992
    Table TEST_SQLLOADER:
    100000 Rows successfully loaded.
    0 Rows not loaded due to data errors.
    0 Rows not loaded because all WHEN clauses were failed.
    0 Rows not loaded because all fields were null.
    Space allocated for bind array: 255936 bytes(992 rows)
    Read buffer bytes: 1048576
    Total logical records skipped: 0
    Total logical records read: 100000
    Total logical records rejected: 0
    Total logical records discarded: 0
    Run began on Sat Oct 03 14:50:17 2009
    Run ended on Sat Oct 03 14:50:18 2009
    Elapsed time was: 00:00:01.09
    CPU time was: 00:00:00.06
    The commit is on 992 row
    if i have error on 993 record i have commit on first 992 row :(
    Edited by: inter1908 on 3-ott-2009 15.00

  • Need to Return immediately and commit the App Module on a different thread

    I have an action that I want to return fast (immediately) but the server processing takes longer than acceptable. The results of the operation don't matter to the page submitting it and I want it to be able to navigate away even if the operation is not complete. I want to either be able to send a non-blocking server event from the browser or on the server side start a new thread that performs the operation allowing the original thread to return immediately. The new thread would need access to an Application Module in order to commit data. How would I go about accomplishing this?
    Some thoughts
    I've tried creating a ConcurrentLinkedQueue and putting the DataControl on the que, then in the other thread I pull it off the que, process and commit the data. This works unless the page is navigated away from. Then calling dc.getApplicationModule(); returns null.
    I thought about using createRootApplicationModule in the new thread (since the new thread has no context) but don't know how that would work
    This is the code in the run method of the new thread. In this example, I'm adding data to the app module in the original thread and committing the data in a new thread.
    (like I said, it works most of the time.)
    Object[] req = (Object[])que.poll();
    DCDataControl dc = (DCDataControl)req[0];
    try{
    ApplicationModule am = dc.getApplicationModule();
    if (am != null){
    am.getTransaction().commit();
    } else{
    System.out.println("AM:null unable to commit ");
    } catch (Exception e){
    e.printStackTrace();
    finally{
    if (dc!= null){ dc.resetState();} // release app module
    }

    Thanks for the replies. I am aware of the inherent risks of running a separate thread within a managed container.
    The use case is a performance logging operation. We have a internal web app used by a network of franchises with over 1000 users. We log response time and performances statistics to the database. When the user clicks to navigate or commit data, the response time that the user experiences is logged after the page has fully rendered either through a PPR or a full submit. This is done by submitting ADFCustomEvent from javascript on the page after rendering is complete.. The event sends up the time difference from when the user first clicked to when the page was fully rendered. This information is then merged with logged events stored on the users Session that shows the name and response time of every query that was executed during the previous request. Depending on the page this could be up to half dozen to a dozen or more queries. The logging operation as experienced by the browser is generally fast (<200ms) but sometimes can be as long as a second or more when the database gets busy. A half second is too long as makes the app appear sluggish if the user can't type or click immediately after the page has finished rendering. The logged data is aggregated so we know exactly how much of the page load was due to a slow browser/network, how much was database time, webservice call time, etc... If it's due to a slow database we can drill down and see which query is the culprit. These performance metrics are critical to operations and are charted throughout the day so we know exactly what our users are experiencing. All of our users use a custom firefox client that we control. Using this logging framework we were able to determine that upgrading to a Firefox 4.0 based client cut browser render time by more than half a second on average. We can also tell what type of hardware the user is running so can place the blame for poor performance where appropriate. We have determined that pages render considerably faster on Windows 7 than on Windows 98 with the same hardware. We are moving the logging tables off of our exadata database to a separate box to remove that load from the application database. Since we expect the other database not to perform as well we don't want it to affect the user experience, hence the need to log asynchronously. I would like to put the data on a queue and have a background daemon process read from the queue and commit to the database. I would like the daemon thread to be able to use BC components. I would prefer not to resort to using a web service because of the inherent overhead. The logging operation is not a long operation but is of high frequency so should be as streamlined as possible. The load is spread over 6 servers with 4 JVM's each (24 weblogic instances). I know it's possible to use BC components from a plain Servlet (which runs on it's own thread) so what I want is to have something like a servlet thread that loops forever processing my logging queue.
    One other method I am investigating is using my own non-blocking ajax call that callls a servlet to perform the logging. I will need to pull out the timestamp contained within a client side ADF component along with the pages ctrl-state variable that is included with every ADF request as it uses this as the key to get to the data on the session. ADF really needs a non-blocking ADFCustomEvent for this type of request. (send and don't care about the response)
    The client component with the server listener looks like this
    <af:outputText value="#{pageFlowScope.perfClientTS}" visible="false"
    id="perfClientTSField" clientComponent="true">
    <af:serverListener type="logPerfData" method="#{perfLog.logPerfDataAction}"/>
    </af:outputText>
    The script that queues the ajax call after the page loads looks like this
    AdfCustomEvent.queue(perfClientTSField, "logPerfData", {
    typeId : typeId,
    subTypeId : subTypeId,
    responseTime1 : new String(responseTime1),
    responseTime2 : new String(responseTime2),
    openedVia: via
    true);
    I also tried calling the noResponseExpected() method on the event before queuing it but it still blocked the UI and caused an additional side effect in that the client sent two ajax requests instead of one. It somehow thought something on the client side needed to be synced with the server.
    email me and I can send a doc with more details about how our performance logging framework works.
    Edited by: Don Kleppinger on Mar 14, 2012 2:52 PM

  • Lock and Commit work in INBOUND IDOC

    Hi Experts,
    Problem is about lock and commit work
    i need to receive idoc for Good receipt for purchase order.
    For one Purchase Order i can receive many good receipt Idoc at the same time and when first came in Lock the Purchase Order and further idoc came after give Errors becouse purchase Order is lock.
    Problem is not the serialization (the sequence is correct), but is the lock.
    Any idea on how to fix this issue? (maybe there is some std settings??)
    Cheers
    Boris

    Hello Guys
    the packetsize is already set to 1 but the problem still again..... and where i can find this setting   "in Customizing choose Engineering Change Management ® Define statuses for master record". ?
    Any way i try in function module in inbound to check the lock object with this sample code:
          DO 30 TIMES.
            CALL FUNCTION 'ENQUEUE_EMEKKOS'
             EXPORTING
               mode_ekko            = 'S'
               mandt                = sy-mandt
               ebeln                = goodsmvt_item-po_number
               _scope               = '2'
             EXCEPTIONS
               foreign_lock         = 1
               system_failure       = 2
               OTHERS               = 3.
            IF sy-subrc <> 0.
              WAIT UP TO 1 SECONDS.
            ELSE.
              EXIT.
            ENDIF.
          ENDDO.
    but also with this....problem syill again...
    thanks
    Boris

  • Problem in Creating new row & inserting data using CreateInsert and Commit

    Hello All,
    I have created a page there are few input text and i want to insert the data into a database table. I have created an Application Module I am using CreateInsert and Commit operation but there is one problem.
    At first it created a row in database after that it is not creating the new row instead it is updating the same row with the new values.
    In bindings of my jspx page I have created two binding for action (1) CreateInsert for the VO of that Application Module (2) Commit operation of that Application Module.
    Here is the code snippet of my application:
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
    Object result = operationBinding.execute();
    *if (!operationBinding.getErrors().isEmpty()) {*
    return null;
    OperationBinding operationBinding1 = bindings.getOperationBinding("Commit");
    Object result1 = operationBinding1.execute();
    *if (!operationBinding1.getErrors().isEmpty()) {*
    return null;
    I have tried using Execute+Commit and Insert+Commit case also in every case it is updating the same row and not inserting a new row.
    Is there anything I am missing?
    Please Help.

    hi user,
    i dono. why are trying with codes. adf provides zero lines codes.
    a wonderful drag and drop functionality provide by the framework.
    while double click the button the codes are  registered in your bean
        public String cb6_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("CreateInsert");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb8_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Commit");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb7_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding = bindings.getOperationBinding("Delete");
            Object result = operationBinding.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            return null;
        public String cb14_action() {
            BindingContainer bindings = getBindings();
            OperationBinding operationBinding =
                bindings.getOperationBinding("Delete4");   // some different here. after deleting usually do commit
            OperationBinding operationBinding1 =  
                bindings.getOperationBinding("Commit");    // so here commit operation.
            Object result = operationBinding.execute();
            Object result1 = operationBinding1.execute();
            if (!operationBinding.getErrors().isEmpty()) {
                return null;
            if (!operationBinding1.getErrors().isEmpty()) {
                //add error handling here
                return null;
            return null;
        }if am not understud correctly. please some more explanation need.

  • Issue with Transporting Trans and Comm Structure

    Hi Experts,
    Recently we moved an Infosource ( with Transfer structure and Comm stucture) from D to Q. After movement we checked teh Transport log and we see a warning that says
    " R3TRROUT458SEFRDF2PUBJRIZGZAOPSNB not found, object also deleted in target system"
    From teh object name it appears like a routine. But how do we know the actual name of the routine so that we can see in find out and compare betwn systems.
    Thanks
    DVMC

    Hi,
    If you want to find the objects using only technical name, use the table TADIR.
    In your case execute this table and give the technical name
    '458SEFRDF2PUBJRIZGZAOPSNB' (Removed R3TR and ROUT).
    Then you can get the routine details.
    Regards,
    Vivek V

  • CreateInsert And Commit Programmtically

    dear all
    how i can
    programmtic CreateInsert action And Commit  action into one commandButton.
    h

    Hi,
    You can CretaeInsert and Commit using bindings as follows
    BindingContainer bindings = getBindings();
    OperationBinding operationBinding = null;
    //access the ADF commit operation in an Operation binding and
    //execute it
    operationBinding = bindings.getOperationBinding("CreateInsert");//
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    //don’t continue in the case of an error
    return null;
    }For Commit,Same code as above just change above CreateInsert to Commit as follows
    operationBinding = bindings.getOperationBinding("Commit");//Access bindings
    public BindingContainer getBindings() {
            return BindingContext.getCurrent().getCurrentBindingsEntry();
    }

  • CreateInsert and Commit in one operation

    Is there a way to CreateInsert and Commit in one operation? I just want the user to click one button to create a new record.

    Hi..
    You can try as this scenario one way is without bean class also you can with bean any way i will explain how do you do without bean
    Refresh your Data Control and say you have ViewObject name sampleVO and Application Module as AM.
    Drag and drop CreateInsert as ADF Button(DataControl --> AM -->sampleVo --> Operations --> CreateInsert),To fill data for newly created row Drag and Drop sampleVO as ADF - Form(DataControl --> AM--> sampleVo).Now want to commit this form to database for that purpose you can use Commit Operation in your Application Module Drag and Drop Commit as ADF Button(DataControl --> AM --> Operations -->Commit).Now you can successfully inserted data to DataBase using CreateInsert and Commit.

  • JClient: after INSERT and COMMIT does not show the primary textfield value

    1. In my JClient master-detail form: When I insert a new record, enter data, and commit the changes... the master-panel's primarykey textfield is BLANK, when it should show the new auto-incremented number from the MySQL database. I have to close and open the form again to refresh that field again.
    2. In order to properly save new records in the detail-panel, I have to insert and save the above master-panel first. Is this the way JCLient handle master-detail forms?
    Thanks.

    Hi. Thanks for sharing your advice.
    Re my problem,
    if we have to refresh data by requery,i suggest you should use the way below:
    private JUNavigationBar navBar = new JUNavigationBar(true,false,true,false,true);
    navBar.setModel(JUNavigationBar.createPanelBinding(panelBinding, navBar));
    // after insert ,call this method
    navBar.doAction(navBar.BUTTON_EXECUTE);Tried this out but my textfield still won't get refreshed. Here is the code I came up with:
        private JUNavigationBar navBar = new JUNavigationBar() {
                public void doAction(int button) {
                    if (button == JUNavigationBar.BUTTON_INSERT) {
                        super.doAction(button);
                        navBar.doAction(navBar.BUTTON_EXECUTE);
                        return;
                    super.doAction(button);
            };Re your problem,
    I am developing application with JDev + MySQL,encounted another problem,
    how can i get the primary key supported by auto_increment column after insert?
    i constructed a vo whose sql statement is
    select last_insert_id() as last_id to get the value of auto_increment column.
    i found it can't get the right value unless commit the transaction.
    Would u please tell me your way?Based on what I experienced, we dont have to do the SELECT statement above. MySQL does auto-increment the primarykey but the JClient form just cant show it immediately, unless we close and re-open the form.
    What did I do to refresh the primarykey during insert? Please note that I got this solution accidentally coz I'm still a newbie in Java.
    A user want to add a record:
    1. He presses the Insert button.
    2. He enters data into a component (ex. textfield)
    3. The component's action-performed event is fired, and the following code is run:
            DCJboDataControl dc = (DCJboDataControl)panelBinding.getDataControl();
            ApplicationModule am = dc.getApplicationModule();
            Transaction tr = am.getTransaction();
            dc.commitTransaction();
            ViewObject vo = am.findViewObject("TblaccountsView1");
            vo.executeQuery();
            vo.last();It simply commits the transaction, goes to last (new) transaction, and lets the user continue his data encoding.
    Hope it helps and I hope theres an even better way to do this.

  • OWB and DB2

    I have connected Oracle 9i and DB2 v7 and query DB2 in SQL Plus is fine. However, it doesn't for the connection between OWB and DB2.
    Anyone can help?
    Thanks!

    Try the following and use the database link as the source.
    1. Copy inithsodbc.ora to initQA_DB2.ora in $ORACLE_HOME\hs\admin
    HS_FDS_CONNECT_INFO=DNS_NAME_OF_YOUR_CONNECTION
    HS_FDS_TRACE_LEVEL=0
    2. Add the following lines to listener.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
    (SID_DESC =
    (SID_NAME = QA_DB2)
    (ORACLE_HOME = $ORACLE_HOME)
    (PROGRAM = hsodbc)
    3. Add the following lines to tnsnames.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
    DB= (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)
    (HOST=localhost)
    (PORT=1521)
    (CONNECT_DATA = (SERVICE_NAME=QA_DB2)
    (HS = OK)
    4. Execute CATalog script for Heterogeneous Services in Oracle server ($ORACLE_HOME\RDBMS\ADMIN\caths.sql)
    5. Create database link
    drop public DATABASE LINK dwh_qa_db2;
    CREATE public DATABASE LINK dwh_qa_db2 CONNECT TO "carlosmo" IDENTIFIED BY "E1Qual" USING 'DB2';
    6. Test the connection
    SELECT *
    FROM SomeTable@dwh_qa_db2

  • OWB and DB2 connection

    I have connected Oracle 9i and DB2 v7 and query DB2 in SQL Plus is fine. However, it doesn't for the connection between OWB and DB2.
    Anyone can help?
    Thanks!

    Try the following and use the database link as the source.
    1. Copy inithsodbc.ora to initQA_DB2.ora in $ORACLE_HOME\hs\admin
    HS_FDS_CONNECT_INFO=DNS_NAME_OF_YOUR_CONNECTION
    HS_FDS_TRACE_LEVEL=0
    2. Add the following lines to listener.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
    (SID_DESC =
    (SID_NAME = QA_DB2)
    (ORACLE_HOME = $ORACLE_HOME)
    (PROGRAM = hsodbc)
    3. Add the following lines to tnsnames.ora in Oracle server ($ORACLE_HOME\NETWORK\ADMIN)
    DB= (DESCRIPTION=
    (ADDRESS=(PROTOCOL=tcp)
    (HOST=localhost)
    (PORT=1521)
    (CONNECT_DATA = (SERVICE_NAME=QA_DB2)
    (HS = OK)
    4. Execute CATalog script for Heterogeneous Services in Oracle server ($ORACLE_HOME\RDBMS\ADMIN\caths.sql)
    5. Create database link
    drop public DATABASE LINK dwh_qa_db2;
    CREATE public DATABASE LINK dwh_qa_db2 CONNECT TO "carlosmo" IDENTIFIED BY "E1Qual" USING 'DB2';
    6. Test the connection
    SELECT *
    FROM SomeTable@dwh_qa_db2

  • How to decide between OWB and ODI?

    Having to decide whether to choose Oracle Data Integrator or Oracle Warehouse Builder like tool for creating a dataware house and loading data into it, what should I choose and why?
    I'm an old pl/sql developer but new on datawarehousing (I've been dealing with it for few months) and I'd like to undestand what fits better for me. It seems to me that OWB and ODI look not very different to each other, don't they?
    My Oracle vers. is 10gR2
    Thanks!

    Mark1970 wrote:
    Having to decide whether to choose Oracle Data Integrator or Oracle Warehouse Builder like tool for creating a dataware house and loading data into it, what should I choose and why?
    I'm an old pl/sql developer but new on datawarehousing (I've been dealing with it for few months) and I'd like to undestand what fits better for me. It seems to me that OWB and ODI look not very different to each other, don't they?
    My Oracle vers. is 10gR2
    Thanks!Oracle corporation's statement of direction says ODI is their strategic ETL tool and if you and investing into Oracle ETl for the 1st time then it is better to invest in ODI .
    OWB will be supported and finally OWB and ODI will get merged into a single tool.
    For a pl/sql guy like you , the code generated by OWB is easy to understand as OWB mainly generates pl/sql code ( apart from sql loader and sap abap code ) . But that should not deter you to use ODI as ODI generates mainly SQL code (plus sove native code depending upon the technology used and KM) .

  • Discounts and Commissions in SAP

    Hi,
    I have situations where I have to issue a Sales order with a Discount field so: Total Gross Before Discount less Total Discount and also to include Commission as a seperate field.
    Total Gross Before Discount -
    Total Discount
    Total After Discount  -
    Total Commission
    Net Amount
    Is there a way where I can set this up? I am using SAP Business One 2007
    Thanks.

    Hi,
    I am trying to find the best possible solution to have discounts and commissions included on the same screen for the Sales Order.
    Any suggestions pls?

  • Delete and Commit

    Hello,
    I drag and dropped delete operation and commit on top of the delete button(bind to existing button) However delete is disabled always.
    How can I acheive delete and commit in button?
    Thanks in advance

    The simplest way is to:
    (1) Create a custom method on your application module
    (2) Publish that method on the application module's client interface
    (3) Drop the custom method as a button onto your form.
    When you click the button created in step 3, it invokes the code in your application module method automatically.
    Assuming you are wanting to delete the current row from a view object instance named "EmpView" in your application module's data model, your method would look like this:
    public void deleteCurrentEmpAndCommit() {
      Row empRow = getEmpView().getCurrentRow();
      if (empRow != null) {
        empRow.remove();
        getDBTransaction().commit();
    }I believe you requested a pre-release of the ADF Developer's Guide for Forms/4GL Developers from me. The steps to create and publish custom methods on an application module are covered in sections:
    8.3, "Adding a Custom Service Method"
    8.4,"Publishing Custom Service Methods to Clients"
    10.3.3, "How the Data Model and Service Methods Appear in the Data Control Palette"

  • Begin and Commit Transactions

    I would like to use the begin and commit transaction in stored procedures in T-SQL. I wanted to know if I can put it around a few statements at once and so if there is an error in one of them none of the above statements will save and the procedure will
    terminate. Will this work with just a begin transaction before all the statements and a commit transaction at the end of all the statements and if there is an error nothing will save, or is there more to it?
    thank you
    Debra has a question

    Add also SET XACT_ABORT ON statement in your procedure.
    I suggest you to read this very interesting article Structured
    Error Handling Mechanism in SQL Server 2012, it should tell you everything you need to know.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

Maybe you are looking for