如何无缝切换数据保护

时间:2016-08-08 14:54:33

标签: oracle dataguard

在12c环境中的Dataguard配置中,当我执行从主要(foo)切换到待机(bar)然后尝试使用user@foo进行sqlplus时,我会收到" ORA-011033: ORACLE initialization or shutdown in progress"错误,而不是能够连接到新的主要(条)。

现在,我知道这是因为连接仍然指向foo地址而不是bar地址,并且根据许多文章,您需要创建一个新的"虚拟"处理不同连接的服务,以及在rolechange之后停止/启动此服务的触发器。

我这样做并且service_names参数设置为这个新的"虚拟"服务,切换将工作,也可以切换回来,但尝试使用user@foo sqlplus时,它会抛出ORA-011033。触发器是无用的,服务继续在foo和bar上运行,因为似乎具有该参数设置会覆盖触发器尝试执行的任何操作。

现在,如果我没有定义该参数,我的切换工作正常,触发器完成工作,当我sqlplus user@foo时,它会正确地将我重定向到bar地址。但是,当我尝试切换回foo时,我在DG警报日志中收到以下内容:

Redo transport problem detected: redo transport to database foo has the following error:
ORA-16047: DGID mismatch between destination setting and target database 08/05/2016 16:01:02 Initialization of connection failed. Expected destination db_unique_name is foo. Database actually reached is bar Failed to send message to site foo. Error code is ORA-16642. Data Guard Broker Status Summary:
Type Name Severity Status Configuration foo_dg Warning ORA-16607 Primary Database bar Error ORA-16778 Physical Standby Database foo Error ORA-16642

ON FOO:

  

log_archive_dest_2 =' service =" bar"',' ASYNC NOAFFIRM delay = 0可选   compression = disable max_failure = 0 max_connections = 1 reopen = 300   DB_UNIQUE_NAME ="杆"   NET_TIMEOUT = 30',' VALID_FOR =(online_logfile,ALL_ROLES)'   FAL_CLIENT ='富' FAL_SERVER ='杆'

ON BAR:

  

log_archive_dest_2 =' service =" foo",ASYNC NOAFFIRM delay = 0可选   compression = disable max_failure = 0 max_connections = 1 reopen = 300   DB_UNIQUE_NAME ="富" VALID_FOR =(online_logfile,ALL_ROLES)'   FAL_CLIENT ='杆' FAL_SERVER ='富'

LDAP中的条目: FOO:

  

(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = foo_home)(PORT = 15940))(ADDRESS =(PROTOCOL = TCP)(HOST = bar_home)(PORT = 15940)))(CONNECT_DATA =(SERVICE_NAME = virtual_foo)(failover_mode的=(TYPE = SESSION)(METHOD =基本))))

栏:

  

(DESCRIPTION =(ADDRESS_LIST =(ADDRESS =(PROTOCOL = TCP)(HOST = bar_home)(PORT = 15940)))(CONNECT_DATA =(SERVICE_NAME =巴)))

我不确定我错过了什么或误解了什么。任何人都能明白我可能做错了什么吗?如果需要,可以提供更多信息。

0 个答案:

没有答案