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

season0891發表於2013-09-09

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/,如需轉載,請註明出處,否則將追究法律責任。

相關文章