设为首页 收藏本站
查看: 281|回复: 0

[经验分享] oracle学习笔记08_Maintaining Online Redo Log Files

[复制链接]
YunVN网友  发表于 2016-8-13 07:30:45 |阅读模式
--------Characteristics:
Recored all changes made to data.
Provide a recovery mechanism.
Can be organized into group.
At least two group required.
--------Online Redo Log File Groups
A set of identical copies of online redo log files is called an online redo log file group.
The LGWR background process concurrently writes the same information to all online redo log files in a group.
The oracle server needs a minimum of two online redo log file groups for the normal operation of a data base.
--------Online Redo log File Members
Each online redo log file in a group is called a member.
Each member is a group has identical log sequence numbers and are of the same size.
The LSN(log sequence number) is assigned each time that the Oracle server writes to a log group to uniquely identify each online redo log file.
--------How Redo Filew Work
Online Redo log files are used in cyclic fashion.
When a online redo log file is full,LGWR will move to the next log group.
    Called a log switch
    Checkpoint operation also occurs
    Information written to the control file
--------Log switch
The act of switching from one log file group to the other is called a log switch.
--------Checkpoint
A checkpoint is the writing of dirty(modified) blocks from the buffer cache to disk.
--------When will LGWR write redo?
When a transaction commits.
Every three seconds.
When the Redo Log Buffer becomes one-third full.
When there is more than a megabyte of changed records in the Redo Log Buffer.
Before the DBWn writes modified blocks in the Database Buffer Cahce to the data files.
--------强制切换日志
alter system switch logfile;
--------强制checkpoint的发生
fast_start_mttr_target(0-3600)
alter system set fast_start_mttr_target=300 scope=spfile|both|pfile;alter system checkpoint;
--------管理Redo log files
alter database add logfile group 3('$HOMR/oradata/u01/log3a.rdo','$HOMR/oradata/u01/log3b.rdo') size 100m;
select * from v$logfile;
alter database add logfile member '$HOMR/oradata/u04/log1c.log' to group 1,'$HOMR/oradata/u04/log2c.log' to group 2,'$HOMR/oradata/u04/log3c.log' to group 3;
--------Drop Redo File Members:
alter database drop logfile member '$HOME/ORADATA/U04/log3c.rdo';
--------Drop Redo Files Groups
alter database drop logfile group 4;
--------Relocate & Rename
alter database rename file 'path and name1' to 'path and name2';
--------清空redo log file
alter database clear logfile group 2;
alter database clear unarchived logfile group 2;
--------
Archived Redo Log Files
--------
总结:oracle redo log file至少两组,每组至少两个,每组的重做日志文件放到不同的磁盘里(应对单点故障,提高安全性)。

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-257142-1-1.html 上篇帖子: Oracle中查询使用正则表达式函数REGEXP_LIKE 下篇帖子: 使用internal_convert修改oracle 10g 数据库字符集
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表