IBM Support

LI73556: SQL0901 WITH REASON "DON'T KNOW HOW TO RESOLVE SIBLING CONFLICTS" DOING DELETE ON TABLE WITH FOREIGN KEY DESCENDANTS

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • You get this error:
    
     SQL0901N  The SQL statement failed because of a non-severe
     system error.
     Subsequent SQL statements can be processed.  (Reason "don't
     know how to
     resolve sibling conflicts".)  SQLSTATE=58004
    
    when you delete from a table if both of the following conditions
    are true:
    
     (1) More than one delete operation occurs on the same table
         (call it T2) within a single statement.
           In the example below:
             - a delete from T1 with 2 cascaded deletes (fk1 and
               fk2) on T2 will trigger this.
     (2) Table T2 has multiple cascade delete paths to a foreign key
         descendant (call it T3).  One such path contains a delete
         cycle.
           In the example below,
            - fk5 and fk6 forms a delete cycle
            - T2 has 2 cascade delete paths to T3 (fk4-fk5 vs fk3)
    
        T1
        ^^
        ||
     fk1||fk2
        ||
        T2
        ^ ^ fk3
        |  \
     fk4|  T3
        | /  \
        ||fk5 |fk6
         \\  /
           T4
    
    create table t1 (i1 int not null primary key, i2 int, i3 int);
    create table t2 (i1 int not null primary key, i2 int, i3 int);
    create table t3 (i1 int not null primary key, i2 int, i3 int);
    create table t4 (i1 int not null primary key, i2 int, i3 int);
    
    alter table t2 add foreign key fk1 (i2) references t1 on delete
    cascade;
    alter table t2 add foreign key fk2 (i3) references t1 on delete
    cascade;
    
    alter table t3 add foreign key fk3 (i2) references t2 on delete
    cascade;
    alter table t4 add foreign key fk4 (i2) references t2 on delete
    cascade;
    
    alter table t3 add foreign key fk5 (i3) references t4 on delete
    cascade;
    alter table t4 add foreign key fk6 (i3) references t3 on delete
    cascade;
    
    -- delete from T1 will cause 2 cascaded delete on T2
    delete from t1;
    

Local fix

  • Remove or modify one of the foreign key constraints so that the
    conditions under which the error occurs are not true.  For
    example, use a delete rule other than CASCADE.
    

Problem summary

  • Users affected:
    Users of DB2 9 for Linux, UNIX and Windows
    
    
    Problem Description:
    You might get error SQL0901N with
    Reason "don't know how to resolve sibling conflicts"
    when you delete from a table which is the target of a
    foreign key constraints.
    
    
    Problem Summary:
    You get this error:
    
     SQL0901N  The SQL statement failed because of a non-severe
     system error.
     Subsequent SQL statements can be processed.  (Reason "don't
     know how to
     resolve sibling conflicts".)  SQLSTATE=58004
    
    when you delete from a table if both of the following conditions
    are true:
    
     (1) More than one delete operation occurs on the same table
         (call it T2) within a single statement.
           In the example below:
             - a delete from T1 with 2 cascaded deletes (fk1 and
               fk2) on T2 will trigger this.
     (2) Table T2 has multiple cascade delete paths to a foreign key
         descendant (call it T3).  One such path contains a delete
         cycle.
           In the example below,
            - fk5 and fk6 forms a delete cycle
            - T2 has 2 cascade delete paths to T3 (fk4-fk5 vs fk3)
    
        T1
        ^^
        ||
     fk1||fk2
        ||
        T2
        ^ ^ fk3
        |  \
     fk4|  T3
        | /  \
        ||fk5 |fk6
         \\  /
           T4
    
    create table t1 (i1 int not null primary key, i2 int, i3 int);
    create table t2 (i1 int not null primary key, i2 int, i3 int);
    create table t3 (i1 int not null primary key, i2 int, i3 int);
    create table t4 (i1 int not null primary key, i2 int, i3 int);
    
    alter table t2 add foreign key fk1 (i2) references t1 on delete
    cascade;
    alter table t2 add foreign key fk2 (i3) references t1 on delete
    cascade;
    
    alter table t3 add foreign key fk3 (i2) references t2 on delete
    cascade;
    alter table t4 add foreign key fk4 (i2) references t2 on delete
    cascade;
    
    alter table t3 add foreign key fk5 (i3) references t4 on delete
    cascade;
    alter table t4 add foreign key fk6 (i3) references t3 on delete
    cascade;
    
    -- delete from T1 will cause 2 cascaded delete on T2
    delete from t1;
    

Problem conclusion

  • First fixed in DB2 LUW 9, Fix Pack 6
    

Temporary fix

  • Remove or modify one of the foreign key constraints so that the
    conditions under which the error occurs are not true.  For
    example, use a delete rule other than CASCADE.
    

Comments

APAR Information

  • APAR number

    LI73556

  • Reported component name

    DB2 UDE ESE LIN

  • Reported component ID

    5765F4104

  • Reported release

    910

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2008-06-24

  • Closed date

    2008-11-10

  • Last modified date

    2008-11-10

  • APAR is sysrouted FROM one or more of the following:

    LI73555

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    DB2 UDE ESE LIN

  • Fixed component ID

    5765F4104

Applicable component levels

  • R910 PSN

       UP

  • R950 PSN

       UP

[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SSEPGG","label":"DB2 for Linux- UNIX and Windows"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"910","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
15 October 2021