Does the redolog switch take place with a full checkpoint or an incremental checkpoint?

Source: Internet
Author: User

There's a lot of information on the web that doesn't make it clear whether the log switch is a full checkpoint or an incremental checkpoint. Some say it's a complete checkpoint, and some say it's an increase.

Quantity Check point. In fact, if you have a deep understanding of the difference between a full checkpoint and an incremental checkpoint, you should know whether the log switch is an incremental checkpoint or a full checkpoint.

Prior to 8i, Oracle did do a full checkpoint when log switch, but from 8i, Oracle did an incremental checkpoint at log switch, but

Not strictly an incremental checkpoint, because the log switch will not only update the control file like an incremental checkpoint, but will also end up as

All checkpoints update the header of the data file.

Let's do a test: it proves that when the log switch occurs, it is neither a full checkpoint nor an incremental checkpoint in strict sense.

First, we verify that in log switch, what happens is not a full checkpoint:

Check some of the parameters associated with log-switching checkpoints

Idle> @?/rdbms/admin/show_para

Enter value for P: _dbwr_scan_interval

Old 12:and Upper (I.KSPPINM) like Upper ('%&p% ')

New 12:and Upper (I.KSPPINM) like Upper ('%_dbwr_scan_interval% ')

P_name p_description P_value Isdefau LT ismodified Isadj

---------------------------------------- --------------------------------------------------

------------------------------ --------- ---------- -----

_dbwr_scan_interval dbwriter Scan Interval-TRUE False false

Idle> @?/rdbms/admin/show_para

Enter value for P: _disable_selftune_checkpointing

Old 12:and Upper (I.KSPPINM) like Upper ('%&p% ')

New 12:and Upper (I.KSPPINM) like Upper ('%_disable_selftune_checkpointing% ')

P_name p_description P_value Isdefau LT ismodified Isadj

---------------------------------------- --------------------------------------------------

------------------------------ --------- ---------- -----

_disable_selftune_checkpointing Disable Self-tune checkpointing FALSE TRUE False false

Idle> Show Parameter Log_checkpoint_timeout

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------

Log_checkpoint_timeout Integer 1800

Before the parameters are modified:

Idle> select Group#,status from V$log;

group# STATUS

---------- ----------------

1 Current

2 INACTIVE

3 INACTIVE

idle> alter system switch logfile;

Idle>!date

Sun May 19:43:20 CST 2013

Idle> select Group#,status from V$log;

group# STATUS

---------- ----------------

1 ACTIVE

2 Current

3 INACTIVE

Idle>!date

Sun May 19:49:25 CST 2013

Idle> select Group#,status from V$log;

group# STATUS

---------- ----------------

1 INACTIVE

2 Current

3 INACTIVE

The 1th log group changed from active to inactive about 5 minutes.

Modifying the parameter can kill alter system switch logfile; Redo log file state is active (hold one day):

_dbwr_scan_interval=24*3600

log_checkpoint_timeout=24*3600

_disable_selftune_checkpointing=true

Idle> alter system set "_dbwr_scan_interval" = 86400;

System altered.

Idle> alter system set log_checkpoint_timeout=86400;

System altered.

Idle> alter system set "_disable_selftune_checkpointing" =true;

System altered.

Ha ha... You can see if it's always active.

Idle>!date

Sun May 19:55:54 CST 2013

Idle> select Group#,status from V$log;

group# STATUS

---------- ----------------

1 INACTIVE

2 INACTIVE

3 Current

idle> ALTER SYSTEM SWITCH LOGFILE;

System altered.

Idle> select Group#,status from V$log;

group# STATUS

---------- ----------------

1 Current

2 INACTIVE

3 ACTIVE

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.