Im want conect sqldeveloper with Rstudio by library(RJDBC)
library(RJDBC)
driver <- JDBC(driverClass = 'oracle.jdbc.OracleDriver',
"D:\\OneDrive - CGIAR\\Documents\\Conexiones\\ojdbc8.jar")# This part is run well
conexion <- dbConnect(driver,
'jdbc:oracle:thin:@172.22.42.160:orclA','bpre_pasaportes', 'metalplain793') # This show this error
Error in dbConnect(driver, "jdbc:oracle:thin:@172.22.42.160:orclA", "bpre_pasaportes", :
Unable to connect JDBC to jdbc:oracle:thin:@172.22.42.160:orclA
JDBC ERROR: IO Error: could not resolve the connect identifier "172.22.42.160:orclA"
Somes ideas for make this conection for this or other ways?
library(RJDBC)
jdbcDriver <- JDBC("oracle.jdbc.OracleDriver",
classPath = "file path to where ojdbc6.jar is installed on your computer")
jdbcConnection <- dbConnect(jdbcDriver, "jdbc:oracle:thin:@YOUR_SERVER","YOUR_USERNAME_XX","YOUR_PASSWORD_XX")
dbListTables(jdbcConnection) # For test the connection
Table_1<- dbGetQuery(jdbcConnection, "SELECT * FROM NAME_OF_TABLE") # Access to one table