在使用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"






使用broker进行Datagurd主备切换报ORA-12514异常的更多相关文章

  1. (摘)DataGuard物理standby管理 - 主备切换

    DataGuard物理standby管理 - 主备切换 Dataguard的切换分为两种,switchover和failover. switchover一般用于数据库或硬件升级,这时只需要较短时间中断 ...

  2. Oracle 12C 物理Standby 主备切换switchover

    Oracle 12C 物理Standby 主备切换switchover Oracle 12C 物理Standby 主备切换switchover Table of Contents 1. 简述 2. 切 ...

  3. mysql主备切换canal出现的问题解析

    通过配置VIP,在进行主备切换时,出现的报错信息: 1.当主备节点当前binlog文件名称相同时,原主节点的position小于主备切换后的position,出现如下报错: 2020-07-02 15 ...

  4. Spark系列(五)Master主备切换机制

    Spark Master主备切换主要有两种机制,之中是基于文件系统,一种是基于Zookeeper.基于文件系统的主备切换机制需要在Active Master挂掉后手动切换到Standby Master ...

  5. Nginx+Keepalived主备切换(包含nginx服务停止)

    原文地址:http://blog.sina.com.cn/s/blog_79ac6aa80101bmed.html Nginx+Keepalived主备切换(包含nginx服务停止) 环境: VM中4 ...

  6. 在Windows Azure上配置VM主备切换(1)——Linux篇

    对任何一个上线系统来说,高可用设计是不可或缺的一个环节,这样才可以确保应用可以持续.稳定的运行,而不是频繁的掉线.停机.高可用设计的核心思路很简单,就是消除一切单点故障,将单点链路或者节点升级为多点. ...

  7. 测试redis+keepalived实现简单的主备切换【转载】

    转自: 测试redis+keepalived实现简单的主备切换 - Try My Best 尽力而为 - ITeye技术网站http://raising.iteye.com/blog/2311757 ...

  8. Redis安装,主从,主备切换

    网络环境: 主:10.187.120.5 从:10.187.69.58 从:10.187.69.59 一.安装 mv redis-2.8.19.tar.gz /export/servers/ cd / ...

  9. MySQL 复制 - 性能与扩展性的基石 4:主备切换

    一旦使用 MySQL 的复制功能,就很大可能会碰到主备切换的情况.也许是为了迭代升级服务器,或者是主库出现问题时,将一台备库转换成主库,或者只是希望重新分配容量.不过出于什么原因,都需要将新主库的信息 ...

随机推荐

  1. 解决HTML5实现一键拨号、一键发短信及上传头像兼容性问题

    HTML5实现一键拨号,一键发短信以及上传头像等问题都是比较常见的场景,近期在做移动端项目的时候遇到阻挠,通过查找资料解决了问题: 废话不多说,直接上案例代码: HTML5实现一键拨号: <a ...

  2. c11标准

    在编译器vs13及其以上可以使用 编译器对语言的一种优化 1.变量初始化 int a=0,a(10),a{10};定义a的值的三种方式 2.nullptr 相当于c的null 有类型 更加的安全 3. ...

  3. mysql的优化策略

    1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引. 2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索 ...

  4. 原来update还可以这么用,一切都是这么神奇。

    update sys_user_info a left join union_menber_info b on a.user_cardno = b.member_cardno set a.user_s ...

  5. Kibana 管理界面使用教程

    使用浏览器访问 ip:5601 默认端口,进入首页 Discover:日志管理视图 Visualize:统计视图 Dashboard:仪表视图 Timelion:时间轴视图 APM:性能管理视图 De ...

  6. slice splice(数组) 和 slice substr substring split (字符串)的区别

    array.slice(start,end)slice()如果不传入参数二,那么将从参数一的索引位置开始截取,一直到数组尾如果两个参数中的任何一个是负数,array.length会和它们相加 stri ...

  7. UVA 10699 Count the factors 题解

    Time limit 3000 ms OS Linux Write a program, that computes the number of different prime factors in ...

  8. 数据结构C线性表现实

    linearList.h #ifndef _INC_STDIO_8787 #define _INC_STDIO_8787 #include <stdio.h> #include <m ...

  9. 从零开始开发IM(即时通讯)服务端

    好消息:IM1.0.0版本已经上线啦,支持特性: 私聊发送文本/文件 已发送/已送达/已读回执 支持使用ldap登录 支持接入外部的登录认证系统 提供客户端jar包,方便客户端开发 github链接: ...

  10. whu-contest-2019(online)

    比赛网址:http://whu2019.contest.codeforces.com/group/YyBKO8xFiH/contest/102167 赛后总结: T:今天参加了武汉大学校赛网络赛,在c ...