[R-sig-DB] In odbcDriverConnect ODBC connection failed

Thomas Liebig thom@@@||eb|g @end|ng |rom |@|@@|r@unho|er@de
Tue Sep 29 13:54:46 CEST 2009


Hi Luis,

I also use RODBC to connect an ORACLE DB.
This is implemented using the following statements

require(RODBC)
con<-odbcConnect(DB$name,DB$user,DB$pass,case="tolower",believeNRows=FALSE)
res<-sqlQuery(con,"select 'test' from dual")
odbcClose(con)

To test your unixodbc installation you should ask google, there are some 
linux tools to test your configuration.

regards,
Thomas


Luis Ridao Cruz schrieb:
> R-sig-DB help,
> 
> I have installed an ODBC Driver for Linux.
> 
> I want to connect to our database through R via:
> 
>> library(RODBC)
>> con <- odbcDriverConnect("SERVER=IP_address:PORT;DRIVER=ORACLE;DATABASE=MAGNUS")
> Warning message:
> In odbcDriverConnect("SERVER=IP_address:PORT;DRIVER=ORACLE;DATABASE=MAGNUS") :
>   ODBC connection failed
> 
> I don't really know whether this is the right syntax. I copy-paste files "odbc.ini" and "odbcinst.ini":
> 
> ## file odbc.ini
> [ORACLE]
> Driver        = ORACLE
> Database        = //IP_address:PORT/MAGNUS
> User        = my_username
> Password        = my_password
> METADATA_ID        = 0
> ENABLE_USER_CATALOG        = 1
> ENABLE_SYNONYMS        = 1
> 
> ## file odbcinst.ini
> [ORACLE]
> Description        = Easysoft ODBC Oracle Driver
> Driver        = /usr/local/easysoft/oracle/libesoracle.so
> Setup        = /usr/local/easysoft/oracle/libesoraclesetup.so
> DontDLClose        = 1
> FileUsage        = 1
> UsageCount        = 1
> 
> 
> Thanks in advance

-- 
Thomas Liebig
Fraunhofer-Institut für Intelligente Analyse- und
Informationssysteme (IAIS)

Schloss Birlinghoven, D-53754 Sankt Augustin, Germany
Email:  thomas.liebig using iais.fraunhofer.de
Phone:  +49 2241 142050
Fax:    +49 2241 142072




More information about the R-sig-DB mailing list