[R] connecting to Oracle

whizvast whizvast at gmail.com
Sun Oct 25 18:08:17 CET 2009


I found an old Internet posting and it solved my problem. 
For those who is suffering from the same problem, try this:

channel <- odbcDriverConnect(connection="Driver={Microsoft ODBC for
Oracle};DSN=abc;UID=abc;PWD=abc", case = 'oracle')
x <- sqlQuery(channel, paste("select * from  db_name.tbl_name"))




whizvast wrote:
> 
> Hi, useR-
> 
> I am connecting to Oracle database using RODBC, but keep getting this
> error message:
> 
>> library(RODBC)
>> channel <- odbcConnect(dsn="abc", uid="abc", pwd="abc", case='oracle')
> Warning in odbcDriverConnect(st, ...) :
>   [RODBC] ERROR: state IM002, code 0, message [Microsoft][ODBC Driver
> Manager] Data source name not found and no default driver specified
> Warning in odbcDriverConnect(st, ...) : ODBC connection failed
> 
> Do you know what needs to be corrected? I am a beginner in DB.
> There was a post for the exact same message, but no one replied. 
> Hope this time someone else help me! Thank you. 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/connecting-to-Oracle-tp26031761p26049795.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list