ORA-12051: ON COMMIT attribute is incompatible with other options
Cause: ON COMMIT refresh attribute, incompatible with other refresh options such as automatic periodic refresh, was specified.
Action: Specify only valid options.
ORA-12051: ON COMMIT attribute is incompatible with other options 表示ON COMMIT属性与其他选项(如INVISIBLE)不兼容。
ORA-12051: 不兼容的ON COMMIT属性
这是一个错误。它意味着您尝试在表上将参数VISIBLE和ON COMMIT交换,但Oracle 12c版本不支持这个操作。
此错误可能会随着在Oracle 12c上使用 CREATE INDEX 命令 触发:
CREATE INDEX my_index ON my_table (var1) VISIBLE ON COMMIT;
报错:ORA-12051: ON COMMIT attribute is incompatible with other options
解决此问题的正确方法是将VISIBLE语句从索引定义中删除:
CREATE INDEX my_index ON my_table (var1) ON COMMIT;