Oracle (0x80004005)ORA-12154: TNS:could not resolve the connect identifier Oracle (0x80004005)ORA-12154: TNS:could not resolve the connect identifier oracle oracle

Oracle (0x80004005)ORA-12154: TNS:could not resolve the connect identifier


It seems all the settings have been checked but here is my suggestions for some trouble shooting:

  • How about restrictions on the account IIS is running under? Does it have the file permissions to read the TNSNAMES? Have you tried to give the user more rights. Even run IIS with Local As System Account? Remember to put it back the way it was.
  • You are sure there is not 3rd party app such anti virus or firewall that could influence / block access. (Disable them to test but do not forget to re-enable :)

(What did you finally do to solve it?)


"this works on a co-worker machine but not mine."

ORA-12154 is usually a configuration issue, and it would certainly seem to be so in your case. The short answer is to compare your machine with your colleague's one and figure out what the difference is.

Things to check include:

  • the TNANAMES.ORA file
  • the SQLNET.ORA file
  • the LISTENER.ORA file (if you're using a local database)


Do you have multiple Oracle homes? Check that IIS doesn't point to the other ORA_HOME (and thereby not finding your tnsnames.ora entry).I'm not very familiar with IIS configuration, so I would test this by adding the TNS entry to all tnsnames.ora on my PC.