Connect Datagrip to Oracle using TNS
Answered
Hi,
I am trying to connect to an Oracle database using TNS. I get this error: Error: Connection to DW failed. IO Error: could not resolve the connect identifier
I can successfully browse to the TNS name in my file. Also I can connect file with Oracle SQL Developer with the same TNS file and name.
Please sign in to leave a comment.
Did you ever get a resolution? I am running into the same problem (except not an amazon database).
I'm getting same problem. Using TNS and all available drivers (thin, OCI, OCI8) I get the same error:
Connection to failed.
Error de E/S: could not resolve the connect identifier "xxxxxx"
Using sqldeveloper with same configuration, the connection runs ok
Yep, same issue here..... Oracle connection using datagrip is way more complicated than it should be....
Same problem over here.
According to Oracle community forum you're missing some configuration files. Refer to https://community.oracle.com/thread/1084507
@vasily chernov that forum talks about the general TNS issue everyone has, and we usually solve problems like that rather quickly. Datagrip has problems that are not mentioned anywhere in that thread.
@Mmatiasn
> Datagrip has problems that are not mentioned anywhere in that thread.
Could you describe it in detail?
08006][17002] IO Error: could not resolve the connect identifier "tnsnames.ora"
this is my error, the same. JetBraind talk me, for a solution. Is not possible, that it is veri difficult????
I don't think we can connect through TNS Entry. I researched a lot. But if anyone has found solution to this, please do put it here.
Setup: Linux, Oracle Instant Client.
Instant Client has a network folder w/ admin folder w/ tnsnames.ora w/ standard "tns" type entries.
Drivers: Oracle Driver points to the instant client folder, ojdbc8.jar. Class oracle.jdbc.OracleDriver. Advanced Tab: nothing in database or server.
Data Sources: General Tab: TNSADMIN points to instant client's admin folder (w/ tnsnames.ora)
Tnsname: name of db in tnsnames.ora, Driver: thin, URL: jdbc:oracle:thin:@DBNAME
"TNS" set in drop box.
Test Connection; returns " Oracle .... successful"
Advanced Tab: database = tnsname db, nothing in server
Followup: if that doesn't work, try removing the oracle in the Drivers tab and trying one lower. Ex: remove oracle driver for ojdbc8 and use ojdbc6
Guys, we have no enough details to help you.
On the first screenshot I see an unusual path in the TNSADMIN field. In this field DataGrip expects the path to the directory where the TNSnames.ora file is located. Double check that the specified in this field directory contains such file.
TNS name should contain the name from this TNSnames.ora file (with the domain suffix or without — it depends on how the TNS listener is configured). Try both.
I've checked the connection using TNS configuration via both OCI and thin drivers — all work perfectly.
If the issue is still relevant, please add more details.
How does it look on Windows:
Hi,
I have exactly the same problem.
IDE can locate ora file. I can see all TNS names under TNS name dropdown. However, when I select one and click "test connection", I get [08006][17002] IO Error: could not resolve the connect identifier. I've tried DBeaver and SQL Developer with the same TNS settings and everything works just fine.
@..., may I ask you to create a new ticket on https://youtrack.jetbrains.com/issues/DBE and attach IDE logs (Help | Collect Logs and Diagnostic Data)?