I found that there are some problems connecting to Oracle with R. It may just be the implication and settings that we have in my company, but here is what I did to get it working.
library(RODBC) ch=odbcConnect("<AliasForYourDatabase>",pwd = "xxxxxxxx", believeNRows=FALSE) odbcGetInfo(ch)
The critical step for me was 'believeNRows=FALSE' , otherwise I got the following error when I sent the request:
"Error in .Call (C_RODBCFetchRows, attr (channel," handle_ptr "), max, buffsize,: negative vector lengths are not allowed"
This is because Oracle does not provide the actual number of rows back to the connection.
Andrew Elliott
source share