博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
DG配置网络,报ORA-12514: TNS:listener does not...
阅读量:6298 次
发布时间:2019-06-22

本文共 2472 字,大约阅读时间需要 8 分钟。

配置data guard网络监听的时候,连接测试报错如下:

 

ERROR:

ORA-12514: TNS:listener does not currently know of service requested in connect
descriptor

 

出错原因是由于,在修改init$ORACLE_SID.ora文件时,在主库里面新添加了一项db_unique_name=10gpri;

备库上新添加一项db_unique_name=10gstandby.

在配置监听文件和客户端tnsnames.ora时,就要修改GLOBAL_DBNAME 成相应的10gpri或10standby.

 

[oracle@dg01 admin]$ cat listener.ora 

LISTENER = 
(DESCRIPTION_LIST = 
(DESCRIPTION = 
(ADDRESS_LIST = 
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.1.30)(PORT = 1521)) 
SID_LIST_LISTENER = 
(SID_LIST = 
(SID_DESC = 
(SID_NAME = PL***tProc) 
(ORACLE_HOME = /u01/oracle/product/10.2.0/db_1 ) 
(PROGRAM = extproc) 
(SID_DESC = 
(GLOBAL_DBNAME = 10gpri) 
(ORACLE_HOME = /u01/oracle/product/10.2.0/db_1) 
(SID_NAME = dg01) 
)

[oracle@dg01 admin]$ cat tnsnames.ora

10gpri=

(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.1.30)(PORT = 1521))
(CONNECT_DATA =
(server=dedicated)
(service_name = 10gpri)
)
)

10gstandby=

(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.21.1.31)(PORT = 1521))
(CONNECT_DATA =
(server=dedicated)
(service_name = 10gstandby)
)
)

 

在两个节点上测试如下:

节点dg01:

[oracle@dg01 dbs]$ sqlplus scott/tiger@10gstandby

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 24 03:29:28 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SCOTT_S:138_P:28085_10gstandby> show parameter name

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string dg01
db_unique_name string 10gstandby
global_names boolean FALSE
instance_name string dg01
lock_name_space string
log_file_name_convert string
service_names string 10gstandby

 

节点dg02:

[oracle@dg02 dbs]$ sqlplus 

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Aug 24 03:29:28 2011

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options

SCOTT_S:145_P:22710_10gpri> show parameter name

NAME TYPE VALUE

------------------------------------ ----------- ------------------------------
db_file_name_convert string
db_name string dg01
db_unique_name string 10gpri
global_names boolean FALSE
instance_name string dg01
lock_name_space string
log_file_name_convert string
service_names string 10gpri

 

    本文转自vcdog 51CTO博客,原文链接:http://blog.51cto.com/255361/837642,如需转载请自行联系原作者

你可能感兴趣的文章
微信支付
查看>>
CodeBlocks中的OpenGL
查看>>
短址(short URL)
查看>>
第十三章 RememberMe——《跟我学Shiro》
查看>>
mysql 时间函数 时间戳转为日期
查看>>
索引失效 ORA-01502
查看>>
Oracle取月份,不带前面的0
查看>>
Linux Network Device Name issue
查看>>
IP地址的划分实例解答
查看>>
如何查看Linux命令源码
查看>>
运维基础命令
查看>>
入门到进阶React
查看>>
SVN 命令笔记
查看>>
检验手机号码
查看>>
重叠(Overlapped)IO模型
查看>>
Git使用教程
查看>>
使用shell脚本自动监控后台进程,并能自动重启
查看>>
Flex&Bison手册
查看>>
solrCloud+tomcat+zookeeper集群配置
查看>>
/etc/fstab,/etc/mtab,和 /proc/mounts
查看>>