PL/SQL- ora-12154 '' TNS:could not resolve the connect identifier specified'

出现如上情况在使用pl/sql连接oracle服务器时很常见,问题出现的方式也很多

最终问题还是pl/sql在读取NETWORK\ADMIN\tnsnames.ora是配置的内容时解析错误

也就是说tnsnames.ora文件中的配置有误

如:

 192.168.0.246_orcl=
 (DESCRIPTION =
     (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.246)(PORT = 1521))
     )
     (CONNECT_DATA =
       (SERVICE_NAME =orcl)
     )
 )

 和

192.168.0.246_orcl=
 (DESCRIPTION =
     (ADDRESS_LIST =
       (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.246)(PORT = 1521))
     )
     (CONNECT_DATA =
       (SERVICE_NAME =orcl)
     )
 )

 

就会提示我们遇到的问题: ora-12154 '' TNS:could not resolve the connect identifier specified'

找了很久:http://bbs.csdn.net/topics/390905431从这里看到了结果。一个空格害死人

 

posted @ 2017-03-23 09:37  243573295  阅读(756)  评论(0编辑  收藏  举报