Luis Ridao Cruz
2009-Aug-04 15:44 UTC
[R] RODBC package to connect to Oracle database Linux
R-help, I get the following error message when trying to connect to an Oracle database through R (2.8.1) under Linux (Ubuntu 9.04).> channel<-odbcConnect("magnus",uid="luisr",pwd="juanayzakarias")Warning messages: 1: In odbcDriverConnect(st, ...) : [RODBC] ERROR: state IM002, code 0, message [unixODBC][DriverManager]Data source name not found, and no default driver specified 2: In odbcDriverConnect(st, ...) : ODBC connection failed I connect to the Oracle database in the following way: $ sqlplus username/password at myIPaddress/databaseName Doing some googling I found a mail thread with the following code: con<-odbcDriverConnect("SERVER=myIPaddress;DRIVER=oracle;DATABASE=databaseName") Warning messages: 1: In odbcDriverConnect("SERVER=192.168.20.129;DRIVER=oracle;DATABASE=MAGNUS") : [RODBC] ERROR: state IM002, code 0, message [unixODBC][DriverManager]Data source name not found, and no default driver specified 2: In odbcDriverConnect("SERVER=192.168.20.129;DRIVER=oracle;DATABASE=MAGNUS") : ODBC connection failed which it is not the correct syntax (I also need some help on this). The problem is with the driver. It seems that the file "odbcinst.ini" contains the information of the driver but mine is empty although I have already run the Oracle Universal Installer to install the Oracle ODBC driver for linux. In that same mail thread there are examples on how this file should look like but on this I would need also help as there is no example on Oracle drivers (just MySql, PostgreSQLt) Thanks in advance ---------------------------------------------------------------- Luis Ridao Cruz Faroe Marine Research Institute N?at?n 1, P.O. Box 3051 FO-110 T?rshavn Faroe Islands Tel : (+298) 353900, Tel (direct) : (+298) 353912 Mob.:(+298) 580800, Fax: : (+298) 353901 e-mail: luisr at hav.fo luridao at hotmail.com