ITPub博客

首页 > Linux操作系统 > Linux操作系统 > ORA-12154: TNS: could not resolve the connect identifier specified

ORA-12154: TNS: could not resolve the connect identifier specified

原创 Linux操作系统 作者:season0891 时间:2013-09-09 14:29:02 0 删除 编辑

I found the solution. The problem was not related with Oracle, but with the ODBC Driver configuration. Actually, with Environment variables.
Windows was throwing the error 
"ORA-12154: TNS: could not resolve the connect identifier specified"
because the Environment Variables were incorrect. Specifically, the error was that the 
TNS_ADMIN variable was set to:
C:\oracle\instantclient_10_2;

Yes, the problem was with the semicolon at the end position of the string. As soon as I removed it, I could configure the ODBC driver properly. Now I add a new connection in Visual Studio to the oracle database without any problem.
The semicolon was making the TNS_NAMES.ora file not accesible to windows, and thus the service was not known to the system.

I hope this post (though apparently silly) helps any other newbies like me...

tns_admin : 就是tnsnames。ora的路径 。。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/90618/viewspace-772397/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-06-10

  • 博文量
    791
  • 访问量
    1935678