[R-sig-DB] ODBC driver in ubuntu

Luis Ridao |ur|d@o @end|ng |rom gm@||@com
Wed Oct 30 14:18:33 CET 2013


R-sig-DB help,


I'm trying to connect to an oracle database through R.
I have installed the oracle client and it seems that the driver is also
installed.
However the connection fails:

> library(RODBC)
# WITH DATABASE NAME
>channel <- odbcConnect('192.168.20.10', uid='my_uid', pwd='my_pwd')
Warning messages:
1: In odbcDriverConnect("DSN=192.168.20.10;UID=luisr;PWD=juanayzakarias") :
  [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver
Manager]Data source name not found, and no default driver specified
2: In odbcDriverConnect("DSN=192.168.20.10;UID=luisr;PWD=juanayzakarias") :
  ODBC connection failed
# WITH DATABASE IP
>channel <- odbcConnect('BASTA', uid='my_uid', pwd='my_pwd')
Warning messages:
1: In odbcDriverConnect("DSN=basta;UID=luisr;PWD=juanayzakarias") :
  [RODBC] ERROR: state IM002, code 0, message [unixODBC][Driver
Manager]Data source name not found, and no default driver specified
2: In odbcDriverConnect("DSN=basta;UID=luisr;PWD=juanayzakarias") :
  ODBC connection failed

My odbc.ini file looks like:

$ sudo gedit odbc.ini
[oracle_driver]
driver        = OracleODBC-11g
description        = Oracle_ODBC_driver
server        = basta
port        = 1521
sid        = 192.168.20.10
user        = my_uid
password        = my_pwd
logging        = No
logfile        =
enable_user_catalog        = yes
enable_synonyms        = yes
metadata_dont_change_case        = no
metadata_dont_do_schema        = no
metadata_id        = no
limit_long        = 0

$ sudo gedit odbcinst.ini
[OracleODBC-11g]
Description = Oracle ODBC driver for Oracle 11g
Driver = /u01/app/oracle/product/11.1.0/client_2/lib/libsqora.so.11.1
FileUsage = 1
Driver Logging = 7


can anyone help?

best,
Luis

	[[alternative HTML version deleted]]




More information about the R-sig-DB mailing list