[oracle architecture][2015 04-03] redo & undo

Post on 17-Jul-2015

114 Views

Category:

Software

8 Downloads

Preview:

Click to see full reader

TRANSCRIPT

WareValleyhttp://www.WareValley.com

Database Audit and Protection [ DB 접근통제 ]

Database Encryption [ DB 암호화 ]

Database Vulnerability Assessment [ DB 취약점 분석 ]

Database SQL Query Approval [ DB 작업결재 ]

Database Performance Monitoring and Management [ DB 성능관리 및 개발 ]

WareValley

Oracle ArchitectureRedo & Undo

오렌지팀 윤석준 선임연구원

Database security and management, WareValley.http://www.WareValley.com

Redo Log

Data File과 Control File의 모든 변경 사항을 기록 -> Redo Log

Online Redo 기록

(1개 Active,

나머지 Stand-by)

Log Switching

(기존 Active가 Full,

Stand-by -> Active)

Backup to

Archived RedoStand-by

Database security and management, WareValley.http://www.WareValley.com

Use of Redo Log

Database Recovery : 물리적 Media fail 발생시

Archived Redo Log를 이용하여 복구

Cache Recovery : Cache 변경사항 Disk 기록 전

Instance가 비정상 종료된 경우

Fast Commit : Disk (Random Access)는 느려서, Redo

Log (Append) 에 기록 후 Commit 통보

Database security and management, WareValley.http://www.WareValley.com

Record of Redo Log

3초마다 DBWR Process로부터 신호를 받을 때

Log Buffer의 1/3이 차거나 1MB이상 기록되었을 때

Commit or Rollback

LGWR Process가 담당

- Redo Log Buffer에 먼저 기록 한 후 특정시점에 Redo Log File에 기록

Database security and management, WareValley.http://www.WareValley.com

Fast Commit Mechanism

http://bysql.net/index.php?document_srl=22748&mid=w201201O

Database security and management, WareValley.http://www.WareValley.com

Undo (=Rollback)

Transaction Rollback : Commit 하지 않고

Rollback한 경우

Transaction Recovery : Redo Log Cache

Recovery와 같이 활용

Read Consistency : Oracle의 읽기 일관성 구현

( 다른 DBMS (DB2,SQL Server, Sybase 등)은 Lcok으로 구현 )

Database security and management, WareValley.http://www.WareValley.com

Undo Segment

http://wiki.gurubee.net/display/STUDY/Undo

Transaction 별로 할당

Transaction ID [ USN# + Slot# + Wrap# ]

Transaction Status

Commit SCN

Last UBA (User Buffer Address)

Etc…

Undo Header

Insert : 추가된 Record의 rowid

Update : 변경된 Column의 before image

Delete : 지워진 Row의 before image

Undo Record

top related