Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2003

    Unanswered: Child record found error--on an *insert*?!?

    While trying to populate a development instance with some production data, I got this error as follows:

    1 insert into subscription_component_master
    2 select * from subscription_component_master@smsprd
    3* where gl_period='2003011'
    SQL> /

    12536 rows created.

    SQL> commit;
    ERROR at line 1:
    ORA-02091: transaction rolled back
    ORA-02292: integrity constraint (SMS.SUBSCRIPTION_COM_MST_SRVC_FKEY) violated - child record found

    How is it even possible to get this sort of error on an insert? Is there any way to force the commit?

  2. #2
    Join Date
    Sep 2003
    Virginia, USA
    The error code means you are tring to delete a row from a parent table that is mapped to one or more rows in one or more child tables. Since your trans type is INSERT, I wonder if you have any triggers on that table. Or do you have any other SQL in the same transaction, such as a TRUNCATE before your INSERT?

  3. #3
    Join Date
    Nov 2003
    Bangalore, INDIA

    Thumbs up


    The distributed transaction is assigned to the system rollback segment and is trying to get into the prepared state, but the required number of non-PREPARED slots are not available, so the transaction is rolled back. If the transaction aborted at a remote site, only ORA-02091 will be seen. If the transaction aborted at the host site, then both ORA-02091 andORA-02092 will be seen.

    Complete the current transaction and then do the operation required.

Posting Permissions

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