Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Connecting to SQL Server with R using RJDBC and on Mac OS X
# reference document on RJDBC
# install.packages("RJDBC",dep=TRUE)
drv <- JDBC("" , "/Users/johndacosta/Downloads/sqljdbc_4.0/enu/sqljdbc4.jar" ,identifier.quote="`")
conn <- dbConnect(drv, "jdbc:sqlserver://;databaseName=master", "sa", "password")
d <- dbGetQuery(conn, "select * from sys.databases where database_id <= 4 ")
# R.Version()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment