ORA-12838错误总结

ORA-12838: cannot read/modify an object after modifying it in parallel
此错误是在调用过程中出现的。经过查询,是由于在过程中使用了append insert运行后没有及时提交造成。对于此问题,确切的解释是这样的,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.
这样就清晰的多了,错误的原因是direct load,也就是前面的append insert。解决的办法就是在append insert后及时的commit。

及时修改过程,重新运行,就再没有此问题了。

Insert和append insert的原理上是完全不同的,insert append可以实现直接路径加载,速度比常规加载方式快很多。但有一点需要注意: insert append时在表上加“6”类型的Exclusive锁,即排它锁,为表级锁,会阻塞表上的所有DML语句。因此在有业务运行的上传环境下要慎重使用。
  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值