[R-sig-DB] RODBC and Oracle 11g Issue.....

Joe O jjo_ch|c@go @end|ng |rom y@hoo@com
Fri Mar 5 02:07:58 CET 2010


I am running CentOS release 5.3. This is the 64 bit version.

R Version is "R version 2.10.0 (2009-10-26)"
RODBC version is "1.3-1"

I have installed unix-odbc version unixODBC-2.2.14, and configured it (odbcinst.ini and odbc.ini).

I've got the 11.1 Oracle instant client installed, and configured (and all the environment variables set).

iSQL works:

[ruser using akoyavsrv05 instantclient_11_2]$ isql -v OracleLocal parts parts
+---------------------------------------+
| Connected!                            |
|                                       |
| sql-statement                         |
| help [tablename]                      |
| quit                                  |
|                                       |
+---------------------------------------+
SQL> select distinct segment from parts
+-----------------------------------------+
| SEGMENT                                 |
+-----------------------------------------+
| BTS                                     |
| FABRICATIONS                            |
| BAR STOCK                               |
| FORGINGS                                |
| TUBES                                   |
| CASTINGS                                |
| STATUS6                                 |
+-----------------------------------------+
SQLRowCount returns -1
7 rows fetched

as does sqlplus:

[ruser using akoyavsrv05 instantclient_11_2]$ ./sqlplus parts/parts using VSRV06

SQL*Plus: Release 11.2.0.1.0 Production on Thu Mar 4 19:02:47 2010

Copyright (c) 1982, 2009, Oracle.  All rights reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select distinct segment from parts;

SEGMENT
----------------------------------------
BTS
FABRICATIONS
BAR STOCK
FORGINGS
TUBES
CASTINGS
STATUS6

7 rows selected.

SQL> 


But R does not seem to want to work:

R version 2.10.0 (2009-10-26)
Copyright (C) 2009 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

[...]

Type 'q()' to quit R.

> library(RODBC)
> channel <- odbcConnect("OracleLocal", uid="parts", pwd="parts")
> sqlQuery(channel, "select distinct segment from parts", errors=TRUE)
character(0)
> sqlTables(channel)
> 

Any ideas? The sqlQuery should return 7 rows, right?

Thanks in advance




More information about the R-sig-DB mailing list