ORA-12825: explicit degree of parallelism must be specified here
Cause: the DEGREE option was omitted from an ALTER DATABASE RECOVER command.
Action: respecify with an explicit degree of parallelism.
ORA-12825: explicit degree of parallelism must be specified here错误是由于使用CREATE INDEX无法指定并行级别而触发的,此时Oracle不能正确创建索引。
ORA-12825的官方解释是,它指示用户应显式指定需要创建索引的索引并行级别,这是CREATE INDEX语句中一个必填参数,如果没有显式指定,则创建索引将失败。
常见的ORA-12825错误案例是在CREATE INDEX语句中缺少索引并行级别选项:
CREATE INDEX IDX_TEST1 ON TEST (COL_A, COL_B);
要解决ORA-12825错误,需要在CREATE INDEX语句中向参数添加PARALLEL参数,以指定索引并行程度,同时必须在CREATE TABLE语句中指定一个高的PCTFREE:
CREATE INDEX IDX_TEST1 ON TEST (COL_A, COL_B) PARALLEL 4;
ALTER TABLE TEST PCTFREE 20;