我已经在云上创建了一个到Db2仓库的连接: dashDB for Analytics-t1 /数据库: BLUDB。我已经给出了‘dashdb connect’作为连接名称。
然后我选择了Tools / RStudio。在RStudio中,我运行了以下代码行。下面的错误消息。
代码片段:
library(ibmdbR)
con <- idaConnect('BLUDB','','')
#Close the connection
idaClose(con)输出:
con <- idaConnect('BLUDB','','')
Warning messages:
1: In RODBC::odbcDriverConnect("DSN=BLUDB", believeNRows = FALSE) : [RODBC] ERROR: state 08001, code -30082, message [unixODBC][IBM][CLI Driver] SQL30082N Security processing failed with reason "17" ("UNSUPPORTED FUNCTION"). SQLSTATE=08001
2: In RODBC::odbcDriverConnect("DSN=BLUDB", believeNRows = FALSE) : ODBC connection failed发布于 2017-09-02 01:34:59
只有当您从DB2仓库控制台在RStudio中运行它时,您的代码片段才能正常工作。如果在DSX中启动RStudio,则需要配置连接。下面的方法对我很有效:
install.packages("ibmdbR")
library(ibmdbR)
dsn_driver <- "BLUDB"
dsn_database <- "BLUDB"
dsn_hostname <- "..."
dsn_port <- "50000"
dsn_protocol <- "TCPIP"
dsn_uid <- "..."
dsn_pwd <- "..."
con_path <- paste(dsn_driver,";DATABASE=",dsn_database,";HOSTNAME=",dsn_hostname,";PORT=",dsn_port,";PROTOCOL=",dsn_protocol,";UID=",dsn_uid,";PWD=",dsn_pwd,sep="")
ch <-idaConnect(con_path)
idaInit(ch)
idaShowTables()替换"...“带着你的证书,你应该可以走了。我按照此页面上名为“在RStudio中连接到dashDB”的视频中的说明操作:https://datascience.ibm.com/docs/content/analyze-data/rstudio-overview.html,并找到了以下文档:https://datascience.ibm.com/blog/dashdb-r-dsx/
https://stackoverflow.com/questions/45991726
复制相似问题