1.原则
1).standby redo log的文件大小与primary 数据库online redo log 文件大小相同
2).standby redo log日志文件组的个数依照下面的原则进行计算
Standby redo log组数公式>=(每个instance日志组个数+1)*instance个数
例如在我的环境中,只有一个节点,这个节点有三组redo,所以
Standby redo log组数公式>=(3+1)*1 == 4
所以需要创建4组Standby redo log
3).每一日志组为了安全起见,可以包含多个成员文件
2.配置过程,正常情况下仅需要在Standby端进行配置,考虑到主备切换,在primary端亦进行配置
1)Standby库添加四组Standby redo log,用户备库的恢复
sys@ora10g> alter database add standby logfile group 4 ('/oracle/u02/ORA10GDG/STANDBYRD01.LOG') size 200M;
Database altered.
sys@ora10g> alter database add standby logfile group 5 ('/oracle/u02/ORA10GDG/STANDBYRD02.LOG') size 200M;
Database altered.
sys@ora10g> alter database add standby logfile group 6 ('/oracle/u02/ORA10GDG/STANDBYRD03.LOG') size 200M;
Database altered.
sys@ora10g> alter database add standby logfile group 7 ('/oracle/u02/ORA10GDG/STANDBYRD04.LOG') size 200M;
Database altered.
2)Primary库添加四组Standby redo log,用于主备切换
sys@ora10g> alter database add standby logfile group 4 ('/oracle/u02/ORA10G/STANDBYRD01.LOG') size 200M;
Database altered.
sys@ora10g> alter database add standby logfile group 5 ('/oracle/u02/ORA10G/STANDBYRD02.LOG') size 200M;
Database altered.
sys@ora10g> alter database add standby logfile group 6 ('/oracle/u02/ORA10G/STANDBYRD03.LOG') size 200M;
Database altered.
sys@ora10g> alter database add standby logfile group 7 ('/oracle/u02/ORA10G/STANDBYRD04.LOG') size 200M;
Database altered.
3.Standby redo log删除方法
sys@ora10g> alter database drop standby logfile group 4;
sys@ora10g> alter database drop standby logfile group 5;
sys@ora10g> alter database drop standby logfile group 6;
sys@ora10g> alter database drop standby logfile group 7;
4.通过V$STANDBY_LOG视图验证standby redo log文件组是否成功创建
sys@ora10g> SELECT GROUP#,THREAD#,SEQUENCE#,ARCHIVED,STATUS FROM V$STANDBY_LOG;
GROUP# THREAD# SEQUENCE# ARC STATUS
---------- ---------- ---------- --- ----------
4 0 0 YES UNASSIGNED
5 0 0 YES UNASSIGNED
6 0 0 YES UNASSIGNED
7 0 0 YES UNASSIGNED
-- The End --