0

I have a .net app with a oracle database, I have not changed any config file or the tnsnames.ora ,and suddenly get this error.

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

I try a lot of time to think, what can it be?Does anything have an idea?

Jacob
  • 14,463
  • 65
  • 207
  • 320
Tzof
  • 193
  • 12
  • Please do a `tnsping` and see the output. – Jacob Mar 21 '18 at 07:30
  • include the ora-xxx error code – Birhan Nega Mar 21 '18 at 07:31
  • Most likely your application does not find the `tnsnames.ora` file. Have a look at https://stackoverflow.com/questions/28280883/determining-location-of-relevant-tnsnames-ora-file/28283924#28283924 – Wernfried Domscheit Mar 21 '18 at 08:57
  • check your $TNS_ADMIN variable, this point to tnsnames.ora location. In case not set, it goes to default of $ORACLE_HOME/network/admin – Fábio Galera Mar 21 '18 at 09:20
  • @FábioGalera, `$TNS_ADMIN` and `$ORACLE_HOME/network/admin` looks like Linux but problem is on .NET, so most likely Windows. The search path for `tnsnames.ora` can vary a lot. – Wernfried Domscheit Mar 21 '18 at 09:53
  • @WernfriedDomscheit The idea of TNS_ADMIN and ORACLE_HOME/network/admin is the same for Windows and Linux, you just have to change the variable from $ to %% – Fábio Galera Mar 22 '18 at 10:11
  • @FábioGalera, I mean on Windows the application searches also other loacation, e.g. defined by Registry key or current folder or defined in .NET config file. – Wernfried Domscheit Mar 22 '18 at 10:48

0 Answers0