[R-sig-DB] ODBC driver in ubuntu

Prof Brian Ripley r|p|ey @end|ng |rom @t@t@@ox@@c@uk
Wed Oct 30 14:22:41 CET 2013


On 30/10/2013 13:18, Luis Ridao wrote:
> 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:

You have not specified a DSN called BASTA nor basta.
>
>> 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]]
>
> _______________________________________________
> R-sig-DB mailing list -- R Special Interest Group
> R-sig-DB using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-db
>


-- 
Brian D. Ripley,                  ripley using stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595




More information about the R-sig-DB mailing list