Sai Munikuntla
Sai Munikuntla

Reputation: 51

RStudio server ROracle throws : Error in .oci.Driver() : ROracle internal error [rociDrvInit, 1, -1]

I've setup RStudio server and pointed it to use an existing R (2.13) installation. ROracle works fine when accessed from R, but the same does not work from RStudio web-interface.

> library(ROracle)

Loading required package: DBI

> drv <- dbDriver("Oracle")

Error in .oci.Driver() : ROracle internal error [rociDrvInit, 1, -1]

I installed RStudio server with --nodeps and later pointed it to an existing installation of R by setting the values in /etc/rstudio/rserver.conf file.

Tried getting help from RStudio support, but was pointed toward "Stack Overflow". http://support.rstudio.org/help/discussions/problems/1879-rstudio-roracle-internal-error

Thanks in advance, Sai.

Upvotes: 3

Views: 1633

Answers (1)

Sai Munikuntla
Sai Munikuntla

Reputation: 51

Finally got it working with help from Denis Mukhin on the Oracle forums. In particular, ORACLE_HOME and OREACLE_SID were missing in the RStudio environment. Adding the following lines to ~/.Renviron fixed it:

ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
ORACLE_SID=<your sid (the default is usually orcl)>
export ORACLE_HOME ORACLE_SID

Upvotes: 2

Related Questions