重庆思庄Oracle、Redhat认证学习论坛
标题: 执行explain plan语句时报错ora-12838 [打印本页]
作者: denglj 时间: 2023-1-18 10:43
标题: 执行explain plan语句时报错ora-12838
问题描述:执行explain plan语句时报错ora-12838,如下所示:
HR@orcl150>insert /*+APPEND PARALLEL*/ into t_hr_20230117_new (id,time) select * fromt_hr_20230117;
86396rows created.
HR@orcl150>explain plan for insert /*+APPEND PARALLEL*/ into t_hr_20230117_new (id,time) select* from t_hr_20230117;
explainplan for insert /*+APPEND PARALLEL*/ into t_hr_20230117_new (id,time) select *from t_hr_20230117
*
ERROR atline 1:
ORA-12838:cannot read/modify an object after modifying it in parallel
异常原因:
在执行explainplan前的insert语句中用到并行模式插入数据到t_hr_20230117_new表,紧接着该表有用到下一个并行模式的语句里,此种情况需要先提交.
解决过程:
HR@orcl150>commit;
Commitcomplete.
HR@orcl150>explain plan for insert /*+APPEND PARALLEL*/ into t_hr_20230117_new (id,time)select * from t_hr_20230117;
Explained.
说明:如上所示,成功执行explainplan语句.
欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) |
Powered by Discuz! X3.2 |