I’ve created a connection to Db2 Warehouse on Cloud: dashDB for Analytics-t1 / Database: BLUDB. I’ve given ‘dashdb connect’ as the connection name.
Then I've selected Tools / RStudio. In RStudio, I've run the following lines. The error message below.
Code snippet:
library(ibmdbR)
con <- idaConnect('BLUDB','','')
#Close the connection
idaClose(con)
Output:
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
Your code snippet will only work as is if you run it in the RStudio from the DB2 Warehouse console. If you launch RStudio within DSX you need to configure connectivity. The following worked for me:
Replace "..." with your credentials and you should be good to go. I followed the instructions from the video named "Connect to dashDB in RStudio" on this page: https://datascience.ibm.com/docs/content/analyze-data/rstudio-overview.html and found the following documentation: https://datascience.ibm.com/blog/dashdb-r-dsx/