Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tgh0831/6e69a0e8cb3e33e614a8e96938aba368 to your computer and use it in GitHub Desktop.
Save tgh0831/6e69a0e8cb3e33e614a8e96938aba368 to your computer and use it in GitHub Desktop.
Instructions on how to install ROracle for R on Windows.

Download binary from oracle: http://www.oracle.com/technetwork/database/database-technologies/r/roracle/downloads/index.html

The run the following command in r, substituting the file path:

setwd('xxxxx')   # set to path of download
install.packages('ROracle_1.1-11.zip', repos = NULL)

Then load the library and use the package - you may have to change XXXX to whatever is in your TNS Names:

library('ROracle')
drv <- dbDriver("Oracle")
# NOTE: never store passwords in a saved script!!
con <- dbConnect(drv, "USER GOES HERE", "PASSWORD GOES HERE", dbname='XXX')

test connection:

dbReadTable(con, 'DUAL')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment