ORA-28117: integrity constraint violated – parent record not found ORACLE 报错 故障修复 远程处理

文档解释

ORA-28117: integrity constraint violated – parent record not found

Cause: try to update/insert a child record with new foreign key values, but the corresponding parent row is not visible because of fine-grained security in the parent.

Action: make sure that the updated foreign key values must also visible in the parent

官方解释

常见案例

一般处理方法及步骤

1. 用SELECT语句检查数据。

2. 检查与外键关联的表,确保外键记录总是存在,并且当你删除一条记录时,该外键不会造成完整性约束违反。

3. 确认使用的SQL语句,特别是INSERT语句是否正确。

4. 使用简单的的INSERT语句,就是在插入完善的记录而不是聚合表或子查询。这样可以避免插入无效的 记录,从而防止出现ORA-28117错误。

5. 同样,也可以通过简单的DELETE语句来避免完整性约束违反,这 也可以有效避免ORA-28117错误。


数据运维技术 » ORA-28117: integrity constraint violated – parent record not found ORACLE 报错 故障修复 远程处理