我需要通过R连接到oracle数据库 我这样做
library(RODBC)
library(RJDBC)
odbcConnect(dsn = "NBD-TEST-DEV-BLACKBOX",
uid = "Y", pwd = "X")
我使用oracle sql developer客户端获取访问权限
当我尝试通过R连接时 我得到了错误 警告消息:
1: In RODBC :: odbcDriverConnect ("DSN = NBD-TEST-DEV-BLACKBOX; UID = x; PWD = y"):
[RODBC] ERROR: state IM002, code 0, message [Microsoft] [ODBC Driver Manager] Data source not found and no default driver used
2: In RODBC :: odbcDriverConnect ("DSN = NBD-TEST-DEV-BLACKBOX; UID = x; PWD = y"):
ODBC connection failed
我认为它将数据库放在另一个IP上(在ip x.x.x.x的服务器上是R,在IP Y.y.y.y上是oracle
所以我有两个问题
我如何指示ODBC的路径,在哪里。我在路径"C:\Users\Admin\Desktop\sqldeveloper-19.1.0.094.2042-x64"
以及连接时如何指示所需的IP