监听程序在 connect data 中未获得 service name ORA-12154: TNS: 无法解析指定的连接标识符

监听程序在 connect data 中未获得 service name ORA-12154: TNS: 无法解析指定的连接标识符,第1张

连接字符串有问圆闷题:

"Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST={0})(PORT={1})))(CONNECT_DATA=(SERVER={2})(SERVICE_NAME={3})))User Id={4}Password={5}​知好"

格式如上,替橘猛弯换{0} 这种为你自己的配置

客户端配置好服务名后,用PL/SQL Developer连接数据库时,报闹橘错:ORA-12504:TNS:监听程序在CONNECT_DATA中未获得SERVICE_NAME。一般这侍散种情况请检查tnsnames.ora文件中TNS是否配置正确,如下所示老弯氏,SERVICE_NAME 名字弄错了,结果报如上错误:

GSP =

(DESCRIPTION =

(ADDRESS =(PROTOCOL = TCP)(HOST = 172.20.36.79)(PORT = 1521))

(CONNECT_DATA=

(SERVER = DEDICATED)

(SERVER_NAME = gsp)

)

)

修改为

GSP =

(DESCRIPTION =

(ADDRESS =(PROTOCOL = TCP)(HOST = 172.20.36.79)(PORT = 1521))

(CONNECT_DATA=

(SERVER = DEDICATED)

(SERVICE_NAME = gsp)

)

)

ORCLE =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = orcle)

)

) 在旅唤滑拆腊链友connect_data前面少)


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/12373934.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-25
下一篇 2023-05-25

发表评论

登录后才能评论

评论列表(0条)

保存