重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 932|回复: 0
打印 上一主题 下一主题

[Oracle] 执行explain plan语句时报错ora-12838

[复制链接]
跳转到指定楼层
楼主
发表于 2023-1-18 10:43:42 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
问题描述:执行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语句.

分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-25 09:38 , Processed in 0.078384 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表