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

lfree發表於2019-01-07

[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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章