Chinaunix首页 | 论坛 | 博客
  • 博客访问: 719016
  • 博文数量: 191
  • 博客积分: 10987
  • 博客等级: 上将
  • 技术积分: 1925
  • 用 户 组: 普通用户
  • 注册时间: 2009-04-22 09:52
文章分类

全部博文(191)

文章存档

2014年(10)

2011年(11)

2010年(38)

2009年(132)

分类: Oracle

2010-03-07 03:09:16

摘录于Oracle官方文档。
   A log switch occurs when LGWR stops writing to one redo log group and starts
   writing to another. By default, a log switch occurs automatically when the current redo log file group fills.
You can force a log switch to make the currently active group inactive and available for
redo log maintenance operations. For example, you want to drop the currently active
group, but are not able to do so until the group is inactive. You may also wish to force
a log switch if the currently active group needs to be archived at a specific time before
the members of the group are completely filled. This option is useful in configurations
with large redo log files that take a long time to fill.
To force a log switch, you must have the ALTER SYSTEM privilege. Use the ALTER
SYSTEM statement with the SWITCH LOGFILE clause.
The following statement forces a log switch:

手工日志切换:ALTER SYSTEM SWITCH LOGFILE;
 
-------------------------------------------------------
当这当前日志组满了的时候,日志切换自动发生了。默认,无须人工干预。
必要的时候,手动切换日志,使用当前激活的日志组发生切换,而变成非激活的日志组,当变成非激活的日志组的时候,即状态为inactive.就可以对状态为inactive的日志组进行操作了。列如,删除操作(drop)等。还有一个原因是当前日志组需要在规定的时间要进行归档,但是当前日志组还没有满,不能自动切换,因此手动切换,从而及时归档。因为状态为active的日志组,Oracle是不允许操作的。
 
 
 
阅读(1474) | 评论(0) | 转发(0) |
0

上一篇:Oracle:buffer cache

下一篇:oracle:redo log

给主人留下些什么吧!~~