ORA-08118: Deferred FK constraints cannot be enforced, index too big (string) ORACLE 报错 故障修复 远程处理

文档解释

ORA-08118: Deferred FK constraints cannot be enforced, index too big (string)

Cause: Deferred Foreign Key constraints cannot be enforced due to the index key being too big and built on a non-default DB_BLOCK_SIZE.

Action: First try to drop the Foreign Key and then the primary key.

这是Oracle系统抛出的一个常见错误,指示数据库无法维护一个外键约束因为它的索引太大。此错误出现在外键定义为不可延迟(Deferred)的时候,而数据库在处理foreign key的时候,会把它们默认为deferred即可延迟风格,这样引起就会引发该错误消息。

官方解释

常见案例

正常处理方法及步骤

1. 查询此索引的大小

2. 更改单个表中每个索引的最大大小

3. 使用ALTER TABLE的ENABLE NOVALIDATE参数来重建索引

4. 将外键连接设置为一致,以确保可以强制执行其约束

5. 使用VALIDATE参数重新启用约束


数据运维技术 » ORA-08118: Deferred FK constraints cannot be enforced, index too big (string) ORACLE 报错 故障修复 远程处理