A row cannot be deleted because it has a dependent in a relationship whose delete rule is RESTRICT or NO ACTION, or because the deletion cascades to such a dependent. SQLSTATE is 23504.
The same code can occur for ALTER TABLE with ALTER PART ROTATE FIRST TO LAST when a DELETE RESTRICT constraint blocks reuse of the partition.
Typical causes
A parent row still has dependent rows in a table with a RESTRICT or NO ACTION delete rule.
A cascading delete reaches a dependent row that is protected by RESTRICT or NO ACTION.
A partition rotation cannot reuse the partition because of a DELETE RESTRICT referential constraint.
How to fix it
Examine the delete rule of all descendant tables.
Use the constraint name in the message to identify the tables involved, and the RID in the message to find the descendant row.
Remove or reassign the dependent rows first, or revisit the delete rule design.