I\'m trying to connect to a Microsoft SQL Server from R on Mac/Linux, and I have problems with RJDBC. When I\'ve downloaded both Microsoft\'s driver and JTDS, but none of th
The following code achieves your goal of connecting to R from Mac OS x. Download the Microsoft JDBC driver from Microsoft here
Link to Gist / Code in Github
# install.packages("RJDBC",dep=TRUE)
library(RJDBC)
drv <- JDBC("com.microsoft.sqlserver.jdbc.SQLServerDriver" , "/Users/johndacosta/Downloads/sqljdbc_4.0/enu/sqljdbc4.jar" ,identifier.quote="`")
conn <- dbConnect(drv, "jdbc:sqlserver://192.172.1.210:55158;databaseName=master", "sa", "password")
d <- dbGetQuery(conn, "select * from sys.databases where database_id <= 4 ")
summary(d)