I am trying to connect to work SAS server from R, to extract datasets for further processing/analysis in R. Due to corporate constraints, the only solution available is SAS JDBC type of connection, using IOM server subprotocol. I have been trying to make this work with our IT and SAS support on and off for months now. I had them install the SAS JDBC drivers on my machine, and via trial and error arrived at the below piece of R code to establish the connection: r library(RJDBC)
library(rJava)
.jinit()
driver <- JDBC(driverClass = "com.sas.rio.MVADriver")
conn <- dbConnect(
driver,
"jdbc:sasiom://xxx.xxx.xxx:12345",
"user",
"pwd"
)
running the above code I am able to create the driver object running JDBC() function, however, dbConnect throws the below exception: r Error in dbConnect(driver, "jdbc:sasiom://xxx.xxx.xxx:12345", :
Unable to connect JDBC to jdbc:sasiom://xxx.xxx.xxx:12345
JDBC ERROR: com/sas/util/ChainedExceptionInterface Interestingly, using the dbConnect function with a modified connection string, r conn <- dbConnect(
driver,
"jdbc:sasiom://xxx.xxx.xxx:12345?user=user&password=pwd"
)
gives a different error: r Error in dbConnect(driver, "jdbc:sasiom://xxx") :
Unable to connect JDBC to jdbc:sasiom://xxx
JDBC ERROR: com/sas/util/RBBase Unfortunately neither of the error messages don't give too much to work with. We have tried experimenting with different Java versions, and I have tripple checked that all required JAR files are accessible via CLASSPATH. I have extensively researched the internet and asked LLMs to no avail, and so now my last hope is the community hivemind power.. java version "1.8.0_60" SAS version 9.4 Grid M8 JDBC drivers 9.4
... View more