Needed to ROLLBACK failed Transaction

Hi Oracle Expertz,
QRY will Look Like
BEGIN
INSERT into tab3 RETURNING INTO v_exer_num
UPDATE tab1
SET col1 = ''
WHERE exer_num = v_exer_num
UPDATE tab2
SET col1 = ''
WHERE exer_num = v_exer_num
END ;
Example :
1st record:
Participant A
Exer 1 Success
Exer 2 Success
2nd record
Participant B
Exer 1 Failed due to dead lock or some other exception.
3rd Record
Participant C
Exer 1 Success
Now in this transaction, I need to only rollback for Participant B ( failed Record) . Participants A and C should have committed the transaction. Can any one suggest me on this?
Possiblities Of Exception :
successful of INSERT , UPDATE , UPDATE will be considered as a completed tranasaction.
For a particular record ( exer_num) , If insertion is executed successfully ,and updates failed for the corresponding exernum , I need to rollback the inserted record .
Regards,
Maran
Edited by: Maran on Aug 6, 2009 1:17 PM

Hey Sven ,
thanks for your response. No these three DML statements would be executed inside my procedure. We can not run it in different session. the reason is
as i said, completion of these 3 DML statements , then only will conisdered as a successful transaction else i need to roll back .
also this will be called in a Batch JOB. we have a commit for whole transaction.
Lets these are all the possibilites :
1) INSERT FAILED ( ROW 1 )
2) INSERT SUCCESS (ROW 2 )
1st UPDATE Failed
3) INSERT SUCCESS ( ROW 3 )
1st UPDATE SUCCESS
2nd UPDATE D FAILED
4) INSERT SUCCESS ( ROW 4)
UPDATE SUCCESS
UPDATE SUCCESS
Now for these scenario none of three statements got executed successfully . So if it fail between any of the statements , I need to rollback that particular row.
Hope you understand the problem well now.
Now can anyone suggest me that How can i handle this exception and need to keep going my transaction even if it fails in between.
Objective over this problem is :
Need to rollback Failed rows.
Need to keep continue the Program , need to commit successful rows.
Regards,
MARAN
Edited by: Maran on Aug 10, 2009 6:19 PM

Similar Messages

  • Rollback on transaction failes

    Hi,
    I have got a problem when I try to rollback a transaction using a JDBC driver, but I don't understand why. Maybe someone can help me.
    My problem is as follows:
    on a connection with AutoCommit set to true, I define some INSERT actions on a certain table. Hereafter I do a commitTransaction(). This generates a SQLException, which I catch. In this catch I do a connection.rollback(). This results in the following error:
    [SQLServer JDBC Driver]Not in local manual transaction mode
    Does anyone know what this means and what causes this?
    Regards,
    Onno Kievit

    Hi Onno,
    If you have enabled "auto commit", then you cannot call methods like "commit()" or "rollback()". After you have executed your INSERT, a "commit" automatically happens -- if the INSERT succeeds -- or a "rollback" automatically happens (if the INSERT fails). You are calling the "commit()" method when there is no open transaction -- which is wrong and therefore you get an error (SQLException).
    Same problem occurs when you catch the error caused by your "commit" and try to "rollback" -- you cannot "rollback" when there is no open transaction.
    As I see it, you have two choices:
    1. disable auto commit, or
    2. remove the calls to "commit()" and "rollback()"
    Hope this helps you.
    Good Luck,
    Avi.

  • Error log of failed transaction in csv format

    Hi All,
    I need to generate an error log of all failed transaction in .csv file. It needs to have the failed file name(that comes in xml) and the error. How do i do it?
    Thanks

    You should have an Error batch file being created that lists those transactions in error. If you have a particular piece of data that you want, you may have to add to the RCBDFDFL.DFD (the recipient batch DFD) file and then map the content to a GVM of the appropriate name.  But start by looking at the Error batch - assuming you don't have it set to NULL.  That isn't a CSV file, but is a plain ASCII file that you can probably read.

  • Java.sql.SQLException: Cannot rollback a transactional connection

    Hi
    This is what i am trying to do:
    try{
    conn = getConnection();
    conn.setAutoCommit(false);
    execQuery(sql_1);
    execQuery(sql_2);
    conn.commit();
    }catch(Exception ex){
    conn.rollback();
    i have made an error in sql_2 so i get an Exception. My queries use the same "conn" so the rollback should applay to the first query but it has made a commit. How do i get rollback to work?
    I read this in an other topic:
    Make sure that you configure your database connection in the jboss.jcml and not in the bean (or servlet) itself.
    Then, make a lookup via jndi. On this way, the driver gets bound to the transactionManager and the rollback() works finde.
    But i don�t know how to configure the connections, and how does the trasactionManager work.
    Can some one help me?

    Maybe i should ad that i am using Oracle db an the
    code is in a Entity BeanThis changes the way you want to do rollbacks. Rollbacks in ejbs are handled by the container. In order to do rollbacks, you need to flag the transaction as to be rolled back. To do this, you need to call the method setRollbackOnly() in the ejb's SessionContext - sessionContext.setRollbackOnly();
    For this to work correctly, you must declare the method in the ejb's deployment descriptor as requiring to handle transactions by specifying the appropriate value for the <tran-attribute> element of you ejb's dd.
    BTW, you'd be better off posting EJB related question in the J2EE SDK forum.

  • How can I rollback a transaction using EJBContext.rollbackOnly()?

    I failed to rollback a "required" method of a seesion bean using EJBContext.rollbackOnly() , but it rollbacked if I throw EJBException , how can I rollback a transaction by
    EJBContext.rollbackOnly() ? Thanks for your help.
    regards,
    dean

    The full and partial updates (whether it be Thunderbird, Firefox or SeaMonkey) from mozilla.org are only provided to the official builds and not builds built yourself or by a third-party.
    The openSUSE and other Linux distro provided builds have their own ways of package updates in their package manager.
    However if the poster is using Thunderbird for Linux from http://www.mozilla.org/en-US/thunderbird/ (64-bit Linux is on ftp) then those preferences would be valid and work.
    Nothing is being gutted as it has been this way since forever with third-party builds whether on Windows, Mac OSX and Linux.

  • Oracle driver error [-22] : rollback failed

    Hi friends
    Often this message is appearing in my application, without apparent reason: Oracle driver error [-22] : rollback failed
    Someone has some idea of what can be?
    Oracle 8i
    Thanks

    What kind of Oracle driver your application is using? Is it the same version as your Oracle server? In any event, you need to upgrade your server now, it's obsolete version and you can't get Oracle support on it.

  • Do I need to declare a transaction in this case?

    I am struggling to understand when it is necessary to declare my own transaction to ensure the data is properly updated.
    For example, in the following code, which is part of a java bean in the EJB project, KeyFacade is a stateless session bean tied to the entity "Key". it is a standard EJB created with the netBeans 5.5 wizard. I have changed no defaults.
    Do I need to declare a transaction, commit the transaction and close it when I use the "KeyFacade.edit(key);" in order to ensure the database is updated? Or is it automatically done because the .edit() method uses the entityManager and the persistence is container managed?
    Would it make a difference if this bean was part of a WAR project?
        public BigInteger getNextKey(String tableName){
            KeyFacadeLocal KeyFacade = this.lookupKeyFacade();
            Key key = KeyFacade.findByTablename(tableName);
            long nextKey = key.getKeyvalue();
            BigInteger BINextKey =BigInteger.valueOf((int)nextKey);
            //  now update the table by incrementing the key value by 1
            long incrementKey = nextKey + 1;
            key.setKeyvalue(incrementKey);
            KeyFacade.edit(key);
            return BINextKey;
        }

    808239 wrote:
    I have a Map<Integer, List<T>> data, and all the lists are initialized using Collections.synchronizedList().Seems like overkill to me. Your Map also looks like a Multimap, of which there are several existing implementations.
    When I do the traversal, I want to traverse ALL lists in the map at the same timeI suspect not. What you want to do is to traverse each one in sequence.
    so I have to sync all lists as shown in the API doc as follows: ...Seems like overkill to me, and will probably result in a very slow Map (not that there's any problem with that if it's the right thing to do; in this case, I suspect it isn't).
    Is this approach ok?What are you trying to achieve? If you need full consistency for your iterators (ie, a snapshot of the entire Map at the time the iterator is created), you have a two choices (assuming you don't want to deal with update journals):
    1. Lock the Map.
    2. Clone the Map (and your clone() method should be synchronized).
    Of the two, the second seems best to me, but neither is all that wonderful.
    However, if all you need is weak consistency - that is to say, what you return reflects the state of the Map when Iterator.next() is called - all you really need to do is make sure that your Lists are synchronized when you do the read.
    Since the List updates are the responsibility of your Map (I'm still presuming this is some sort of Multimap implementation), there's no real need to synchronize them; just synchronize the Map's own update methods.
    I'd also suggest that you make sure your getValue() method hands back an [url http://download.oracle.com/javase/6/docs/api/java/util/Collections.html#unmodifiableList%28java.util.List%29]unmodifiable List to clients; otherwise they could start adding or removing values themselves.
    HIH
    Winston

  • How to handle a failed transaction in Syclo Agentry SAP Work Manager 5.3

    Hello Experts,
    I have a transaction created on work order time entry.
    For some reason, when the transactions fails (when clicked on transmit button), the transmit stops as soon as the error is thrown from ECC.
    However, this transaction remains on the client and is not deleted.
    when a new transaction is created on another object and transmitted, it still retains the previously failed transaction and tried to transmit it again.
    Because of this, the transmit stops again and it fails.
    Is there anyway to remove a transaction which has failed already? What is the best way to handle such scenario.
    Thanks for the help!
    Best,
    Arihant Kothari
    Message was edited by: Michael Appleby

    Arihant,
    The Error handling within the application / editor does not have a one click type solution to just remove a pending transaction.   As Jason mentioned the behavior is to stop when an error occurred so the user can correct and continue.  In some cases this may mean removing the transaction through the removal of the associated object from the mobile device (clear option frequently) that when the object is cleared the associated transaction is also deleted allowing the pending transactions behind the current one to proceed.
    The editor allows for error handling steps to be defined to execute upon error so that potentially you could log the transaction data off to the side for handling later and then continue processing.  This of course requires there to be manual back office involvement monitoring the logged data for resolution and next steps.
    --Bill

  • I Need To Delete All Transactions and Balances From all Modules

    I Need To delete All Transactions From All Financial Modules (AP,Ar,Gl,Cm and FA)
    payables ( Delete All Invoices and Payment that validated and create accounting )
    Receivables ( Delete All Transactions and Receipts that completed and create accounting )
    Assets ( Delete All Asset Depreciation Amount )
    General Ledger ( Delete All Journals That Posted In General Ledger )
    I Need To Make This To Delete Any transaction Or Balances And Uploading Anew Balances and Journals
    Can I Make This By Purge and How Can I Do it ? Or any another Way ?
    Thanks,
    Mohamed Gamal
    Edited by: Mohamed Gamal on Sep 5, 2011 2:27 PM
    Edited by: Mohamed Gamal on Sep 5, 2011 2:28 PM

    Hello Mohamed.
    Each Application User's Guide (for AP, AR, GL, CM and FA) has a section dedicated to Archive and Purge process.
    Depending on the quantity of records you need to process perhaps you should consider other options like creating new organization(s), books, etc. and create only the desired open items in there.
    Octavio

  • Need to add Standard transaction code to User Menu.

    Hi All,
    I need to add Standard transaction code to User Menu. How this can be accomplished?
    Thanks

    Your Security and/or Basis team probably have control of the user menu settings.  On the other hand, if this is for YOUR user menu, you could choose to simply adjust your favorites.

  • Rollback a transaction in a session bean BMP?

    The following code would work correctly if executed in a stateless session bean BMP?
    InitialContext ic = new InitialContext();
    javax.sql.DataSource dataSource = (javax.sql.DataSource) ic.lookup("java:comp/env/jdbc/OracleDS");
    Connection conn = dataSource.getConnection();     
    conn.setAutoCommit(false);
    Statement stmt = conn.createStatement("UPDATE TABLE_A SET NAME = 'Duke' WHERE ID = 7");
    stmt.executeUpdate();
    if (someCondition) {
    conn.commit();
    } else {
    conn.rollback();
    My question:
    It�s possible to rollback a transaction using rollback() from Connection class in a stateless
    session bean BMP?

    Dear JDC member:
    With EJB, you can gain the benefit of transactions without performing any transaction programming. That is, your enterprise beans never explicitly issue a begin, commit, or abort statement. The container performs it to you. But you have to tell the container how to do it. As you might know, the deploment descriptor is the place for it.
    But nothing prevent you to do do programmatic transaction as you want.. For that case you have to know JTA (Java Transaction API) and more.
    Suppose the transaction aborts, you have to throw an exception back to the client or try it again. The issue here is with stateless sesssion beans, there is no in-memory conversational state. You might think to implement javax.ejb.SessionSynchronization interface with your business methods....
    You see there is a lot to know. You can take care of transactions in the client code, but it is a bad design.
    You have to understand today most application servers (Websphere, Weblogic...) are designed to minimize those issues in order to make developers' tasks easier. The container takes care of transactions.
    Be careful when you write stateless session beans BMP (BMP are for entiti beans)
    Regards,
    Armand Komenan

  • Deleting Failed Transactions in SAP B1if

    How can I delete transactions which have "failed" in processing through B1if?
    I attempted to delete one of the groups in the Unit of Measurement Groups which was already assigned to items in the B1 application.  This "error" then attempts to replicate to the other databases participating in the Intercompany Integration Solution (IIS).  Every time a new attempt is made ("error retry"), the transaction fails and generates a failure alert message. 
    I know that I can set the B1if to "never attempt to retry errors", but I would like to delete the message from the queue so that I can leave the retry setting at "retry errors every two hours". 
    I have tried to delete this failed transaction from the B1if queue without any luck thus far.  Does anybody know how to delete failed messages from the queue so that they will not attempt a "retry" and thus generate new failed alert message?

    Hi Jerry,
    You may delete transactions using Intercompany Integration Solution Message Log. The Message Log is a Web application that enables you to view log of Interbranch transactions. You can filter transaction logs by date and time ranges, sender system, or receiver system.
    You can access the message log Web application from the machine on which the Intercompany solution is installed, and by using Microsoft Internet Explorer.
    To delete the transaction from message queue you may follow the steps below on machine on which the Intercompany solution is installed:
    1. Open Start menu and choose Intercompany Administration Console icon.
        Logon Window appears.
    2. Enter your login credentials and Logon.
        Intercompany Administration Console appears.
    3. Navigate to Monitoring → Message Log, open the Message Log web application.
        On Message page, the upper frame of the window allows you to define a filter for the messages.
    4. Enter From date and To date in the respective filters, in Status dropdown menu select Failure and choose Display log.
        In Failure matrix, failed message that confine within above defined filters appears.
    5. Choose Delete Log.
        This deletes the log entries.
    For further details, you may also refer to Message Log section in Intercompany Solution User Guide.
    Regards,
    Agneesh Jain
    SAP Intercompany Team

  • Rollback per transaction issue

    hi
    i found in our live database Rollback per transaction: 92.86% how i can troubleshoot this value and what is the rezone and how i can solve it

    Hi,
    this is more likely to be an application issue, not a database one. I heard of webservers that do a rollback after each query (!), maybe it's one of them, or a similar error in the application design. I have also once come across a case when there was a great number of fake commits on the system (so called "readonly commits") which were caused by an internal Oracle bug. The problem was resolved by applying a patch -- so you may want to check MOS articles for similar symptoms.
    Best regards,
    Nikolay

  • Need help with Monthly Transaction By Hour Report

    Post Author: cbcombs
    CA Forum: General
    Hello,Newbie needs to write a transaction report that is grouped by days of the week for a calendar month. It will have one column for each day of the week and each of those columns will contain a whole months of week day data. Then it will be grouped by each hour of the day. It will contain the number of transactions for each hour. And then a weekly average of the number of transactions for each hour of the day. The week starts on a Monday and goes through Sunday. They are probably going to want the dollar amount of the transactions too. Below is an example with the first two rows of data populated. Monthly Transaction Report For August 2007                   Mon            Tue             Wed             Thu            Fri             Sat             Sun            Average08:00                0                2               2                1                10                    5                    2                      3.1409:00                    25                    3                    5                    4                  5                    8                    6                      4.43  10:00                    5011:00                  10012:00                 15013:00                  15013:00                   12514:00                  10015:00                    5016:00                     1017:00                       2 Any help would be appreciated. 

    Post Author: kbrinton
    CA Forum: General
    You could use the cross tab expert and set the columns to the day and the row to hours with it summing your transactions. So for the rows choose your date field and then choose Group options and have it set to "for each hour". Then the column choose your date field and have it set to "for each day".  Then have it summarize your transactions.
    Hope this helps!!

  • Need to add a Transaction in the SAP menu in the Given path

    Hi All,
    I need to add a transaction in the enhancement menu in the specified path.
    Kindly share the method.
    Thanks in Advance!
    Chirag Shah

    Hi ,
    Go to SE43 and give the AREA MENU , and press the create button and add the Tcode...
    Regards,
    Bharani

Maybe you are looking for

  • Problem in invoking a servlet from another PC

    hi i am trying to invoke a servlet running on apache tomcat 5.0.28 from another PC, my j2me wireless toolkit is on one PC and it runs a MIDlet that invokes a servlet on another PC, but am getting an exception connectionNotFound.... both the computers

  • How to go from ios 6 beta to ios 6 official

    Hey guys im already running the latest version of the iOS 6 Beta version on my developer iphone 4s 64 gb... Today the official iOS 6 release came out and im wondering if there is anyway i can upgrade to that without having to restore my phone... :| I

  • So does any Linux have a built in firewall?

    I hear that the Linux kernel has a firewall called iptables built in and working. How secure is it? Is it included with Arch by default? I am just wondering because there is a package called iptables in the repos...

  • No HDMI display after updating

    I updated my iPad 2 to IOS6 and now it does not display through HDMI, is anyone else having this problem?

  • Custom Workflow Approval Table

    What are some of critical fields that I would need if I were designing my workflow approvals to be based on a custom table?  I have a fairly limited understanding of the major data components that are being used for workflow so any input from the exp