ITPub博客

首页 > 数据库 > Oracle > [20190107]12c以上版本配置dg注意.txt

[20190107]12c以上版本配置dg注意.txt

Oracle 作者:lfree 时间:2019-01-07 10:03:43 0 删除 编辑

[20190107]12c以上版本配置dg注意.txt


--//上午看链接里面提到1个问题,必须引起自己注意.


When I used to do this in Oracle 11.2, the Standby Redo logs got Thread 1 by default. Always Thread 1.


From Oracle 12.1, and also in 12.2.0.1, 18C (12.2.0.2) and probably 19C (12.2.0.3), Oracle creates the Standby Redo logs

with Thread 0 by default, although sometimes it creates them on Thread 1 (although this seems to be only in 12.1 but let

me know if you know better). I don't know why.


Standby Redo log MUST belong to the SAME Thread as the Online Redo logs for them to be used. Having (in this case) 1 x

redo on Thread 1 and 3 x Redo on Thread 0, I only have 1 x Standby Redo usable for my online Redo.


The solution is stop the Apply, DROP the Standby Redo on Thread 0, and create new Standby Redo Logs explicity stating

Thread 1, and restart the Apply.


--//在单实例下建立standby redo log,一般使用如下命令

alter database add standby logfile  ('/u01/app/oracle/oradata/xxxyyy/redostb01.rbo') size 50m ;

alter database add standby logfile  ('/u01/app/oracle/oradata/xxxyyy/redostb02.rbo') size 50m ;

alter database add standby logfile  ('/u01/app/oracle/oradata/xxxyyy/redostb03.rbo') size 50m ;

alter database add standby logfile  ('/u01/app/oracle/oradata/xxxyyy/redostb04.rbo') size 50m ;


--//在11.2的版本没有问题,建立的standby redo log指向thread 1.我看了我的测试环境:


SYS@bookdg> @ ver1

PORT_STRING         VERSION    BANNER

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

x86_64/Linux 2.4.xx 11.2.0.4.0 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production


SYS@bookdg> select group#,thread#,sequence#,bytes/1024/1024 MB,status from v$standby_log order by group#;

GROUP# THREAD# SEQUENCE#  MB STATUS

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

     4       1       721  50 ACTIVE

     5       1         0  50 UNASSIGNED

     6       1         0  50 UNASSIGNED

     7       0         0  50 UNASSIGNED


--//要使用才变成0,而不是作者讲的那样缺省1.

--//但是从12c开始单实例配置dg一定建立standby redo log时,必须显示的指定thread 号.rac环境也一定要这样.(一般rac不会出错).

--//例子如下:

alter database add standby logfile thread 1 ('/u01/app/oracle/oradata/xxxyyy/redostb01.rbo') size 50m ;


--//否则出现仅仅写一个standby redo log文件.日志切换时出现停顿的情况,如果在线日志越大可能延迟也严重的情况.


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

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    2855
  • 访问量
    6643944