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博客 ” ,链接:https://blog.itpub.net/90618/viewspace-772397/
,如需转载,请注明出处,否则将追究法律责任。