[R] RJDBC
Nelson Anthony
nelson.chr82 at gmail.com
Wed May 3 00:18:16 CEST 2017
Hi all,
I am trying to connect to Database using RJDBC but due to some DB & Server
timezone mismatch I am facing below error message.
Error in .jcall(drv at jdrv, "Ljava/sql/Connection;", "connect",
as.character(url)[1], :
java.sql.SQLException: ORA-00604: error occurred at recursive SQL level 1
ORA-01882: timezone region not found
I tried to fix this issue using java by using this parameter
“-Doracle.jdbc.timezoneAsRegion=false”
and it worked
But I am trying to apply the same setting in R using option settings, but
it is not working. Also, I tried updating Rprofile
*My code snippet:*
Sys.setenv(JAVA_HOME='/usr/lib/jvm/java-8-openjdk-amd64')
options(java.parameters = "-Xmx8g")
options(java.oracle.jdbc.timezoneAsRegion="false")
dbcDriver <- JDBC(driverClass="oracle.jdbc.OracleDriver",
classPath="/usr/lib/oracle/12.2/client64/lib/ojdbc8.jar")
pcm_stg_conn <- dbConnect(jdbcDriver, "jdbc:oracle:thin:@//hostname:1521/SID",
"username", "password").
Can you please help in resolving this issue
Thanks & Regards.
Anthony Nelson
[[alternative HTML version deleted]]
More information about the R-help
mailing list