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

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.
在开发过程中已经遇到过几次这种情况了,原因是为减少重做日志的产生并且直接追加到高水位线之后以此来提高性能,使用了append+nologging来insert数据,此时数据库会对表加一个排他锁,那么同一事务中如果要对执行了/*+append*/操作的表进行DML操作,就会出现如上错误。所以要记得及时commit;

你可能感兴趣的:(oracle,parallel)