I get an error when I try to make a connection to Oracle11G DB. My output is as below. Please advise
>Sys.setenv(JAVA_HOME='C:/Program Files/Java/jdk1.6.0_45')
> options(java.parameters="-Xmx2g")
> library(rJava)
> .jinit()
[1] 0
> print(.jcall("java/lang/System", "S", "getProperty", "java.version"))
[1] "1.6.0_45"
> library(RJDBC)
> # Create connection driver and open connection
> jdbcDriver = JDBC(driverClass="oracle.jdbc.OracleDriver", classPath="pathtofile/ojdbc6.jar")
> jdbcDriver
An object of class "JDBCDriver"
Slot "identifier.quote":
[1] NA
Slot "jdrv":
[1] "Java-Object{oracle.jdbc.OracleDriver@9506dc4}"
> jdbcConnection = dbConnect(jdbcDriver,"jdbc:oracle:thin:@//hostname:port/servicename","username","password")
Error in dbConnect(jdbcDriver, "jdbc:oracle:thin:@//hostname:port/servicename", :
unused arguments (jdbcDriver, "jdbc:oracle:thin:@//hostname:port/servicename", "username","password")
I am not sure if this the answer you are looking for, but this is how I make the connection: