You might see the below error while making jdbc connections from R programs.
java.lang.OutOfMemoryError: Java heap space
If you face java heap size exceptions in RJDBC connections like above, simply increase the JAVA heap size from your R program. Sample snippet is given below.
options(java.parameters = "-Xmx8048m")
library("RJDBC")
or
options(java.parameters = "-Xmx8g")
library("RJDBC")
Hope this helps you.