Handling transaction

Dear:
Could some one give me a brife explanation of
ORA-01453. Does it really mean that one trasnaction is in process and another transaction is strating and previous transaction is holding a lock.
Thanks for any valuable suggestion.
Regards,
Ashaar Riaz

Are you issuing SET TRANSACTION in the middle of a transaction?
When you're using this statement, SET TRANSACTION must be the first statement in the transaction
i.e. -------------
SET TRANSACTION...
update...
savepoing...
update...
COMMIT.
if you do..
update...
savepoint...
SET TRANSACTION...
update...
savepoint...
... you will probably get error ORA-01453
Not sure what else could cause this error.
Lucio

Similar Messages

  • Handle transaction in web dynpro

    Hi,
    How to handle transaction in web dynpro applications which is using Adaptive RFC model ?
    Thanks,
    Teja

    Hello Teja,
    Please refer tutorial at https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d352a790-0201-0010-5082-b1a608d22b6c.
    I hope it will help u to understand transaction handling in wd.
    Best Regards,
    Pankaj Sharma

  • How to handle transaction control--- in the dbms query or in JDBC? or BOTH?

    Hi all,
    we have a servlet application which do insert, update to a few sybase tables. so far we don't have any transaction management control in either store procedure or in JDBC call. i like to know where should we enforce this control logic? in both place or either one is enough?
    thanks!!

    according to your answer, is it safe to say that we
    should NOT
    handle transaction control in both query and JDBC
    call? i am on the side of JDBC
    program control. However our manager feels that if we
    handle it in two place, we could be more error-proof.
    i don't know how to convince him that only one place
    could make it work. Double your rollbacks double your fun! Odd that a manager is getting involved at this level...
    Providing transaction control at both places, as a rule makes absolutely no sense at all (to me). I actually believe that this would be far more error-prone (not error-proof). It's really a logistics issue. When you are working on the Java code, you won't have the stored procedure(s) code right there. While you may design it masterfully at first, as maintenance occurs, the mastery can easily be lost as assumptions are made on when and where commit or rollback processing is going to take place. The end result would be a system that could easily corrupt the logical integrity of the database.
    If you have to make a decision up front, and you believe performance will ultimately be a concern, then your decision should be to handle transaction management within the stored procedure(s). However, this decision will make the stored procedures far more complex than what the DBA or application staff is familiar with. You would also have to take some care to release resources as appropriate within the Java code.
    If you decide to manage transactions within JDBC, it is possible that you will have to move a portion of transaction managment to one or two of the stored procedures. This would be a 'fix' for a poorly performing functionality, and you would simply take care to limit this as much as possible.
    I wish I could guide you specifically, but I'm working at 20,000 feet related to your specific application needs.

  • Handle transaction in web dynpro applications

    Hello,
    can you please tell me How to handle transaction in web dynpro applications which is using Adaptive RFC model ?
    Thanks,
    Teja

    Hi,
    please see this [thread|Link to SAP Transaction using WebDynpro for Java;
    regards,

  • Handling Transaction in Webdynpro problem?

    hi All of you;
    I am getting very peculiar problem :The problem is that data that i am inserting into R/3 using BAPI is committing without any call of Commit Bapi.The function Module of that BAPI also donot have commit method.Then also data is inserting into the R/3.I am not able to figure out the solution ;is there any problem by me in handling transaction thru webdynro or some problem in BAPI.
    Regards
    Nidhideep

    Hi,
    I guess problem is in BAPI only.
    Check from BAPI only, by running that individually.
    Coz, from Web Dynpro we wont be having any control on that, unless we call commit statement explicitly.
    Regards,
    Sridhar

  • How to handle Transactions avoiding EJB

    I am using EJB just to use its transaction feature. I know EJB is heavy and there must be other better ways to handle transactions.Could anybody let me know how to JTA (java transaction APIs) in JBDC or if there is any other recommended way to handle Transactions.
    Many Thanks.

    Google for "JTA tutorials".
    It brought back these:
    http://java.sun.com/products/jta/
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/Transaction4.html#63068

  • Handling transactions from Tuxedo

    Hi!
              I have a problem handling transactions within the WLS 8.1 when they are initiated from a Tuxedo-client.
              I have an EJB handling a tuxedo call. If the caller has not begun a transaction, all works well, but if the caller starts a transaction, the tpcommit() in the client will fail:
              CMDTUX_CAT:1459: ERROR: Can't commit transaction, tpcommit() failed - TPEABORT - transaction cannot commit
              (This error occurs when I run ud32 -t 60, if I skip the '-t 60', it works perfectly well).
              The <transaction-type> for my EJB is 'Container' and the <trans-attribute> is 'Supports'.
              Is there another setting I have to set to have the WTC handle the transaction correctly?
              Regards, Ola
              

              Hi again,
              Ignore this cry for help, I found a solution to my problem.
              I had missed the little checkbox furtherst down in the Advanced Option part of
              the Configuration of Data Sources: "Emulate Two-Phase Commit for non-XA Driver".
              With that one checked (we're using non-XA drivers) everything worked very well.
              So Yes, there was a setting I could use to eliminate my problem ;-)
              /Ola
              Ola Ödling <[email protected]> wrote:
              >Hi!
              >I have a problem handling transactions within the WLS 8.1 when they are
              >initiated from a Tuxedo-client.
              >I have an EJB handling a tuxedo call. If the caller has not begun a transaction,
              >all works well, but if the caller starts a transaction, the tpcommit()
              >in the client will fail:
              >CMDTUX_CAT:1459: ERROR: Can't commit transaction, tpcommit() failed -
              >TPEABORT - transaction cannot commit
              >(This error occurs when I run ud32 -t 60, if I skip the '-t 60', it works
              >perfectly well).
              >The <transaction-type> for my EJB is 'Container' and the <trans-attribute>
              >is 'Supports'.
              >
              >Is there another setting I have to set to have the WTC handle the transaction
              >correctly?
              >
              >Regards, Ola
              

  • Handling Transaction in Stateful Session Bean

    I wrote a public method like public void doTransaction()
    it will call 2 private method, like: methodA and methodB
    Both private methods have db accesss statement and will update the db. They got different db connection and will close the connection when method call finished.
    How to include them to one transaction? I want to be able to rollback the job of the first method when I catch exception thrown by the second method.
    I tried simply define transaction type of the public method to be Container and Required. But it doesn't work, the first method doesn't rollback. Of course I can let the 2 private methods share a same connection and commit after finishing calling them. But how if they are in different DB?

    Ok... Here it goes...
    You can do it in the following manner.
    As you said you have got 2 private methods doing d/b updates and these are called from a public method.
    Stateful session beans since associated with a client across methods, you can take advantage of it. Write your own user defined transaction.
    Begin the transaction scope in your public before calling the 1st private method. Call the 2 methods in a try block. Once you are done with these methods, you can commit and end the transaction. If you get any exception, rollback the transaction in the catch block. Otherwise if u get any exception in the 2nd method, you can rollback the transaction there itself.
    Stateful session beans lets u allow to spawn the bean managed transaction across methods. you can begin your transaction in one method and end it in a differnt method or you can end the transaction after calling the methods.
    The problem you are dealing with can typically very well handled by writing bean managed transaction.
    Hope this helps. If you need anymore clarity on my solution, please let me know.
    -amit

  • How to handle transaction exception

    Hi,
    I am using jdev 11g.
    I need to catch the exception in my transaction like (table not found, column must not be null, column not found, ...)
    hereunder is my code.
      public void saveOsaUser(OsaUser osaUser) throws Exception {
        EntityManager em = getEntityManager();
        try {
          utx.begin();
          em.joinTransaction();
          em.persist(osaUser);
          utx.commit();
        } catch (Exception ex) {
          try {
            utx.rollback();
            throw new Exception(ex.getLocalizedMessage());
          } catch (SQLException sqle) {
            throw new Exception(sqle.getLocalizedMessage());
          } catch (IllegalArgumentException iae) {
            throw new Exception(iae.getLocalizedMessage());
          } catch (EJBException ejbe) {
            throw new Exception(ejbe.getLocalizedMessage());
          } catch (RuntimeException re) {
            throw new Exception(re.getLocalizedMessage());
          } catch (Exception e) {
            throw new Exception(e.getLocalizedMessage());
        } finally {
          em.close();
      }Whatever the error type, i always get the message : Transaction does not exist.
    Kindly advice how can handle these SQL error (table not found, column must not be null, column not found, ...)
    Regards
    Emile BITAR

    Repost

  • Delete or acrhive messages in AIF error handling transaction

    Dear all,
    Is there a transaction or report to delete the messages in error handling and monitoring ? Where are these messages stored, its in a queue , could I get to view the queue and delete the messages which are not required.
    And also where do we schedule the limit - about how many messages to be processed per run or per package. where is this maintained.
    - Messages often get in to manual restart mode... why does this happen?  Do we get to set the messages for automatic restart , if yes, how do we do that?
    Thanks and Regards,
    Archana

    Hi Archana,
    for automatic reprocessing in AIF please have a look into the thread  SAP AIF - Automatic Reprocessing. Nicole provided a solution there.
    Best wishes
    Christoph

  • How to handle transactions when two different databases are involved.

    consider two tables namely Table-A and Table-B part of two different databases namely ORACLE and MYSQL.
    Now the project requirement is updating the Table-A(ORACLE) and Table-B (MYSQL) as one transaction. i.e. either update both the tables or rollback both the tables.
    Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.

    NareshAnkuskani wrote:
    Now my question is how could i handle this situation using JDBC(Type-4) driver.Because i think at a time only one JDBC driver can be loaded into the JVM.No, that is not true.
    But anyway, you need to use distributed (XA) transactions. i believe that the latest version (5.0) of mysql actually has support for XA transactions. you need to use a to setup a distributed transaction and attach the connections for the two databases to that transaction. then it should function as you desire.

  • How to handle transactional data?

    Hello,
    I try to do a customer analyse with ODM, for that
    I collect from some different tables many of attributes,
    some of them are transactional.
    How I understand the ODM manual, I have to select for
    the analyse that the data are in the transactional
    format, but what I could do if there are not only 3
    different columns, which define the transaction? Whit
    other words I have more than one attribute which is
    transactional.
    Is the right Selection of the data format important for
    the results, or could I use the single data format, if I
    could not to do that, which alternative I have?
    M. Neudeck

    Hi,
    What version of ODM are you using.
    If you are using ODM 10.1, you have the option of either using the java api or the pl/sql api. Each api has a different approach for handling txn data.
    The java api will accept only a single txn format table (case id, name, value). This table can contain a mixture of data that are not of the same metric. You could have quanities, counts, categoricals etc.
    The plsql api has a custom object type for nested numericals or nested categoricals that you use to create a nested table as a column. You can create multiple columns as nested tables in your input table for model build.
    As to data format, that issue is also api dependent. In java,you can specify the mining type in the mining function setting. In pl/sql, the mining type is based on the data type, so data type is very important.
    Thanks, Mark

  • How to handle transaction SWEC

    Hi All ,
    I need to understand how and what transaction SWEC does.Please kindly help me.
    and Also , specifically I need to know what is FIELD RESTRICTION for.
    Please reply.

    Hi,
    Have you worked on Workflows. If yes then you would have used it to a very large extent. This transaction is mainly used to trigger an event used in workflow. For example you create a PO and know there is a workflow created for Approval of this. Now you have to trigger this. So you have to put an entry in this transaction of that Object Class and on what case it should work.
    Regarding Field Restrictions:
    For example you want to notify say Purchasing Department when a PO gets Changed. If the radio Button is selected for PO Change then if there is a change in the text of a PO which would not be of high importance even then the Workflow related will trigger and notify the respective person.
    Now to restrict it say only when quantity, plant or material is changed the event should be triggered. In this case changes other than these will not trigger the event hence the workflow.
    hope this would have given you some clear picture.
    Thanks,
    Prashanth
    Edited by: Prashanth KR on Feb 12, 2009 9:53 AM

  • Handling transaction in process flow

    Hi All,
    I had created one process flow which has 3 mappings in it. I want that, if any mapping fails due to any reason, any insertion or updation made by previous mappings should get rollbacked. I had pointed each mapping to END_ERROR as well as END_SUCCESS components, stating that If any error comes the goto END_ERROR, but I don't know how do I make sure that all 3 mappings act as an individual entity so that all should get rollback when any one mapping fails.
    Thanks,
    Danish
    Message was edited by:
    Danish

    Hi, Danish. Have you done it ? Would you help me on that?
    I copied the sample code to the SCRIPT parameter of a sqlplus activity from OWB documentation:
    "declare status varchar2(30);begin map1.main(status); if status!='OK' then rollback else map2.main(status); if status!='OK' then rollback; else commit; end if; end if;end if;"
    and substitued "map1" and "map2" with my mapping names.
    Also, I appended "exit" to the code, but the job always hangs and does nothing. The two mappings were configured to commit manually.
    Non-PL/SQL scripts work pretty well for me. And, honestly and shamefully, I have no knowledge of PL/SQL.
    Thank you.

  • Is ths Transaction Handling Write or Wrong ?

    I little bit hesitate about Transaction handling in my application. I want to add data to database, before do this following steps should happen
    # add data to account table
    # update account serial which locate another table
    # add data to monthtrm table
    # update monthtrm serial which locate another table
    In order to success this step I used container manager transaction below show that code
    @TransactionAttribute(TransactionAttributeType.REQUIRED)
        public void addNewFixDepositAccount(Account account, String cusId, String branchCode, int newSerial, String userCode) {
            try {
              //add data to account table
              this.create(account);
                    //update the SystemParameter table with new saving serial
                    systemParameterFacade.setFdSerial(newSerial);
              //add data to monthtrn tabel     
              monthTrnFacade.create(monthTrn);
                    //update the SystemParameter table with new monthtrn serial
                    systemParameterFacade.setTrnSerial(nxtTranSerial);
         } catch (CopException e) {
         if (e.getStackTrace().length > 0) {
                    System.out.println("Custom Massage :-" + e.getMessage());
                    System.out.println("Called Class :-" + e.getCalledClass());
                    System.out.println("Exception Handling Class :- " + getClass());
                    System.out.println("Calling Method :-" + Thread.currentThread().getStackTrace()[1].getMethodName());
                    System.out.println("Called Method :-" + e.getCalledMethod());
                    System.out.println("Exception Line Number :-" + e.getStackTrace()[21].getLineNumber());
                    System.out.println("Date and Time :- " + e.getDateTime());
                    System.out.println("Exception Type :-" + e.getCause().toString());
                } else {
                    System.out.println("Custom Massage :-" + e.getMessage());
                    System.out.println("Called Class :-" + e.getCalledClass());
                    System.out.println("Exception Handling Class :- " + getClass());
                    System.out.println("Calling Method :-" + Thread.currentThread().getStackTrace()[1].getMethodName());
                    System.out.println("Called Method :-" + e.getCalledMethod());
                    System.out.println("Date and Time :- " + e.getDateTime());
                    System.out.println("Exception Type :-" + e.getCause().toString());
    }   Add data to account
        public void create(Account account) throws CopException {
            try {
                em.persist(account);
                em.flush();
                em.clear();
            } catch (Exception e) {
                context.setRollbackOnly();
                throw new CopException("Can't Add Account", e, getClass().toString(), Thread.currentThread().getStackTrace()[1].getMethodName());
      Add data to monthtrn
        public void create(MonthTrn monthTrn) throws CopException {
            try {
                em.persist(monthTrn);
                em.flush();
                em.clear();
            } catch (Exception e) {
                context.setRollbackOnly();
                throw new CopException("Can't Add MonthTrm", e ,getClass().toString(),Thread.currentThread().getStackTrace()[1].getMethodName());
    Update Account serial
        public void setFdSerial(int fdSerial) throws CopException {
            try {
                Query query = em.createQuery("UPDATE SystemParameter s SET s.fdSerial = :fdSerial");
                query.setParameter("fdSerial", fdSerial);
                query.executeUpdate();
                em.flush();
            } catch (Exception e) {
                context.setRollbackOnly();
                throw new CopException("Can't Update FD Serial", e, getClass().toString(), Thread.currentThread().getStackTrace()[1].getMethodName());
       Update Trnserial
        public void setTrnSerial(int trnSerial) throws CopException {
            try {
                System.out.println("Trn Serial : " + trnSerial);
                Query query = em.createQuery("UPDATE SystemParameter s SET s.trnSerial = :trnSerial");
                query.setParameter("trnSerial", trnSerial);
                int result = query.executeUpdate();
                System.out.println("Number of updated records in transaction Serial :- " + result);
            } catch (Exception e) {
                context.setRollbackOnly();
                throw new CopException("Can't Update Trn Serial", e, getClass().toString(), Thread.currentThread().getStackTrace()[1].getMethodName());
        }Exception Class
    package bank.exception;
    import java.text.DateFormat;
    import java.text.SimpleDateFormat;
    import javax.ejb.ApplicationException;
    * @author dinesh
    @ApplicationException(rollback = true)
    public class CopException extends Exception {
        private String calledClass;
        private String calledMethod;
        public String getDateTime() {
            DateFormat dateFormat = new SimpleDateFormat(" yyyy-MM-dd HH:mm:ss");
            java.util.Date date = new java.util.Date();
            return dateFormat.format(date);
        public CopException(String string, Exception ae, String className, String methodName) {
            super(string, ae);
            this.getDateTime();
            this.setCalledClass(className);
            this.setCalledMethod(methodName);
        public String getCalledClass() {
            return calledClass;
        public void setCalledClass(String calledClass) {
            this.calledClass = calledClass;
        public String getCalledMethod() {
            return calledMethod;
        public void setCalledMethod(String calledMethod) {
            this.calledMethod = calledMethod;
    Is this way correctly handle Transaction? If I wrong please give me you're precious advice to improve my program efficiency, please give some comments

    Sounds fine to me. If you have duplicated yourself too much, you can refactor the model later to remove duplication. If there is no duplication, then separate models was the right choice.

Maybe you are looking for

  • The Managed Bean in the faces-config.xml File

    I am still very new to JSF. I am confused about the managed bean. For example, I have a button in my web page. A click on this button invokes an action; say, ListAction.java. In this ListAction class, I instantiate a business delegate; say, ListPerso

  • Trying to use HPLJ 1102w as a wired network printer. How do you configure the network settings?

    I have an HPLJ 1102W and I want to use it as a wired printer on my LAN. The trouble is, the easy setup utility is geared toward wireless networking and the ethernet interface will not get a DHCP address from the LAN. In order to get an IP address, I

  • ADF Commit question.

    Hello: My project is simple and consists of EJB 3.0 from a BD Oracle. I think the model module is ok. I created a SessionFacade and a Datacontrol. In WEB module i generated two pages and linked its properties using the action button. Apparently all i

  • Opening ADOBE forms is very slow.

    Lately, once I enter my username and password, opening ADOBE forms is very slow.

  • Mail - Preferences not working

    I'm running Mail 1.3.11 When I click on the preferences all I get is a window with "Signatures" in the title bar. I've tried the obvious of clicking the top right-hand pill-shaped button which expands the window, but I don't get the usual tabs of dif