본문 바로가기
프로그래밍/데이터베이스 Oracle

oracle database) transaction 트랜잭션

by Cat Tool 2015. 12. 31.
반응형

*  transaction

-> 논리적인 작업단위

 

transaction 작업 예 

 T(start) - >

 

 

 

T(end)

update-;

insert -;

update-;

commit;

 

 T(start)-> 

 

 

T(end)

 delete-;

delete-;

rollback;

 

 T(Start&end)

 

create table   (DDL)

(autocommit)

 T(Start&end)

 

grant             (DCL)

(autocommit)

 T(start)

 

intsert

update

create table(DDL)(auto commit)

 

 

 transaction 관련 명령어

 명령어

의미 

 commit

 트랜잭션 작업 저장

 savepoint 이름

 트랜잭션 도중 저장지점 설정

 ROLLBACK

 commit을 하기전 트랜잭션 초기화

 ROLLBACK TO SAVEPOINT 이름

 savepoint로  돌아감

 

 

 

 

사용예

 

 

 

 

 

 

 

 

반응형