兔斯基不吃鱼 兔斯基不吃鱼
一个走在时间前头的勇士。
关注数: 4 粉丝数: 154 发帖数: 586 关注贴吧数: 35
ADG broker switchover的奇怪问题 环境: 主库、备库、broker分别在不同的机器上。 配置和各种参数以后。 tnsping主备库正常。静态监听配置正常。broker configuration正常。 然后用dgmgrl的switchover命令切换主备: 主库切换到备库时: DGMGRL> switchover to lhqadg; Performing switchover NOW, please wait... Operation requires a connection to instance "lhqadg" on database "lhqadg" Connecting to instance "lhqadg"... Connected. New primary database "lhqadg" is opening... Operation requires startup of instance "lhqdb1" on database "lhqdb1" Starting instance "lhqdb1"... Unable to connect to database ORA-12543: TNS:destination host unreachable Failed. Warning: You are no longer connected to ORACLE. Please complete the following steps to finish switchover: start up instance "lhqdb1" of database "lhqdb1" tail -f 主备库的alert日志。 主库卡在的位置: ..... LOG_ARCHIVE_DEST_2 is a potential Physical Standby switchover target Active, synchronized target has been identified Target has also received all redo Backup controlfile written to trace file /u01/oracle/diag/rdbms/lhqdb1/lhqdb1/trace/lhqdb1_rsm0_4125.trc Clearing standby activation ID 1176681941 (0x4622bdd5) The primary database controlfile was created using the 'MAXLOGFILES 40' clause. There is space for up to 37 standby redo logfiles Use the following SQL commands on the standby database to create standby redo logfiles that match the primary database: ALTER DATABASE ADD STANDBY LOGFILE 'srl1.f' SIZE 10485760; ALTER DATABASE ADD STANDBY LOGFILE 'srl2.f' SIZE 10485760; ALTER DATABASE ADD STANDBY LOGFILE 'srl3.f' SIZE 10485760; ALTER DATABASE ADD STANDBY LOGFILE 'srl4.f' SIZE 10485760; Archivelog for thread 1 sequence 350 required for standby recovery Switchover: Primary controlfile converted to standby controlfile succesfully. Switchover: Complete - Database shutdown required Completed: ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN Sun Mar 20 18:48:02 2016 Shutting down instance after CTL_SWITCH DMON (ospid: 4078): terminating the instance Instance terminated by DMON, pid = 4078 可以看到primary已经自动关里,按理是会自动再拉起来成备库状态。但是一直就夯在这里了。 备库日志: ..... Sun Mar 20 18:47:59 2016 ARC5 started with pid=28, OS id=5050 Sun Mar 20 18:47:59 2016 Error 1034 received logging on to the standby Error 1034 for archive log file 3 to 'lhqdb1' LGWR: Failed to archive log 3 thread 1 sequence 353 (1034) ARC3: Becoming the 'no SRL' ARCH Thread 1 advanced to log sequence 353 (LGWR switch) Current log# 3 seq# 353 mem# 0: /u01/oracle/oradata/lhqadg/redo03.log Archived Log entry 304 added for thread 1 sequence 352 ID 0x4622de5f dest 1: Sun Mar 20 18:48:00 2016 Starting background process CJQ0 Sun Mar 20 18:48:00 2016 CJQ0 started with pid=30, OS id=5064 ARC5: Archival started ARC2: STARTING ARCH PROCESSES COMPLETE Shutting down archive processes ARCH shutting down ARC5: Archival stopped Setting Resource Manager plan SCHEDULER[0x32DF]:DEFAULT_MAINTENANCE_PLAN via scheduler window Setting Resource Manager plan DEFAULT_MAINTENANCE_PLAN via parameter Sun Mar 20 18:48:03 2016 Starting background process VKRM Sun Mar 20 18:48:03 2016 VKRM started with pid=29, OS id=5068 Sun Mar 20 18:48:03 2016 ARC1: Becoming the 'no SRL' ARCH 这是在等待primary拉起来以后,standby同步日志,也是夯住了。 可以看到主库和备库的alert日志里均没有报tns的错误出来。如果是tns配置错误,这里应该会直接报 network disconnect.. -------- 此时我必须手动去startup primary(才顺利完成主备切换) 后来我又尝试当我把备库切换回主库又是正常的: DGMGRL> switchover to lhqdb1; Performing switchover NOW, please wait... Operation requires a connection to instance "lhqdb1" on database "lhqdb1" Connecting to instance "lhqdb1"... Connected. New primary database "lhqdb1" is opening... Operation requires startup of instance "lhqadg" on database "lhqadg" Starting instance "lhqadg"... ORACLE instance started. Database mounted. Database opened. Switchover succeeded, new primary is "lhqdb1" ------------------------------------------------ 所以我又回头反复去检查监听和tns配置 可以说主备的设置都是镜像的。完全找不出有什么不同的地方。 为什么会卡住呢,难道是bug吗? 我的主库版本是11.2.0.4.20160219 备库版本是11.2.0.4.3 大家能给点思路吗? 刘大?
1 下一页