Log switch checkpoint
Hello
Assume I have two redologs.
Log1-->current
Log2->inactive
After log switch, it becomes.
log1 -->active
log2-->current
The thing is after log switch; checkpoint must be issued and the log1 should be inactive. Why does it show active?
If I manually issue
"alter system checkpoint"
Log1 becomes inactive immeidately.
Mathias Delgado wrote:
Mr sb;
I have also read some other docs.
Please confirm wheter my understanding is correct.
After alter system switch logfile, checkpoint is initiated, not finished.
However when I issue,
"alter system checkpoint"
Checkpoint is issued immediately and therefore the status is of redolog is changed from active to inactive immediately.No , your understanding is incorrect.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 65 52428800 1 YES INACTIVE
2254888 25-JUN-09
2 1 66 52428800 1 YES INACTIVE
2279864 26-JUN-09
3 1 67 52428800 1 NO CURRENT
2300530 27-JUN-09
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
2300531
2300531
2300531
2300531
2300531
2300531
2300531
2300531
8 rows selected.
SQL> alter system checkpoint;
System altered.
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
2302787
2302787
2302787
2302787
2302787
2302787
2302787
2302787
8 rows selected.
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 65 52428800 1 YES INACTIVE
2254888 25-JUN-09
2 1 66 52428800 1 YES INACTIVE
2279864 26-JUN-09
3 1 67 52428800 1 NO CURRENT
2300530 27-JUN-09
SQL> alter system checkpoint;
System altered.
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 65 52428800 1 YES INACTIVE
2254888 25-JUN-09
2 1 66 52428800 1 YES INACTIVE
2279864 26-JUN-09
3 1 67 52428800 1 NO CURRENT
2300530 27-JUN-09
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
2302798
2302798
2302798
2302798
2302798
2302798
2302798
2302798
8 rows selected.
SQL> alter system switch logfile;
System altered.
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
2302798
2302798
2302798
2302798
2302798
2302798
2302798
2302798
8 rows selected.
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 68 52428800 1 NO CURRENT
2302807 27-JUN-09
2 1 66 52428800 1 YES INACTIVE
2279864 26-JUN-09
3 1 67 52428800 1 YES ACTIVE
2300530 27-JUN-09
SQL> alter system checkpoint;
System altered.
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 68 52428800 1 NO CURRENT
2302807 27-JUN-09
2 1 66 52428800 1 YES INACTIVE
2279864 26-JUN-09
3 1 67 52428800 1 YES INACTIVE
2300530 27-JUN-09
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
2302817
2302817
2302817
2302817
2302817
2302817
2302817
2302817
8 rows selected.
SQL>What you see here, can you try to interpret it?
Alter checkpoint command merely pushes the writing and gets the checkpointing write complete. Its only the log switch which is going to do a complete checkpoint. Active means that the checkpointing for that group is started. The time perilod for which you see this status would depend on the size of the redo log file and also the contents that are there in it when it was switched. After checkpoining is complete for this group, the file be completely empty and would be marked as inactive.
HTH
Aman....
Similar Messages
-
Log switch and checkpoint - Oracle 11g
Hi
I've read a documentations and forum, but I can't find clean explanation. I'd like to ask - does switch log trigger checkpoint? I've heard, that from 8i version checkpoint doesn't occur on log switch, but can't find information
in documentation.
Thanks awfully for help.
Regardsbefore 8i , logfile switch caused full checkpoint
8i and above , logfile switch no longer causes full checkpoint , it causes a "log switch checkpoint"
A log switch checkpoint write the contents of "some" dirty buffers to the disk -
Redo Log Switch 결과...
환경 : 8.1.7.3.0 (no archive log 모드)
log_checkpoint_timeout = 0
log_checkpoint_interval = 999999999
redo log size = 200M
현재 check point는 log switch 상태에서만 가능하도록 설정된 것 같습니다.
거래량이 적어서 그런지 log switch는 30시간 주기입니다.
제가 실행한 것은 아래 4번째 로그가 current일때
alter system checkpoint를 하고 조금 있다가..
alter system switch logfile를 하여 1번째가 current가 된 상황입니다.
3/16일 14시 까지도 계속 active상태입니다...
1. 문제가 생긴건지요??? 도움부탁합니다...
2. no archive log mode에서도 switch 주기를 줄이는 것이 복구에 도움이 되나요...?
===========================================
STATUS , FIRST_CHANGE#,FIRST_TIME
CURRENT , 8846777646687,2007-03-15 16:57:55
INACTIVE, 8846777587798,2007-03-14 10:34:40
INACTIVE, 8846777609448,2007-03-14 17:17:38
ACTIVE , 8846777643690,2007-03-15 16:01:22no archivemode에서 정상복구를 바라는 것인지요?
잘못된 정책이란 생각이 듭니다.
no archive mode에서 v$log의 first_change# 중에 가장 작은 것
이 v$recover_file의 change# 보다 크거나 같다면 복구불능입니다.
배치작업이라도 있어서 log switch가 한번의 cycle을 돌게 되면 이전
백업으로는 복구불능입니다. archive mode로 지금 바로 바꾸시지요..
log_checkpoint_timeout은 checkpoint에 대한 timeout 시간값을
지정하는 것입니다.
LOG_CHECKPOINT_INTERVAL specifies the frequency of checkpoints in terms of the number of redo log file blocks that can exist between an incremental checkpoint and the last block written to the redo log. This number refers to physical operating system blocks, not database blocks.
checkpoint는 아시는 바와 같이 데이터파일과
리두로그 컨트롤파일의 SCN을 일치시키는 것입니다. 주요한 것은
DBWR프로세스가 데이터파일에 write를 하겠구요.
물론 checkpoint와 인스턴스 복구는 관련이 있습니다. checkpoint timeout을
적당히주면 instance recovery에서 좀 더 빠르게 instance 복구후 DB가
open되겠습니다. 만약 설정하신대로 하신다면 DB를 abort로
내리고 open하게 되면
instance recovery시에 더 많은 시간이 필요하겠습니다.
게다가 트랜잭션으로 인한 log switch하는 시간이 30시간보다
작다면 timeout을 준들 영향을 주지 않겠지요. redo log가 꽉
차게 되면 log switch를 자동으로 하게 되는데 log switch를
하기전에 checkpoint를 주게 되어 있으니까요.
그런데 checkpoint와 물리적/논리적 복구와는 다른 개념입니다.
checkpoint는 위에서 말씀드린 instance recovery와 관련이 있고
물리적/논리적 복구에서는 archive file이 떨어져 있는가 current redo log가
존재하는가에 따라서 복구가능여부를 결정되는 것이지요..
그리고 ACTIVE 상태라는 것은 문서상의 정의에서는 archive mode일 경우
archiving이 되는 중일 경우, 그리고 이 상태는 complete recovery시에 redo log
적용시 필요한 정보가 있다는 것입니다.
no archive mode에서 복구정책을 적용 하겠다는 것은 위험한 발상인 것 같습니다.
물론 DSS시스템의 경우에는 이미 정책을 no archive mode로
만들어두고 주말마다 offline backup을 하기도 합니다.
하지만 DSS에서는 하루에 300번 이상의 log switch가 일어나는
경우가 있을 정도이니 아무리 백업이 되어 있다 한들 완전복구는
불능이겠지요. offline backup을 했을 때까지만 복구가 됩니다.
$LOG
This view contains log file information from the control files.
Column Datatype Description
GROUP#
NUMBER
Log group number
THREAD#
NUMBER
Log thread number
SEQUENCE#
NUMBER
Log sequence number
BYTES
NUMBER
Size of the log (in bytes)
MEMBERS
NUMBER
Number of members in the log group
ARCHIVED
VARCHAR2(3)
Archive status (YES |NO)
STATUS
VARCHAR2(16)
Log status:
UNUSED - Online redo log has never been written to. This is the state of a redo log that was just added, or just after a RESETLOGS, when it is not the current redo log.
CURRENT - Current redo log. This implies that the redo log is active. The redo log could be open or closed.
ACTIVE - Log is active but is not the current log. It is needed for crash recovery. It may be in use for block recovery. It might or might not be archived.
CLEARING - Log is being re-created as an empty log after an ALTER DATABASE CLEAR LOGFILE statement. After the log is cleared, the status changes to UNUSED.
CLEARING_CURRENT - Current log is being cleared of a closed thread. The log can stay in this status if there is some failure in the switch such as an I/O error writing the new log header.
INACTIVE - Log is no longer needed for instance recovery. It may be in use for media recovery. It might or might not be archived.
no archive mode에서도 복구하는 여러가지 방법들이 있기는 합니다.
예를들어 current redo log가 깨졌을 때에 recovery 방법이라던지
등등이 문서에 있긴하지요. 하지만 no archivemode에서 백업을 붓고
복구하는 방법은 찾아보기 힘드실 것입니다. 위에서도 말씀드렸듯이
no archive mode에서
v$recover_file의 CHANGE# > v$logl의 minimum FIRST_CHANGE# 이면 데이터파일은 복구가능합니다.
그러나 CHANGE# <= minimum FIRST_CHANGE# 이면 복구 불가능합니
다. 그러니 백업을 붓고 복구를 하는 방법에 대한 문서는 거의
찾기 힘듭니다. advance 방법에 대한 문서에서만 adjust_scn을 쓴다던지 하는 등이 나와있을 뿐입니다.
글 수정:
민천사(민연홍)
아무래도 졸면서 썼나봅니다.;;
interval과 timeout은 엄연히 다른데요. 왜 timeout과 interval을
혼동했는지..;;
LOG_CHECKPOINT_INTERVAL specifies the frequency of checkpoints in terms of the number of redo log file blocks that can exist between an incremental checkpoint and the last block written to the redo log. This number refers to physical operating system blocks, not database blocks.
LOG_CHECKPOINT_TIMEOUT specifies (in seconds) the amount of time that has passed since the incremental checkpoint at the position where the last write to the redo log (sometimes called the tail of the log) occurred. This parameter also signifies that no buffer will remain dirty (in the cache) for more than integer seconds. -
Log file switch (checkpoint not complete)
HI,
I am using Oracle 9.2 on rhel
IN the statspack report I am getting one of the event I.e log file switch (checkpoint not complete).Statspack duration is about 1.5 hrs...any suggestion
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 99.97 Redo NoWait %: 98.31
Buffer Hit %: 95.84 In-memory Sort %: 100.00
Library Hit %: 99.57 Soft Parse %: 98.51
Execute to Parse %: 72.70 Latch Hit %: 99.71
Parse CPU to Parse Elapsd %: 53.15 % Non-Parse CPU: 99.10
Shared Pool Statistics Begin End
Memory Usage %: 93.66 93.74
% SQL with executions>1: 60.41 60.94
% Memory for SQL w/exec>1: 60.89 61.66
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
log file switch (checkpoint incomplete) 35,936 35,100 42.81
enqueue 6,144 16,684 20.35
buffer busy waits 17,190 13,346 16.28
wait for a undo record 51,967 4,931 6.01
ARCH wait on SENDREQ 877 4,813 5.87
-------------------------------------------------------------Please find the whole stats[pack report
{code}
STATSPACK report for
DB Name DB Id Instance Inst Num Release Cluster Host
ICAI 1504443695 icai 1 9.2.0.8.0 NO icaidb.icai.
org
Snap Id Snap Time Sessions Curs/Sess Comment
Begin Snap: 70 04-Aug-10 14:27:14 162 34.7
End Snap: 73 04-Aug-10 15:30:43 254 55.4
Elapsed: 63.48 (mins)
Cache Sizes (end)
~~~~~~~~~~~~~~~~~
Buffer Cache: 4,928M Std Block Size: 8K
Shared Pool Size: 1,312M Log Buffer: 1,024K
Load Profile
~~~~~~~~~~~~ Per Second Per Transaction
Redo size: 96,260.76 53,769.94
Logical reads: 13,998.20 7,819.20
Block changes: 1,227.83 685.85
Physical reads: 592.13 330.76
Physical writes: 19.93 11.13
User calls: 313.12 174.91
Parses: 31.41 17.55
Hard parses: 0.47 0.26
Sorts: 11.61 6.49
Logons: 0.11 0.06
Executes: 115.04 64.26
Transactions: 1.79
% Blocks changed per Read: 8.77 Recursive Call %: 26.28
Rollback per transaction %: 5.43 Rows per Sort: 472.17
Instance Efficiency Percentages (Target 100%)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Buffer Nowait %: 99.97 Redo NoWait %: 98.31
Buffer Hit %: 95.84 In-memory Sort %: 100.00
Library Hit %: 99.57 Soft Parse %: 98.51
Execute to Parse %: 72.70 Latch Hit %: 99.71
Parse CPU to Parse Elapsd %: 53.15 % Non-Parse CPU: 99.10
Shared Pool Statistics Begin End
Memory Usage %: 93.66 93.74
% SQL with executions>1: 60.41 60.94
% Memory for SQL w/exec>1: 60.89 61.66
Top 5 Timed Events
~~~~~~~~~~~~~~~~~~ % Total
Event Waits Time (s) Ela Time
log file switch (checkpoint incomplete) 35,936 35,100 42.81
enqueue 6,144 16,684 20.35
buffer busy waits 17,190 13,346 16.28
wait for a undo record 51,967 4,931 6.01
ARCH wait on SENDREQ 877 4,813 5.87
Wait Events for DB: ICAI Instance: icai Snaps: 70 -73
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
log file switch (checkpoint 35,936 35,886 35,100 977 5.3
enqueue 6,144 5,660 16,684 2716 0.9
buffer busy waits 17,190 5,325 13,346 776 2.5
wait for a undo record 51,967 49,137 4,931 95 7.6
ARCH wait on SENDREQ 877 0 4,813 5489 0.1
log file switch (archiving n 3,705 3,653 3,600 972 0.5
db file sequential read 600,718 0 621 1 88.1
log file sync 6,826 140 561 82 1.0
log file parallel write 7,052 0 421 60 1.0
log buffer space 1,361 16 230 169 0.2
db file scattered read 289,115 0 212 1 42.4
switch logfile command 116 23 160 1377 0.0
wait for stopper event to be 1,924 1,111 123 64 0.3
control file parallel write 1,355 0 63 46 0.2
PX Deq: Txn Recovery Start 1,253 0 36 29 0.2
SQL*Net break/reset to clien 560 0 20 36 0.1
local write wait 18 15 17 918 0.0
log file switch completion 21 7 9 442 0.0
control file sequential read 237,021 0 6 0 34.8
log file sequential read 437 0 6 13 0.1
BFILE get length 297 0 2 7 0.0
latch free 485 67 2 4 0.1
BFILE read 1,023 0 1 1 0.2
log file single write 18 0 0 16 0.0
SQL*Net more data to client 13,785 0 0 0 2.0
process startup 10 0 0 9 0.0
control file single write 10 0 0 4 0.0
row cache lock 34 0 0 0 0.0
db file single write 1 0 0 14 0.0
LGWR wait for redo copy 89 0 0 0 0.0
PX Deq: Signal ACK 3 0 0 4 0.0
PX Deq: Join ACK 5 0 0 1 0.0
BFILE open 106 0 0 0 0.0
db file parallel read 25 0 0 0 0.0
async disk IO 1,383 0 0 0 0.2
db file parallel write 255 0 0 0 0.0
BFILE internal seek 1,023 0 0 0 0.2
direct path read 843 0 0 0 0.1
BFILE closure 106 0 0 0 0.0
undo segment extension 844 844 0 0 0.1
direct path write 96 0 0 0 0.0
SQL*Net message from client 1,188,764 0 445,926 375 174.3
virtual circuit status 125 125 3,660 29277 0.0
wakeup time manager 86 86 2,451 28506 0.0
PX Idle Wait 755 750 1,466 1941 0.1
jobq slave wait 60 60 176 2930 0.0
SQL*Net more data from clien 3,035 0 1 0 0.4
SQL*Net message to client 1,188,882 0 1 0 174.3
Wait Events for DB: ICAI Instance: icai Snaps: 70 -73
-> s - second
-> cs - centisecond - 100th of a second
-> ms - millisecond - 1000th of a second
-> us - microsecond - 1000000th of a second
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
Background Wait Events for DB: ICAI Instance: icai Snaps: 70 -73
-> ordered by wait time desc, waits desc (idle events last)
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
ARCH wait on SENDREQ 877 0 4,813 5489 0.1
buffer busy waits 2,164 1,176 1,184 547 0.3
log file parallel write 7,052 0 421 60 1.0
wait for stopper event to be 1,924 1,111 123 64 0.3
control file parallel write 1,301 0 57 44 0.2
enqueue 393 0 10 26 0.1
control file sequential read 234,452 0 6 0 34.4
log file sequential read 431 0 6 13 0.1
db file scattered read 124 0 1 10 0.0
log buffer space 40 0 1 13 0.0
log file single write 15 0 0 20 0.0
db file sequential read 20 0 0 9 0.0
process startup 7 0 0 8 0.0
latch free 19 3 0 2 0.0
LGWR wait for redo copy 89 0 0 0 0.0
PX Deq: Signal ACK 3 0 0 4 0.0
PX Deq: Join ACK 5 0 0 1 0.0
db file parallel write 255 0 0 0 0.0
async disk IO 793 0 0 0 0.1
rdbms ipc reply 1 0 0 0 0.0
direct path read 88 0 0 0 0.0
direct path write 88 0 0 0 0.0
rdbms ipc message 50,357 3,296 16,467 327 7.4
pmon timer 1,271 1,251 3,653 2874 0.2
smon timer 64 0 2,302 35963 0.0
SQL ordered by Gets for DB: ICAI Instance: icai Snaps: 70 -73
-> End Buffer Gets Threshold: 10000
-> Note that resources reported for PL/SQL includes the resources used by
all SQL statements called within the PL/SQL code. As individual SQL
statements are also reported, it is possible and valid for the summed
total % to exceed 100
CPU Elapsd
Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value
5,652,833 456 12,396.6 10.6 20.04 1062.67 285625578
SELECT /*+ INDEX(OT_DAK_ENTRY_DETL IDM_DED_NAME) */DEH_TXN_CODE
,DEH_NO FROM OT_DAK_ENTRY_HEAD,OT_DAK_ENTRY_DETL WHERE DEH_SY
S_ID = DED_DEH_SYS_ID AND TRUNC(DEH_APPLICATION_DT) = :b1 AND
DED_DAK_CODE = :b2 AND DED_NAME LIKE LTRIM(RTRIM(:b3)) || '%'
AND NVL(DED_INSTR_NO,'XXXXXX') = NVL(:b4,'XXXXXX') AND TRUNC(
5,096,348 189 26,964.8 9.6 23.64 23.25 1772835295
select decode(level,1,'',2,' ',3,' ',4,' ',5,'
', ' ') || decode(:1,'ENG',menu_option_desc,menu_opt
ion_desc_bl) "OPTION", menu_parent_id "PARENT", menu_action_type
"TYPE",menu_action "ACTION", decode(level,1,'',2,' ',3,' ',4,'
',5,' ', ' ') ||decode(menu_action_type, 'M', '+', 'o'
4,894,185 96 50,981.1 9.2 7.89 10.11 23088203
INSERT INTO OT_MEM_FEE_COL_DETL(MFCD_FEE_TYPE,MFCD_CONDON_FEE_YN
,MFCD_EXCESS_USED_YN,MFCD_CONDN_CODE,MFCD_PM_CODE,MFCD_CURR_CODE
,MFCD_INSTR_NO,MFCD_INSTR_DT,MFCD_AMT,MFCD_BANK_CODE,MFCD_INSTR_
TYPE,MFCD_BRANCH,MFCD_COLLECTION,MFCD_FM_DT,MFCD_TO_DT,MFCD_RES_
CODE,MFCD_CR_UID,MFCD_CR_DT,MFCD_UPD_UID,MFCD_UPD_DT,MFCD_CONDON
4,885,684 152 32,142.7 9.2 7.64 8.87 1007886847
SELECT MIN(MFCH_NO) FROM OT_MEM_FEE_COL_HEAD, OT_MEM_FEE_COL_DET
L WHERE MFCH_SYS_ID = MFCD_MFCH_SYS_ID AND MFCH_REF_NO = :B4 AND
MFCH_REF_TXN_CODE = :B3 AND MFCD_INSTR_NO = :B2 AND MFCD_BANK_C
ODE = :B1 AND MFCD_AMT > 0
2,680,356 446 6,009.8 5.0 95.57 125.49 197211170
SELECT /*+ INDEX(OT_STUDENT_FEE_COL_IPCC_HEAD OT_STUDENT_FEE_COL
IPCCHEAD_UK01) */SFCH_SYS_ID,SFCH_DT,DECODE(NVL(SSTN_SRN,SFCH
TEMPREF_NO),SSTN_SRN, NULL ,SFCH_TEMP_REF_NO) SFCH_TEMP_REF_NO
,NVL(SFCH_STUD_SRN,SSTN_SRN) SFCH_STUD_SRN,SFCH_COURSE_CODE,SFCH
SCHEMECODE,SFCH_EXMP_STUD_YN,SFCH_EXMP_STUD_REASON,DEH_APPLICA
2,288,204 1 2,288,204.0 4.3 54.31 59.36 3103356680
DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate;
broken BOOLEAN := FALSE; BEGIN BEGIN /*Quest SOO PPCM job */ qu
est_ppcm_snapshot_pkg.take_snapshot; END; :mydate := next_date;
IF broken THEN :b := 1; ELSE :b := 0; END IF; END;
2,253,877 1 2,253,877.0 4.2 52.70 56.21 579012758
DELETE FROM QUEST_PPCM_SQL_TEXT TXT WHERE INSTANCE_ID >= 0 AND N
OT EXISTS (SELECT 1 FROM QUEST_PPCM_SQL_SNAPSHOT SNAP WHERE SNAP
.SNAPSHOT_ID > 0 AND SNAP.INSTANCE_ID= TXT.INSTANCE_ID AND SNAP.
SQL_ID = TXT.SQL_ID)
1,656,006 24 69,000.3 3.1 10.00 24.26 4081782417
SELECT PISH_COURSE_CODE FROM OV_STU_PAYINSLIP_IPCC_DTL WHERE
PISH_BANK_CODE = :b1 AND PISH_NO BETWEEN :b2 AND :b3 AND PISD_
CURR_CODE = :b4 AND PISH_REGION_CODE = :b5 ORDER BY 1
SQL ordered by Gets for DB: ICAI Instance: icai Snaps: 70 -73
-> End Buffer Gets Threshold: 10000
-> Note that resources reported for PL/SQL includes the resources used by
all SQL statements called within the PL/SQL code. As individual SQL
statements are also reported, it is possible and valid for the summed
total % to exceed 100
CPU Elapsd
Buffer Gets Executions Gets per Exec %Total Time (s) Time (s) Hash Value
1,567,946 12 130,662.2 2.9 21.99 47.39 1585476974
SELECT NVL(TO_CHAR(A.DEH_APPLICATION_DT,'DD/MM/RRRR'), NULL ),NV
L(TO_CHAR(A.DEH_DT,'DD/MM/RRRR'), NULL ) FROM OT_DAK_ENTRY_HEA
D A,OT_DAK_ENTRY_DETL B,OT_FIRM_NAME_APPR_HEAD C WHERE A.DEH_SY
S_ID = B.DED_DEH_SYS_ID AND B.DED_DAK_SYS_ID = C.FNAH_DED_SYS_I
D AND C.FNAH_SYS_ID = (SELECT MAX(B.FNAH_SYS_ID) FROM OT_FIR
1,216,226 4 304,056.5 2.3 9.90 54.25 937031003
SELECT TRIM(STUD_SRN)
Q1_REGNO, TR
IM(STUD_TEMP_REF_NO)
Q1_TEMPNO, STUD_TITLE
1,138,801 178 6,397.8 2.1 18.13 1009.80 1617597
SELECT SRN,ACTIVITYDESCRIPTION,STATUS,DOCUMENTNO,DOCUMENTDATE FR
OM OV_ART_TRANS_STATUS WHERE (SRN=:1) order by DOCUMENTDATE
1,029,221 230 4,474.9 1.9 20.27 20.76 1838125769
SELECT MRH_DT,MRH_FIRST_NAME,MRH_MIDDLE_NAME,MRH_SUR_NAME,MRH_ST
ATUS FROM OM_MEM_REG_HEAD WHERE DECODE(:b1,1,MRH_MRN,MRH_MFCH
TEMPREF_NO) = :b2
778,949 52 14,979.8 1.5 20.32 21.85 4142254844
SELECT LTRIM(RTRIM(DECODE(TIT_NAME,'MR.','CA.','MS.','CA.','MRS.
','CA.') || ' ' || MRH_FIRST_NAME || ' ' || MRH_MIDDLE_NAME
|| ' ' || MRH_SUR_NAME || ' ' || DECODE(MRH_APPR_UID, NULL ,
NULL ,DECODE(MRH_MEM_STATUS,2, NULL ,DECODE(MRH_FELLOW_STATUS_YN
,'Y','FCA','ACA'))) || DECODE(MRH_RESI_STATUS,'A','
755,893 517 1,462.1 1.4 90.43 89.07 1033584013
SELECT DECODE(MFCD_FEE_TYPE,'M08',1,'M05',2,'M06',3,'M09',4,'M10
',5,'M11',6,'M12',7,'M07',8,'M13',9,'M14',10,'M15',11,'M04',12,'
M03',13,'M02',14,'M01',15,'M21',16,'M22',17,'M23',18,'EXCESS',19
,20) FEE_SEQ,MFCD_FEE_TYPE FEE_TYPE,SUM(MFCD_AMT) AMOUNT FROM
OT_MEM_FEE_COL_HEAD,OT_MEM_FEE_COL_DETL WHERE MFCH_SYS_ID = MFC
751,010 1,090 689.0 1.4 28.61 31.41 1734754400
SELECT ROWID,PIIPD_ICAI_EXAM_APPEARED,PIIPD_REG_NO,PIIPD_MTH,PII
PD_YR,PIIPD_ROLL_NO,PIIPD_EXT_EXAM_APPEARED,PIIPD_EXAM_CODE_1,PI
IPD_SUBJ_CODE_1,PIIPD_GROUP_1,PIIPD_ROLL_NO_1,PIIPD_LAST_PAPER_D
T_1,PIIPD_EXAM_CODE_2,PIIPD_SUBJ_CODE_2,PIIPD_GROUP_2,PIIPD_ROLL
SQL ordered by Reads for DB: ICAI Instance: icai Snaps: 70 -73
-> End Disk Reads Threshold: 1000
CPU Elapsd
Physical Reads Executions Reads per Exec %Total Time (s) Time (s) Hash Value
227,513 2 113,756.5 10.1 22.04 79.36 2837394537
SELECT STUD_SRN,STUD_FIRST_NAME,STUD_MIDDLE_NAME,STUD_MAIDEN_NAM
E,STUD_SURNAME,STUD_FATHER_NAME,STUD_BIRTH_DT,STUD_COMM_CODE,STU
D_SEX,STUD_HANDICAPPED_YN,STUD_HANDICAPPED_REASON,STUD_LANG_CODE
,STUD_NATIONALITY_CODE,STUD_EMAIL,STUD_PERMNT_ADDR_LINE_1,STUD_P
ERMNT_ADDR_LINE_2,STUD_PERMNT_ADDR_LINE_3,STUD_PERMNT_ADDR_LINE_
220,939 12 18,411.6 9.8 21.99 47.39 1585476974
SELECT NVL(TO_CHAR(A.DEH_APPLICATION_DT,'DD/MM/RRRR'), NULL ),NV
L(TO_CHAR(A.DEH_DT,'DD/MM/RRRR'), NULL ) FROM OT_DAK_ENTRY_HEA
D A,OT_DAK_ENTRY_DETL B,OT_FIRM_NAME_APPR_HEAD C WHERE A.DEH_SY
S_ID = B.DED_DEH_SYS_ID AND B.DED_DAK_SYS_ID = C.FNAH_DED_SYS_I
D AND C.FNAH_SYS_ID = (SELECT MAX(B.FNAH_SYS_ID) FROM OT_FIR
198,343 2 99,171.5 8.8 5.82 46.25 1414719916
UPDATE OM_MEM_REG_HEAD SET MRH_MRN=:b1 WHERE MRH_SYS_ID = :b2
198,343 2 99,171.5 8.8 5.81 46.10 1414796677
UPDATE OT_DAK_ACTV_HISTORY SET DAH_REG_NO = :B1 WHERE DAH_REG_NO
= :B3 AND TRUNC(DAH_ACTV_ED_DT ) <= TRUNC(:B2 ) AND DAH_ACTV_ST
ATUS = 'C'
173,892 2 86,946.0 7.7 13.85 16.34 3262067067
SELECT STUD_SRN,STUD_FIRST_NAME,STUD_MIDDLE_NAME,STUD_MAIDEN_NAM
E,STUD_SURNAME,STUD_FATHER_NAME,STUD_BIRTH_DT,STUD_COMM_CODE,STU
D_SEX,STUD_HANDICAPPED_YN,STUD_HANDICAPPED_REASON,STUD_LANG_CODE
,STUD_NATIONALITY_CODE,STUD_EMAIL,STUD_PERMNT_ADDR_LINE_1,STUD_P
ERMNT_ADDR_LINE_2,STUD_PERMNT_ADDR_LINE_3,STUD_PERMNT_ADDR_LINE_
112,038 9 12,448.7 5.0 9.23 10.14 2058267852
SELECT ROWID,STUD_DT,STUD_TXN_CODE,STUD_NO,STUD_AMD_NO,STUD_REF_
FROM,STUD_REF_TXN_CODE,STUD_REF_NO,STUD_TEMP_REF_NO,STUD_SRN,STU
D_TITLE,STUD_STATUS,STUD_FIRST_NAME,STUD_MIDDLE_NAME,STUD_SURNAM
E,STUD_MAIDEN_NAME,STUD_NAME_STATUS,STUD_FATHER_NAME,STUD_NATION
ALITY_CODE,STUD_NATION_PROOF_ENCL_YN,STUD_SEX,STUD_HANDICAPPED_Y
102,583 1 102,583.0 4.5 4.51 285.99 802587273
SELECT ROWID,DEH_DT,DEH_TXN_CODE,DEH_NO,DEH_AMD_NO,DEH_REF_FROM,
DEH_REF_TXN_CODE,DEH_REF_NO,DEH_REF_SYS_ID,DEH_REGION_CODE,DEH_A
PPLICATION_DT,DEH_DOC_STATUS,DEH_STATUS,DEH_PRINT_STATUS,DEH_CLO
STATUS,DEHSYS_ID,DEH_COMP_CODE,DEH_ACNT_YR,DEH_AMD_DT,DEH_AMD_
UID,DEH_AMD_RES_CODE,DEH_REF_FROM_NUM,DEH_CR_UID,DEH_CR_DT,DEH_U
98,825 3 32,941.7 4.4 6.70 6.66 2078892348
/*SELECT STUD_SRN
Q1_RE
GNO, O_GET_OLD_REG_NO(STUD_SRN, :BP_COURSE) OLD_NO, TIT_NAME||'
'||STUD_FIRST_NAME||' '||STUD_MIDDLE_NAME||' '||STUD_SURNAME
Q1_NAME, LTRIM(RTRIM(A.STUD_CORRES_ADDR_LINE_1 ))||DECO
96,187 2 48,093.5 4.3 10.78 16.53 3301514821
SELECT MFCD_PAYIN_SLIP_NO MFCD_PAYIN_SLIP_NO
, DECODE(MFCD_BANK_CODE ,'ICI',1,2) ICI_FIRST
, DECODE(MFCD_INSTR_TYPE,'S',1,'L
SQL ordered by Reads for DB: ICAI Instance: icai Snaps: 70 -73
-> End Disk Reads Threshold: 1000
CPU Elapsd
Physical Reads Executions Reads per Exec %Total Time (s) Time (s) Hash Value
',2,'O',3,4) TYPE_FIRST , MFCD_PAYIN_SLIP_DT , FM_BANK
.BANK_NAME , BAD_ADDR1 ADD1
80,683 4 20,170.8 3.6 9.90 54.25 937031003
SELECT TRIM(STUD_SRN)
Q1_REGNO, TR
IM(STUD_TEMP_REF_NO)
Q1_TEMPNO, STUD_TITLE
77,972 8 9,746.5 3.5 8.92 8.84 2241526944
SELECT ROWID,STUD_DT,STUD_TXN_CODE,STUD_NO,STUD_AMD_NO,STUD_REF_
FROM,STUD_REF_TXN_CODE,STUD_REF_NO,STUD_TEMP_REF_NO,STUD_SRN,STU
D_TITLE,STUD_STATUS,STUD_FIRST_NAME,STUD_MIDDLE_NAME,STUD_SURNAM
E,STUD_MAIDEN_NAME,STUD_NAME_STATUS,STUD_FATHER_NAME,STUD_NATION
ALITY_CODE,STUD_NATION_PROOF_ENCL_YN,STUD_SEX,STUD_HANDICAPPED_Y
75,667 3 25,222.3 3.4 3.34 25.09 3345305231
SELECT DISTINCT SFCH_STUD_SRN FROM OT_STUDENT_FEE_COL_HEAD A,O
T_STUDENT_FEE_COL_DETL B WHERE B.SFCD_SFCH_SYS_ID = A.SFCH_SYS_
ID AND B.SFCD_INSTR_BANK_CODE = :b1 AND B.SFCD_INSTR_NO = :b2
72,658 52 1,397.3 3.2 20.32 21.85 4142254844
SELECT LTRIM(RTRIM(DECODE(TIT_NAME,'MR.','CA.','MS.','CA.','MRS.
','CA.') || ' ' || MRH_FIRST_NAME || ' ' || MRH_MIDDLE_NAME
|| ' ' || MRH_SUR_NAME || ' ' || DECODE(MRH_APPR_UID, NULL ,
NULL ,DECODE(MRH_MEM_STATUS,2, NULL ,DECODE(MRH_FELLOW_STATUS_YN
,'Y','FCA','ACA'))) || DECODE(MRH_RESI_STATUS,'A','
48,619 3 16,206.3 2.2 4.19 4.11 496772197
SELECT ROWID,STUD_DT,STUD_TXN_CODE,STUD_NO,STUD_AMD_NO,STUD_REF_
FROM,STUD_REF_TXN_CODE,STUD_REF_NO,STUD_TEMP_REF_NO,STUD_SRN,STU
D_TITLE,STUD_STATUS,STUD_FIRST_NAME,STUD_MIDDLE_NAME,STUD_SURNAM
E,STUD_MAIDEN_NAME,STUD_NAME_STATUS,STUD_FATHER_NAME,STUD_NATION
ALITY_CODE,STUD_NATION_PROOF_ENCL_YN,STUD_SEX,STUD_HANDICAPPED_Y
48,063 230 209.0 2.1 20.27 20.76 1838125769
SELECT MRH_DT,MRH_FIRST_NAME,MRH_MIDDLE_NAME,MRH_SUR_NAME,MRH_ST
ATUS FROM OM_MEM_REG_HEAD WHERE DECODE(:b1,1,MRH_MRN,MRH_MFCH
SQL ordered by Executions for DB: ICAI Instance: icai Snaps: 70 -73
-> End Executions Threshold: 100
CPU per Elap per
Executions Rows Processed Rows per Exec Exec (s) Exec (s) Hash Value
38,614 38,614 1.0 0.00 0.00 1741347688
SELECT SYSDATE FROM SYS.DUAL
12,490 12,488 1.0 0.00 0.00 2614155871
SELECT DECODE(:b1,'L',DECODE(:b2,'ENG',STATUS_NAME,STATUS_BL_NAM
E),DECODE(:b2,'ENG',STATUS_SHORT_NAME,STATUS_BL_SHORT_NAME)) STA
TUS_DESC,STATUS_FRZ_FLAG_NUM FROM OM_STATUS WHERE STATUS_CODE
= :b4
8,629 8,628 1.0 0.00 0.00 1644340447
SELECT DECODE(:b1,'L',DECODE(:b2,'ENG',FEE_TYPE_NAME,FEE_TYPE_BL
NAME),DECODE(:b2,'ENG',FEETYPE_SHORT_NAME,FEE_TYPE_BL_SHORT_NA
ME)) FEE_NAME,FEE_TYPE_FRZ_FLAG_NUM FROM OM_FEE_TYPE WHERE FE
E_TYPE_CODE = :b4
7,275 7,272 1.0 0.00 0.34 3716207873
update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,
order$=:6,cache=:7,highwater=:8,audit$=:9,flags=:10 where obj#=:
1
6,293 6,283 1.0 0.00 0.00 2804237544
SELECT DECODE(:b1,'L',DECODE(:b2,'ENG',CITY_NAME,CITY_BL_NAME),D
ECODE(:b2,'ENG',CITY_SHORT_NAME,CITY_BL_SHORT_NAME)) CITY_NAME,C
ITY_TALUK_CODE,CITY_DIST_CODE,CITY_STATE_CODE,CITY_REGION_CODE,C
ITY_FRZ_FLAG_NUM FROM OM_CITY WHERE CITY_CODE = :b4
6,221 6,221 1.0 0.00 0.00 484036617
SELECT DAH_SYS_ID.NEXTVAL FROM DUAL
6,221 6,221 1.0 0.00 0.00 2945494810
SELECT COUNT(DAH_SYS_ID) FROM OT_DAK_ACTV_HISTORY WHERE DAH_ACTV
TYPE = :B2 AND DAHTXN_SYS_ID = :B1
5,979 5,979 1.0 0.00 0.00 35936114
SELECT STUD_DOC_STATUS FROM OM_STUDENT_HEAD WHERE STUD_SYS_ID
= :b1
4,637 4,637 1.0 0.00 0.00 1237293873
SELECT DECODE(:b1,'L',DECODE(:b2,'ENG',COU_NAME,COU_BL_NAME),DEC
ODE(:b2,'ENG',COU_SHORT_NAME,COU_BL_SHORT_NAME)) COU_NAME,COU_FR
Z_FLAG_NUM FROM OM_COUNTRY WHERE COU_CODE = :b4
4,404 1,276 0.3 0.00 0.00 1829426463
SELECT NVL(TAU_FROM_VALUE,0), NVL(TAU_TO_VALUE,0) FROM IM_TXN_AU
TH_USER WHERE TAU_TA_TYPE = :B3 AND TAU_TXN_CODE = :B2 AND TAU_A
UTH_UID = :B1
4,220 4,220 1.0 0.00 0.00 1006906503
UPDATE OT_DAK_ACTV_HISTORY SET DAH_ACTV_ED_DT = :B3 , DAH_ACTV_S
TATUS = 'C' WHERE DAH_ACTV_TYPE = :B2 AND DAH_TXN_SYS_ID = :B1
3,874 66 0.0 0.00 0.00 4284733339
SELECT TIT_NAME ||' '|| AR_FIRST_NAME||' '||AR_MIDDLE_NAME||' '|
|AR_SUR_NAME FROM OT_ARTICLE_REGISTRATION, OM_TITLE WHERE TRIM(A
SQL ordered by Executions for DB: ICAI Instance: icai Snaps: 70 -73
-> End Executions Threshold: 100 -
Log file switch (checkpoint incomplete)
hello,
Lately, I have a lot of update/delete work on my OLTP production database. Generally this database is heavy loaded with much inserts especially at the daytime so I do my work at nights :) However, this work cause some contention. I have run AWR raport and I see "log file switch (checkpoint incomplete)" on a second place in wait events. I have a six redo log groups, each file 400MB, redo log buffer 12MB, mttr 0, checkpoint interval 0 and checkpoint timeout 1800 so checkpoints are usually "made by" log switches. Normally I have 2-5 switches per hour, but when I am doing my work it's abut 15-20 switches/hour. Can I speed it up by resizing redo files or by adding more groups ? I don't have test environment to test it so I am wondering if somone has experiense with that?
thanks
10gr2, linuxHi Helter,
i have expirienced the same problem only with smaller log files and 3 groups, the solution you suggested helped me solve the issue, eversince i don't have any "checkpoint incomplete" error masaages in the alert log file.
i have enlarged each group to be 100 mb (initially was 50 mb) and added 2 more groups.
hope this solution will help you too.
dBarak -
Nor more Checkpoints at every log-switch in 10.2 ?
Hi,
i working with Oracle about 12 years but i havn´t seen this before:
REM There is no work/application in the database now:
select group#,status from v$log;
GROUP# STATUS
1 CURRENT
2 ACTIVE
4 ACTIVE
5 ACTIVE
6 ACTIVE
First as i know only one or two (for a short time) shiould be active.
OK wait 90 seconds:
SQL> /
GROUP# STATUS
1 CURRENT
2 ACTIVE
4 ACTIVE
5 ACTIVE
6 ACTIVE
Try a log switch:
alter system switch logfile;
SQL> select group#,status from v$log;
GROUP# STATUS
1 ACTIVE
2 CURRENT
4 ACTIVE
5 ACTIVE
6 ACTIVE
How can i now drop one of the redo-logs ?
=> Solution:
alter system checkpoint;
select group#,status from v$log;
GROUP# STATUS
1 INACTIVE
2 CURRENT
4 INACTIVE
5 INACTIVE
6 INACTIVE
Does anybody know what Oracle changed here ?
Thanks in advance
Marcohi,
welcome to Oracle10g:
show paramater FAST_START_MTTR_TARGET
if it is '0', then auto-checking-pointing is DISABLED, this happens to be the default on Oracle XE (under review)
By default, Oracle 10g supports automatic checkpoint tuning by making the best effort to write out SGA buffer cache dirty buffers w/o impacting the throughput of runtime physical I/O, thus achieving reasonable crash recovery time.
Setting the FAST_START_MTTR_TARGET parameter to a non-zero value or not setting this parameter enables automatic checkpoint tuning. The STATISTICS_LEVEL must be TYPICAL OR ALL. After a period of time, see V$MTTR_TARGET_ADVICE for various value for this parameter. -
I would like to know if when a redo log is filled, the new redo log can be written in parallel with the chekpoint.
Or simply, what's the sequence for log switching:
1 - redo log is filled -> checkpoint -> new log writes. or
2 - redo log is filled -> checkpoint/new log writes (in parallel)
Best Regards,
Rogerio C. Schreiner
nullI'm tempted to say 'don't worry about it', because L_C_T has been deprecated since 9i: instead use FAST_START_MTTR_TARGET to control the rate of checkpointing.
But that aside, L_C_T essentially says: "if a block was dirtied (changed) by a transaction whose redo was generated more that X seconds ago -where X is the number of seconds LCT is set to- then that block will be flushed to disk the next time DBWR wakes up on the '3 second rule'"
L_C_INTERVAL means something similar: "If a block was dirtied by a transaction whose redo can be found in the redo log more than Y redo blocks away from the current checkpoint marker, where Y is the setting for LCI, flush it next time DBWR wakes up"
A checkpoint does not always result in a log switch, but a log switch always results in a checkpoint.
You can't really answer your third question, because the LCT parameter doesn't mean "Every 1800 seconds, flush everything to disk" (as it used to in version 8.0). But if a block was dirtied more than 1800 seconds ago, it will be a candidate for flushing to disk next time DBWR wakes up. But that doesn't tell us when a log switch will occur: that will only happen when the redo log fills up and we have to switch to the next log to keep going. I can't tell anything about the size of your logs or the rate at which they will fill up from the parameters you list.
A parameter does exist which will force a log switch every so often. It's called ARCHIVE_LAG_TARGET, and it's set to a number of seconds. If that was set to 1800, I could say with confidence that you'd log switch every half hour. But that's not what you had in your question, of course!
You might care to read this slightly more technical description of the parameters:
http://www.jlcomp.demon.co.uk/faq/log_checkpoint.html
(though I think Jonathan's timelines are wrong, because the change to the effect of the parameters came in with 8i).
Message was edited by:
howardjr -
Checkpoint _change# &&log switch
Hey
When I issue alter system switch logfile a checkpoint must be issued and therefore checkpoint change # of the datafiles should be incremented.
However sometimes checkpoint change # of the datafiles doesnt change after the log switch....
Why?
ie:
SQL> select substr(name,1,50) fname,checkpoint_change#,last_change#,status
from v$datafile;
FNAME
CHECKPOINT_CHANGE# LAST_CHANGE# STATUS
C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
219513 SYSTEM
C:\ORACLEXE\ORADATA\XE\UNDO.DBF
219513 ONLINE
C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
219513 ONLINE
FNAME
CHECKPOINT_CHANGE# LAST_CHANGE# STATUS
C:\ORACLEXE\ORADATA\XE\USERS.DBF
219399 219399 OFFLINE
SQL> alter system switch logfile;
System altered.
select substr(name,1,50) fname,checkpoint_change#,last_change#,status
from v$datafile;
FNAME
CHECKPOINT_CHANGE# LAST_CHANGE# STATUS
C:\ORACLEXE\ORADATA\XE\SYSTEM.DBF
219513 SYSTEM
C:\ORACLEXE\ORADATA\XE\UNDO.DBF
219513 ONLINE
C:\ORACLEXE\ORADATA\XE\SYSAUX.DBF
219513 ONLINE
FNAME
CHECKPOINT_CHANGE# LAST_CHANGE# STATUS
C:\ORACLEXE\ORADATA\XE\USERS.DBF
219399 219399 OFFLINEALTER SYSTEM SWITCH LOGFILE may take some time to complete its job. if you wait a couple of seconds after each statement to switch log, it looks OK:
SQL> select * from v$version;
BANNER
Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
PL/SQL Release 10.2.0.1.0 - Production
CORE 10.2.0.1.0 Production
TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
NLSRTL Version 10.2.0.1.0 - Production
SQL> select log_mode from v$database;
LOG_MODE
NOARCHIVELOG
SQL> select file#, checkpoint_change# from v$datafile;
FILE# CHECKPOINT_CHANGE#
1 758989
2 758989
3 758989
4 758989
5 758989
SQL>
SQL> alter system switch logfile;
Système modifié.
SQL> host pause
Appuyez sur une touche pour continuer...
SQL> select file#, checkpoint_change# from v$datafile;
FILE# CHECKPOINT_CHANGE#
1 758994
2 758994
3 758994
4 758994
5 758994
SQL> alter system switch logfile;
Système modifié.
SQL> host pause
Appuyez sur une touche pour continuer...
SQL> select file#, checkpoint_change# from v$datafile;
FILE# CHECKPOINT_CHANGE#
1 758996
2 758996
3 758996
4 758996
5 758996
SQL> alter system switch logfile;
Système modifié.
SQL> host pause
Appuyez sur une touche pour continuer...
SQL> select file#, checkpoint_change# from v$datafile;
FILE# CHECKPOINT_CHANGE#
1 758998
2 758998
3 758998
4 758998
5 758998
SQL>
SQL> -
Cannot allocate new log, sequence Checkpoint not complete
Hi,
Im having very frequent log switches and Im getting error as
" cannot allocate new log, sequence Checkpoint not complete"
I was having 3 redo log groups with 50 MB each. After I found this error in the alert log; I increased teh number of redo log groups to 6 with 50MB each. Still the issue is not getting resolved.
Please suggest what will be the best solution for this.
Following is a snippet from alertlog.
==================================================
Sun Apr 19 09:14:08 2009
Thread 1 advanced to log sequence 5811
Current log# 2 seq# 5811 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
Thread 1 cannot allocate new log, sequence 5812
Checkpoint not complete
Current log# 2 seq# 5811 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
Sun Apr 19 09:14:18 2009
Thread 1 advanced to log sequence 5812
Current log# 3 seq# 5812 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
Thread 1 cannot allocate new log, sequence 5813
Checkpoint not complete
Current log# 3 seq# 5812 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
Thread 1 advanced to log sequence 5813
Current log# 1 seq# 5813 mem# 0: /u01/app/oracle/oradata/mview/redo01.log
Thread 1 cannot allocate new log, sequence 5814
Checkpoint not complete
Current log# 1 seq# 5813 mem# 0: /u01/app/oracle/oradata/mview/redo01.log
Sun Apr 19 09:14:32 2009
Thread 1 advanced to log sequence 5814
Current log# 2 seq# 5814 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
Thread 1 cannot allocate new log, sequence 5815
Checkpoint not complete
Current log# 2 seq# 5814 mem# 0: /u01/app/oracle/oradata/mview/redo02.log
Thread 1 advanced to log sequence 5815
Current log# 3 seq# 5815 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
Thread 1 cannot allocate new log, sequence 5816
Checkpoint not complete
Current log# 3 seq# 5815 mem# 0: /u01/app/oracle/oradata/mview/redo03.log
Sun Apr 19 09:14:44 2009
=========================================================
Regards
PratheejAnand... wrote:
Hi Sir,
Although i too had suggested increasing the redo logfile size, but after going through [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:69012348056] i was little confused as Tom has mentioned
Another way is to make the log files smaller, hence increasing the frequency with which we checkpoint ---- Can you explain why so.
I was a little surprised when I read that posting - but noticed it was dated May 2000 - when databases were still quite small and less busy. (And Tom suggested 25MB as being "modest" rather than "tiny" - which is probably what many people would call 25MB these days). And May 2000 probably means 8.0 or 8.1 - and the whole log buffer, redo generation, checkpointing technology has changed a lot since then.
Basically, if you hit "checkpoint not complete", you need more online log space so that it's possible during the busiest times to keep generating redo log information while the checkpoint queues are being cleared far enough to allow older log files to be recycled.
You can do this by adding more log files, or by increasing the sizes of the log files you use. Tom's point, I think, was that if you chose the option to add more files and kept them small (or even made them smaller) then the volume of dirty data blocks that you could create while filling a log file would be small, so the database writer wouldn't have to do much work to make each log file available for re-use. (I'm not sure I'd agree with the approach, though - even for 8i - because it could easily lead to an increase in the volume of datablocks written, even if it did bypass the checkpoint issue).
Regards
Jonathan Lewis
http://jonathanlewis.wordpress.com
http://www.jlcomp.demon.co.uk
"For every expert there is an equal and opposite expert."
Arthur C. Clarke -
Forcing log switch every minute.
Hi,
I want to force a log switch every one minute how can i do it?
What should be the value of fast_start_mttr_target?
Does a checkpoint force a log switch?
Do i need to only reduce the size of redo log to a small size?
How can i make sure that a log switch will happen after a particular time period for ex. 1Minute,2 minute.
I want to force a log switch every minute because i want to send the archive redo log to standby database so that not more than 1 minute changes in database are lost. I am using 10g R2 on windows 2003 server.
I am unable to find a solution. Any help?Hi,
I want to force a log switch every one minute how
can i do it? yes with archive_lag_target parameter
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/onlineredo.htm#sthref934
What should be the value of fast_start_mttr_target?incremental or normal checkpoint "fast instance recovery/downtime concerned" introduced from oracle 8, this feature is enabled with the initialization parameter FAST_START_MTTR_TARGET in 9i.
fast_start_mttr_target to database writer tries to keep the number of dirty blocks in the buffer cache low enough to guarantee rapid recovery in the event of a crash. It frequently updates the file headers to reflect the fact that there are not dirty buffers older than a particular SCN.
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmtunin004.htm#sthref1110
Does a checkpoint force a log switch? log switch force to checkpoint ,checkpoint never force to log switch.
Do i need to only reduce the size of redo log to a
small size?depends yours SLA how far you can risk the data ,but it will effect yours database performance ,recommended to set the size of log which should imply the log swtich after filling to 20 mins,its a trade off risk vs perofrmance.
How can i make sure that a log switch will happen
after a particular time period for ex. 1Minute,2
minute.
want to force a log switch every minute because i
want to send the archive redo log to standby database
so that not more than 1 minute changes in database
are lost. I am using 10g R2 on windows 2003 server.
am unable to find a solution. Any help?
http://download.oracle.com/docs/cd/B19306_01/server.102/b14231/onlineredo.htm#sthref934Khurram -
Log switch must occur every 15 to 30 minutes: good practice or myth?
I often heard that it is recommended to size redo log files in a way that Oracle performs a log switch every 15 to 30 minutes.
I would like to know if it is true or if it is a myth ?
I would like to know the best way for sizing redo log files ?
What happen exactly in the database when a log switch occurs ?
Please help me to clarify these concepts.So we can say that a log switch induces a full checkpoint. That's correct ?Well, no :-) . Indeed with a log switch the checkpoint event is generated requesting DBWR to flush the buffers from the checkpoint-queue to the data files but this is not a full checkpoint and it would not update the datafile and control file headers. The Full Checkpoint happens with the alter system checkpoint ( as shown) , database being shutdown properly.
Please see the below code which shows the same,
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
3507400
3507400
3507400
3507400
3507400
3507400
3507400
7 rows selected.
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 91 52428800 1 NO CURRENT
3507399 13-APR-10
2 1 89 52428800 1 NO INACTIVE
3486253 13-APR-10
3 1 90 52428800 1 NO INACTIVE
3486256 13-APR-10
SQL> alter system switch logfile;
System altered.
SQL> select * from V$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS
FIRST_CHANGE# FIRST_TIM
1 1 91 52428800 1 NO ACTIVE
3507399 13-APR-10
2 1 92 52428800 1 NO CURRENT
3507906 13-APR-10
3 1 90 52428800 1 NO INACTIVE
3486256 13-APR-10
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
3507400
3507400
3507400
3507400
3507400
3507400
3507400
7 rows selected.
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
3507400
3507400
3507400
3507400
3507400
3507400
3507400
7 rows selected.
SQL> alter system checkpoint;
System altered.
SQL> select checkpoint_change# from V$datafile;
CHECKPOINT_CHANGE#
3507936
3507936
3507936
3507936
3507936
3507936
3507936
7 rows selected.
SQL>HTH
Aman.... -
-rw-r----- 1 oracle oinstall 13427712 May 20 02:00 o1_mf_1_90491_4341nt0b_.arc
-rw-r----- 1 oracle oinstall 13420544 May 20 02:01 o1_mf_1_90492_4341oov9_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:02 o1_mf_1_90493_4341q45y_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:02 o1_mf_1_90494_4341qytf_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:03 o1_mf_1_90495_4341s2w8_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:03 o1_mf_1_90496_4341szog_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:04 o1_mf_1_90497_4341v16m_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:05 o1_mf_1_90498_4341wsbl_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:05 o1_mf_1_90499_4341y0ps_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:06 o1_mf_1_90500_4341yyj1_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:06 o1_mf_1_90501_4342044h_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:07 o1_mf_1_90502_434217j9_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 02:10 o1_mf_1_90503_43426g1z_.arc
-rw-r----- 1 oracle oinstall 13424640 May 20 05:01 o1_mf_1_90504_434d70c6_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:22 o1_mf_1_90505_434fhm1b_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:23 o1_mf_1_90506_434fjrgr_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:24 o1_mf_1_90507_434fkxkf_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:24 o1_mf_1_90508_434flzfp_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:25 o1_mf_1_90509_434fnngh_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:26 o1_mf_1_90510_434fp67w_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:27 o1_mf_1_90511_434fqwks_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:28 o1_mf_1_90512_434fslyn_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:29 o1_mf_1_90513_434fvr3c_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:30 o1_mf_1_90514_434fxrsq_.arc
-rw-r----- 1 oracle oinstall 13427712 May 20 05:31 o1_mf_1_90515_434fzr8h_.arc
-rw-r----- 1 oracle oinstall 13438976 May 20 10:00 o1_mf_1_90516_434xrhf9_.arcmine is 10.2.0.1 database...my log switch is happening intermittently....log file size is 20 MB
log_checkpoint_interval integer 0
log_checkpoint_timeout integer 1800
log_checkpoints_to_alert boolean FALSEHow can I set to happen log file switch at every 30 Minutes...These are two different issues.
1. There are frequent log switches so the log file size could [should] be increased.
2. However, there are, at times, gaps of 3 hours and 5 hours between two
log switches. I presume that Deepa wants to ensure that a log switch occurs
"at least every 30minutes". It may occur more frequently than that (twice a
minutes) but the maximum gap between two log switches is desired as 30minutes.
That is what ARCHIVE_LAG_TARGET does.
It is not necessary that only in Standby databases would a DBA want a
maximum duration between log switches. You might be using this in a database
(as we have in Deepa's case !) where there are long "idle" stretches of time
with very little activity as well. Say, you have a background job periodically
backing up archivelogs using OS based methods (not RMAN) -- to tape
or to an NFS mount point or an offsite storage facility. ARCHIVE_LAG_TARGET
will help you ensure that the maximum data loss is 30minutes (even if there
was only 1 transaction of 1 row in those 30minutes) because that is what
your SLA might specify. This would be part of your media recovery / DR
requirements.
log_checkpoint_timeout is not to do with archiveloging but with checkpoints.
that is a complete different requirement -- that is for instance recovery not
media recovery / backup-restore / DR requirements. -
Database log switch and WLS connection pool relation
Hi,
We have been facing WLS JDBC connection pool disable and suspension issue very frequently in our environment and as a work around have implemented multi-datasource configuration (fail over method).
But we need to know the root cause for the same and want to fix the issue too.
We have tried many options like increasing no. of processes and transaction on Database, fine tune the weblogic datasource but still we could not isolate the issue.
Recently we have been advised to minimize the log switch on database front and increase the redo log size. Not sure if this will help in isolating the issue or not.
So we are Looking forward for the comments and suggestions on what would be the relationship b/w datasource and log switch be and if someone have faced this issue and resolved the same by fine tuning the database and minimizing the log switch.
We are using WLS 10.3.3.0
-Rohitturn on jdbc logging. The server log should be showing the troubles WLS is having
while testing connections and trying/failing to make replacement connections. -
Is there a way to identify manual log switches?
Hi!
A while ago I upgraded a 10g database to 11.2.0.2 64 Bit Windows.
During the Upgrade we realized that redo logs were configured really small (~10MB) what resulted in a lot of log switches (a few hundred per day). So we adjusted redo log size to 100MB and set archive_lag_target to 1800.
The amount of log switches went down a little but less far than we expected it. After further analysing the situation we recognized that Oracle is switching logs far before reaching the 100MB log size (and also far before reaching 1800s). All the archived logs have a size of about 15MB. I know that 11g invented something like "preemptive log switching" that switches logs round about 20% before reaching the maximum value (if I remember it correctly..). But switching already at 15% of the maximum size seems strange to me...
I couldn't find any helpful stuff on Google or Metalink about that topic but today I had a different idea: what if it's the application software that's doing manual log switches?
(I have no idea why it should do that but I can remember that the application user does require the sysdba privilege - don't ask me why, I didn't write it, I won't defend it...)
So I checked the alert log but unfortunately I had to realize that there is no difference between an automatic switch and a manual one (only alter system archive log... does get an extra line).
So my questions are:
1) Does anybody know a way of distinguishing between an automatic log switch and a manual one? Is there a table or another logfile where this information is recorded?
2) Has anybody experienced a similar situation where Oracle is switching the logs way before reaching the maximum size?
Best regards,
Marcuslebigmac wrote:
1) Does anybody know a way of distinguishing between an automatic log switch and a manual one? Is there a table or another logfile where this information is recorded?
Off the top of my head - I think the only way to do a manual log switch is to issue "alter system switch log file", and I think that any "alter system" command is written to the alter log in you version of Oracle. (I really ought to check both statements before posting this, but I've been up since 2:30 am).
2) Has anybody experienced a similar situation where Oracle is switching the logs way before reaching the maximum size?
It's very common with recent versions of Oracle when private redo threads come into play; but your example seems a little exaggerated. The log file switch has to start when there is enough space left in the log file for all the public and all (or maybe it's the previously used - i'll have to check my book) private redo threads. You could check x$kcrfstrand to see what this sizes look like: http://jonathanlewis.wordpress.com/?s=private+thread
Regards
Jonathan Lewis -
Block size in tt for writing data to transaction log and checkpoint files
Hello,
what block size is TimesTen using when its writing data to transaction log and checkpoint files? Does it use some fixed block size during filesystem writes?Although in theory logging can write 2 KB blocks in almost all circumstances it will write 4 KB or larger so yes a filesystem with a 4 KB block size is fine for both checkpointing and logging.
Chris
Maybe you are looking for
-
Ejb QL 3.0 group by / return type issues
Hello all. I have a question regarding ejb query language 3.0. I have a query that works and looks like the following: select e.objectId, count(distinct s1.objectId), count(distinct s2.objectId) from Engagement e JOIN e.surveys s1 JOIN e.surveys s2 w
-
The dreaded PARM error - discuss experiences and resolutions
Hi all, I'm having problems with the PARM error which I have found several discussions for. There never really was much of a solution other than avoiding "poorly written scripts". So, after upgrading everyone to CS5,applying all CS5 updates, and maki
-
HT4009 my in-app purchase has not come through what can i do
my in-app purchase has not come through what can i do
-
How to insert SWF into Presenter.
Hello everyone. I've got a very nasty issue. I created a slideshow in Captivate and saved it as SWF file. When I try to import/insert SWF in a presentation (in Presenter) as "slide animation", I get nothing - the SWF still isn't imported. Also, I can
-
Can't get JDeveloper/OC4J to auto-create MySQL table
My EJB 3.0 based application is failing to create the MySQL table specified by the @TableGenerator annotation. Following are the details of my setup and application: System Setup: - JDeveloper 10.1.3.1.0 - JDK 1.5.0_07 - Ubuntu Linux kernel 2.6.15-27