ITPub博客

首页 > 数据库 > Oracle > ORA-12838: cannot read/modify an object after modifying it in parallel

ORA-12838: cannot read/modify an object after modifying it in parallel

原创 Oracle 作者:renjixinchina 时间:2014-04-02 16:43:10 0 删除 编辑

官方解释如下:

ORA-12838 cannot read/modify an object after modifying it in parallel
Cause: Within the same transaction, an attempt was made to add read or modification statements on a table after it had been modified in parallel or with direct load. This is not permitted.
Action: Rewrite the transaction, or break it up into two transactions: one containing the initial modification and the second containing the parallel modification operation


如果使用了

insert /*+ append */ into table as select .. from table 

后没有提交或者回滚该事物,再次在该事物中什么查询或者DML都会报错

如使用循环插入,批量提交的时候,建议取消append 提交

 

示例:

SQL> create table test1 as select * from dba_objects;

 

Table created

SQL> insert /*+append*/ into test1 select * from dba_objects where rownum<100;

 

99 rows inserted

SQL> select /*+parallel(a 13)*/ count(*) from test1 a;

 

select /*+parallel(a 13)*/ count(*) from test1 a

 

ORA-12838 cannot read/modify an object after modifying it in parallel

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15747463/viewspace-1134815/,如需转载,请注明出处,否则将追究法律责任。

下一篇: ORA-600 3705 错误
请登录后发表评论 登录
全部评论

注册时间:2011-01-30

  • 博文量
    373
  • 访问量
    2061297