在使用Datagurd broker进行Datagurd主备切换时报ORA-12514监听异常, 详细信息如下:

  1. DGMGRL> switchover to xiaohe;
  2. Performing switchover NOW, please wait...
  3. New primary database "xiaohe" is opening...
  4. Operation requires shutdown of instance "xiaohedg" on database "xiaohedg"
  5. Shutting down instance "xiaohedg"...
  6. ORACLE instance shut down.
  7. Operation requires startup of instance "xiaohedg" on database "xiaohedg"
  8. Starting instance "xiaohedg"...
  9. Unable to connect to database
  10. ORA-12514: TNS:listener does not currently know of service requested in connect descriptor
  11. Failed.
  12. Warning: You are no longer connected to ORACLE.
  13. Please complete the following steps to finish switchover:
  14. start up instance "xiaohedg" of database "xiaohedg"
  15. DGMGRL>

查看主备库的listener.ora配置信息:
  1. $ cat listener.ora
  2. LISTENER=
  3. (DESCRIPTION=
  4. (ADDRESS_LIST=
  5. (ADDRESS=(PROTOCOL=tcp)(HOST=xiaohe_dg1)(PORT=1521))))
  6. SID_LIST_LISTENER=
  7. (SID_LIST=
  8. (SID_DESC=
  9. (GLOBAL_DBNAME=xiaohe_DGMGRL_xiaohe.com)
  10. (ORACLE_HOME=/u01/app/oracle/product/11.2.0)
  11. (SID_NAME=xiaohe))
  12. )

根据官方文档, 但使用DG Broker管理DG时, 需要在监听器配置GLOBAL_DBNAME:
GLOBAL_DBNAME =db_unique_name_DGMGRL.db_domain

我当前数据库的db_unique_name为xiaohe, db_domain为xiaohe.com, 因此根据官方文档要求,  GLOBAL_DBNAME应该配置为:xiaohe_DGMGRL.xiaohe.com 。 但是上面的listener.ora不小心配置成了xiaohe_DGMGRL_xiaohe.com。
修改listener.ora配置并重启监听后, 使用broker进行DG主备切换正常。

  1. SQL> show parameter db_unique_name; NAME TYPE VALUE
    ------------------------------------ ----------- ------------------------------
    db_unique_name string xiaohe


  2. SQL> show parameter db_domain;
  3. NAME TYPE VALUE
  4. ------------------------------------ ----------- ------------------------------
  5. db_domain string xiaohe.com


修改监听配置后, Datagurd主备正常切换的日志如下:
  1. DGMGRL> switchover to xiaohe;
  2. Performing switchover NOW, please wait...
  3. New primary database "xiaohe" is opening...
  4. Operation requires shutdown of instance "xiaohedg" on database "xiaohedg"
  5. Shutting down instance "xiaohedg"...
  6. ORACLE instance shut down.
  7. Operation requires startup of instance "xiaohedg" on database "xiaohedg"
  8. Starting instance "xiaohedg"...
  9. ORACLE instance started.
  10. Database mounted.
  11. Database opened.
  12. Switchover succeeded, new primary is "xiaohe"






最新文章

  1. DockerCon 2016 – 微软带来了什么?
  2. 搭建SpringMVC+Spring+Hibernate平台
  3. V4.0到来了,css雪碧图生成工具4.0更新啦
  4. Hadoop是什么?一句话理解
  5. java io 流分类表
  6. C#解决验证码问题
  7. DataReader用法
  8. 应用XML作为数据库的快速开发框架
  9. Java获取线程的对象和名称
  10. js日期和毫秒相互转换
  11. HDU 4721 Food and Productivity (二分+树状数组)
  12. 给windows共享 目录付于权限
  13. Jsp分页的简单制作
  14. centos 下使用vscode 调试egg.js 注意事项
  15. linux常用命令说明
  16. BZOJ2002[Hnoi2010]弹飞绵羊——LCT
  17. MySQL在线大表DDL操作
  18. MongoDB学习3 $操作符表达式大全及实例
  19. Alpha冲刺第5天
  20. Python装饰器进阶

热门文章

  1. Springboot源码分析之jar探秘
  2. ES解决bootstrap checks failed, memory locking requested for elasticsearch process but memory is not locked问题
  3. DFS-递归入门
  4. Spring-Boot:多种配置注入方式
  5. springboot2.X 使用spring-data组件对MongoDB做CURD
  6. python requests接口测试系列:连接mysql,获取mysql查询的值作为接口的入参
  7. docker运行原理与使用总结
  8. spring-cloud-kubernetes与k8s的configmap
  9. C#开发BIMFACE系列18 服务端API之获取模型数据3:获取构件属性
  10. CF 551 D.Serval and Rooted Tree 树形DP