首页 技术 正文
技术 2022年11月17日
0 收藏 449 点赞 3,717 浏览 1907 个字

在使用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"
相关推荐
python开发_常用的python模块及安装方法
adodb:我们领导推荐的数据库连接组件bsddb3:BerkeleyDB的连接组件Cheetah-1.0:我比较喜欢这个版本的cheeta…
日期:2022-11-24 点赞:878 阅读:9,104
Educational Codeforces Round 11 C. Hard Process 二分
C. Hard Process题目连接:http://www.codeforces.com/contest/660/problem/CDes…
日期:2022-11-24 点赞:807 阅读:5,580
下载Ubuntn 17.04 内核源代码
zengkefu@server1:/usr/src$ uname -aLinux server1 4.10.0-19-generic #21…
日期:2022-11-24 点赞:569 阅读:6,428
可用Active Desktop Calendar V7.86 注册码序列号
可用Active Desktop Calendar V7.86 注册码序列号Name: www.greendown.cn Code: &nb…
日期:2022-11-24 点赞:733 阅读:6,200
Android调用系统相机、自定义相机、处理大图片
Android调用系统相机和自定义相机实例本博文主要是介绍了android上使用相机进行拍照并显示的两种方式,并且由于涉及到要把拍到的照片显…
日期:2022-11-24 点赞:512 阅读:7,835
Struts的使用
一、Struts2的获取  Struts的官方网站为:http://struts.apache.org/  下载完Struts2的jar包,…
日期:2022-11-24 点赞:671 阅读:4,918