RStudio odbcConnect failed to connect to Oracle database


I'm using RStudio server on Linux x86_64 version 1.2.1335 with R 3.6.0.
I configured ODBC to connect to Oracle database and all works fine with:

  • unixodbc (tested by isql)
  • R shell in a Linux terminal using standard Linux user

When I try to connect using RStudio IDE, logged in using same Linux user, I get an error:

> library(RODBC)
> ch<-odbcConnect("DSN_name")
Warning messages:
1: In RODBC::odbcDriverConnect("DSN=DSN_name") :
  [RODBC] ERROR: state HY000, code 12170, message [unixODBC][Oracle][ODBC][Ora]ORA-12170: TNS:Connect timeout occurred
2: In RODBC::odbcDriverConnect("DSN=DSN_name") : ODBC connection failed

Thanks for any suggestions.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.