Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2004
    Posts
    23

    Unanswered: ORA-12838 and transactions

    To ensure data integrity the following 2 actions must be performed within 1 transaction

    delete from IFASTACCOUNT a
    where exists (select * from IFASTACCOUNT_TMP t
    where a.env = t.env and a.accountnumber = t.accountnumber);

    insert into IFASTACCOUNT
    select *
    from IFASTACCOUNT_TMP;

    However I am getting the following error message

    Error: ORA-12838: cannot read/modify an object after modifying it in parallel
    ORA-06512: at line 1, Batch 1 Line 1 Col 1

    Can anyone suggest other way to ensure that no other user can view partially updated data until both the delete and insert have been carried out.

    many thanks

  2. #2
    Join Date
    Jul 2003
    Posts
    2,296
    lock the table?
    - The_Duck
    you can lead someone to something but they will never learn anything ...

  3. #3
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1

    Re: ORA-12838 and transactions

    Don't use parallel mode for the DELETE. Or if you have 9i consider using the MERGE statement instead of your 2 statements.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •