ITPub博客

首页 > Linux操作系统 > Linux操作系统 > SWITCH LOGFILE and CHECKPOINT

SWITCH LOGFILE and CHECKPOINT

原创 Linux操作系统 作者:kris3106 时间:2008-05-01 15:52:39 0 删除 编辑
# 这下该清楚了吧`~~
ALTER SYSTEM SWITCH LOGFILE ;
SWITCH LOGFILE Clause
The SWITCH LOGFILE clause lets you explicitly force Oracle to begin writing to a new redo log file group, 
regardless of whether the files in the current redo log file group are full. When you force a log switch, Oracle 
begins to perform. a checkpoint but returns control to you immediately rather than when the checkpoint is 
complete. To use this clause, your instance must have the database open.

ALTER SYSTEM ARCHIVE LOG CURRENT ;
CURRENT Clause
Specify CURRENT to manually archive the current redo log file group of the specified thread, forcing a log switch. 
If you omit the THREAD parameter, then Oracle archives all redo log file groups from all enabled threads, including 
logs previous to current logs. You can specify CURRENT only when the database is open.

ALTER SYSTEM ARCHIVE LOG CURRENT NOSWITCH;
NOSWITCH
Specify NOSWITCH if you want to manually archive the current redo log file group without forcing a log switch. 
This setting is used primarily with standby databases to prevent data divergence when the primary database shuts 
down. Divergence implies the possibility of data loss in case of primary database failure.
You can use the NOSWITCH clause only when your instance has the database mounted but not open. If the database 
is open, then this operation closes the database automatically. You must then manually shut down the database 
before you can reopen it

ALTER SYSTEM CHECKPOINT
Specify CHECKPOINT to explicitly force Oracle to perform. a checkpoint, ensuring that all changes made by committed 
transactions are written to datafiles on disk. You can specify this clause only when your instance has the database open. 
Oracle does not return control to you until the checkpoint is complete.

Oracle Checkpoint
A checkpoint performs the following three operations:
    - Every dirty block in the buffer cache is written to the data files. That is, it synchronizes the datablocks in the buffer cache 
       with the datafileson disk. 
    - It's the DBWR that writes all modified databaseblocks back to the datafiles.
    - The latest SCN is written (updated) into thedatafile header.
    - The latest SCN is also written to the controlfiles.
The update of the datafile headers and the control files is done by the LGWR(CKPT if CKPT is enabled). As of version 8.0, 
CKPT is enabled by default.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/563971/viewspace-257280/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: dddddd
请登录后发表评论 登录
全部评论

注册时间:2008-04-07

  • 博文量
    93
  • 访问量
    212697