As it was in the beginning, is now, and ever shall be, world without end.

Redo log 본문

Oracle/Admin

Redo log

송지헌 2017. 9. 19. 10:17

redo log : 데이터가 변경될 경우 변경후의 내용을 기록

 

 

 

v$log - status

current : 현재 쓰고있는 redo log file

active : 다 쓰거나, log switch가 발생하여 log file이 바뀌었는데 아직 예전 log file에 기록된 내용이 DB Buffer Cache에서 datafile로 저장되지 않은 상태

inactive : log file의 내용이 DB Buffer Cache에서 datafile로 저장된 상태

 

 

alert log에 checkpoing not complete 가 발생

 - online redo log file을 사용하려 할 때 사용 할 online redo log file이 없을 경우 나타나게 되며 이 때 DB의 모든 변경작업은 대기하게 됨

 

1) LGWR이 redo log file을 한바퀴도는 cycle을 지연시킨다

- redo log file 추가

- redo log file의 size 증가

2) Checkpoint를 자주 발생 시키지 않도록 한다.

- LOG_CHECKPOINT_INTERVAL의 값을 증가

- redo log file size 증가

 

Checkpoint : DBWR이 메모리상의 수정된 내용을 해당 datafile에 기록

- log switch 발생 시

- log_checkpoint_interval 간격(OS Block)마다 발생

- log_checkpoint_timeout 간격(초) 마다 발생

- alert system checkpoint 명령 시 발생

Log switch : online redo log에 기록하는 걸 중지하고 다른 그룹에 쓰게하는 Event

- alter system log switch

 

 

즐겨찾기에 추가하려면 누르십시오. 맨 아래로맨 아래로


In this Document

Goal
Solution
References


Applies to:

Oracle Database - Enterprise Edition - Version 8.1.7.4 to 11.2.0.0 [Release 8.1.7 to 11.2]
Information in this document applies to any platform.

Goal

This note provides the general guidelines for online redo log file size, you may see messages like below in alert log file if redo log size is not adequate :

Thread 1 cannot allocate new log, sequence XXX
Checkpoint not complete

Solution

An excerpt from the Oracle Database Performance Tuning Guide provides the general guideline.

"It may not always be possible to provide a specific size recommendation for redo log files, but redo log files in the range of a hundred megabytes to a few gigabytes are considered reasonable. Size your online redo log files according to the amount of redo your system generates. A rough guide is to switch logs at most once every twenty minutes."

So if your online redo logs (for example) switch once every 5 minutes during peak database activity, to achieve the 20 minute guideline, the logs would each need to be 4 times larger then their current size.  (i.e. 20 / 5 = 4)

In addition to above, if using fast_start_mttr_target, this SQL will return recommendation. (10g and up)

select optimal_logfile_size from v$instance_recovery;

References

NOTE:274264.1 - 10g New Feature: REDO LOGS SIZING ADVISORY
NOTE:602066.1 - How To Maintain and/or Add Redo Logs

 

[출처] - Oracle Metalink

 

 

 

 

 

 

'Oracle > Admin' 카테고리의 다른 글

Opatch  (0) 2018.05.15
통계정보  (0) 2017.09.21
undo tablespace  (0) 2017.09.15
shrink  (0) 2017.09.12
sql 연습용계정 unlock  (0) 2013.04.17
Comments