Fatal Error with RODBC in RStudio, not R (Session Aborted)



Hello There,

I have been having some trouble getting my connection set up to an Oracle database in R. I recently changed my machine (Dell running Windows) to a MacBook Pro (macOS High Sierra version 10.13.5). After a lot of work with my DBA, was finally able to connect to the database using R (both in the terminal and in R), but when I run the same code to connect in RStudio, I get a fatal error and RStudio crashes. The code I am running is:

con <- odbcConnect("dsn", uid = "username", pwd = "password")

I already tried uninstalling and reinstalling RStudio, but the issue is still happening.

I have no clue why this won't work in RStudio. Any help is greatly appreciated.

NOTE: I get the same issue when I use the odbc package instead of RODBC.

Thank you,


Can you share a bit more detail about the fatal error and RStudio crashing? Is there any logging or error message displayed?

The ROracle package has a knack for being very environmentally sensitive. I would do an environment comparison between RStudio and R in the terminal with Sys.getenv(). RStudio does change some environment variables, which may be the reason for your problem. In particular, I would keep an eye out for LD_LIBRARY_PATH, PATH, and friends, as those are some of the most regular culprits.