Arcmap 10.5.1 ORA-12154: TNS:could not resolve the connect identifier specifiedNo extended error

1505
6
Jump to solution
01-03-2019 05:49 AM
Highlighted
New Contributor II

Hi, I'm trying to connect to an Oralce 12c database with instant client and tnsname. I've installed the client, configured the TNS_ADMIN variable, created the tnsnames.ora file and I've set the path variable to read the x64 client before the x86, however, when I try to connect to the db from Arcmap I obtain the error: ORA-12154: TNS:could not resolve the connect identifier specifiedNo extended error.

The tnsname.ora file is correct, since I have connected successfully in sqldeveloper using the same alias.

Does anyone have any suggestion?

Thanks

Tags (2)
1 Solution

Accepted Solutions
Highlighted
New Contributor II

Thank you everyone, I have solved the issue by creating the folder network/admin in the instant client folder and copying the tnsnames.ora file into that folder. Now it works, so I think it was due to a wrong configuration of the tns_admin variable (I will investigate about this).

View solution in original post

6 Replies
Highlighted
Esteemed Contributor

What is the exact Oracle version that you are trying to access?

Reply
0 Kudos
Highlighted
New Contributor II

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit

Reply
0 Kudos
Highlighted
Occasional Contributor III

Hi Vincenzo,

I'd suggest you look at / try a couple of things here:

  1. If you want to rule out an issue with TNS Names, try connecting using the EZConnect syntax instead. If this works with nothing else changing then we know there is an issue with TNS Names in some way.
  2. Make sure you are using a 12.1.0.2 client so that it matches your Oracle instance. Since you are connecting to ArcMap, you only really need the 32 bit client. But if you need the 64 bit client as well to use Pro or Server, just make sure it is listed before the 32 bit which I think you already have.
  3. Make sure the TNS configuration string is in TNSNAMES.ORA file of 32-bit Oracle client. ArcMap can't use information from the 64 bit client so they need to match here.

If you can connect fine from SQL Developer (which I presume is a 64 bit install on your machine?) then I would guess the issue is related to the 32 bit client in some way. We just need to narrow it down a bit more.

One more thing, this isn't related to your issue but you may be interested in installing it, we have a patch for 10.5.1 for some Oracle issues. See more below:

Esri Support ArcMap 10.5 (10.5.1) 

Jonathan

Highlighted
MVP Regular Contributor

In my organization, I had issues connecting to the database from my local machine, but not from a server

ERROR:

ORA-01034: ORACLE not available

ORA-27101: shared memory realm does not exist

Linux-x86_64 Error: 2: No such file or directory

Additional information: 4376

Additional information: 344321215

Process ID: 0

Session ID: 0 Serial number: 0

http://www.dba-oracle.com/sf_ora_27101_shared_memory_realm_does_not_exist.htm

The reason that local machines seem to get the error connecting to the DB is because the centralized management directory server stores network address tnsping details using SERVICE_NAME still rather than SID, which is preventing local machines/vdi's access to the DB.

This is revealed by comparing tnsping results from local machine vs from server machine.

https://docs.oracle.com/database/121/NETAG/config_concepts.htm#NETAG003

The DBA can fix this configuration in the directory server, or alternatively, reconfigure tnsping details back to SERVICE_NAME.

Reply
0 Kudos
Highlighted
New Contributor II

Thank you everyone, I have solved the issue by creating the folder network/admin in the instant client folder and copying the tnsnames.ora file into that folder. Now it works, so I think it was due to a wrong configuration of the tns_admin variable (I will investigate about this).

View solution in original post

Highlighted
Occasional Contributor III

Thanks for the update Vincenzo. Glad you got it sorted out!

Jonathan