5

I want to add two service names in one tnsnames.ora file and getting error in below 2 image in "Microsoft ODBC Driver Configuration". enter image description here

sandhiya
  • 133
  • 2
  • 3
  • 17
  • Well, which of the two TNS aliases are you referencing? What is in your sqlnet.ora file? Can you connect using that TNS alias via `SQL*Plus`? Can you `tnsping` it? – Justin Cave Sep 11 '16 at 08:15
  • both the alias names are referencing to 2 different database and yes i can ping.actually i am using oracle client and i don't have database in my pc i am connecting with ip address,servername and i don't know what is sqlnet.ora file – sandhiya Sep 11 '16 at 08:22
  • You can ping. Can you `tnsping`? Can you connect via `SQL*Plus`? Which of the two aliases are you using in your ODBC connection? How are you configuring your ODBC connection? The `sqlnet.ora` file is in the same directory as the `tnsnames.ora` file. – Justin Cave Sep 11 '16 at 08:51
  • i don't know how to do tnsping and also don't know sql*plus.I am using ALXTEST and ALXORCL two aliases.I am using Microsoft ODBC Source Administrator for configuring which is in systemWow64 folde.There is no sqlnet.ora file is present in the directory i am using only instantclient_12_1 – sandhiya Sep 11 '16 at 09:22

4 Answers4

5

One trick which help me is, when you fill:

Data Source Name     Test
TNS Service Name     10.1.1.105:1521/ALXTEST

so you need to specify the hostname:port/servicename, then it should work

PV8
  • 5,799
  • 7
  • 43
  • 87
  • This worked for me. I don't really need it in the TNS names file. I just need to be able to connect via DSN. – Ryan Boch Oct 19 '20 at 17:46
0

click on start icon->type cmd in the text box-> you can see cmd.exe-> click on it-> type tnsping click enter.

check whether you can connect to the destination or not

rajesh
  • 9
  • 1
0

I had this issue and on a specific version of Oracle (instant client 11.2), I added .World after the tnsname and it worked.

ALXTEST.World =
(description =
...
(service_name =ALXTEST.World

Peter E
  • 1
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 19 '23 at 06:23
0

Yes This is the answer for Error in ODBC using TNS provided above: [oracle odbc driver sqlstate 08004 ora 12154 tns] It is working on Oracle 19 for 32 bit also on Windows 11: See the image attached.

Original answer/message here: https://stackoverflow.com/a/62892257/22208353 Data Source Name Test123xyz TNS Service Name 10.1.1.105:1521/ALXTEST

enter image description here