Some guide for conect Rstudio with sqldeveloper

Hi community,

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?

Tnks!.

Hi, Im find the solution.

  1. Install the oracle client.
    Oracle SQL Developer Downloads

  2. Activate the ODBC connections.

  3. Make a match with Rstudio by this:

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

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.