본문 바로가기

Oracle/Oracle testing

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

* 대량 배치작업에서 해당 오류 발생 프로시저가 더이상 진행를 하지 못하고 스톱되었다.
* 여기저기 찾아보니 append insert 한 데이터는 바로 읽지를 못한다고 하는데.....

* 실험
-- 테이블 하나를 만들고..
create table ttt1 (idx number);

-- 페러럴로 데이터를 쳐넣어봅시다.
insert /*+ append parallel(2) */ into ttt1 select level from dual connect by level <= 100000

-- commit 하지 않고 바로 조회
select *from ttt1;

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

생각지도 않은 대량의 데이터 처리 작업에서 commit을 하지 않고 트랜잭션이 끝나고 그결과에 따라서
commit / rollback 을 하려했는데 문제가 있다.

임시테이블같은곳에 넣고 작업을 해서 처리완료.