생계/OERR2017. 9. 21. 17:34

INSERT /*+ append */ INTO AAA SELECT /*+ parallel(A 8) full(A) */ * FROM BBB;

 

SELECT COUNT(*) FROM AAA;

append 로 insert 하고 select 를 하면 ora-12838 에러가 난다.

 

 

[oracle@ora01:/ORACLE]$oerr ora 12838

12838, 00000, "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.

 

 

rollback을 하던지 commit 을 해야함..

 

append 나 parallel 로 수정을 하는 트랜잭션은 작업 끝나면 commit 이나 rollback으로 트랜잭션을 

완료를 해야 수정한 부분에 대해서 조회나 DML 작업이 가능함.

 

 

 

 

 

 

 

 

반응형
Posted by 돌고래트레이너