New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Teradata Configuration Help Needed #92
Comments
Please follow the provided issue template, in particular specify what version of the odbc package you are using. The error is coming from a call to |
Issue Description and Expected ResultNot able to connect DatabaseTeradata 15 Reproducible Examplelibrary(odbc)
library(DBI)
dbConnect(odbc::odbc(), "Teradata")
Error: nanodbc/nanodbc.cpp:950: 00000: --> Session Info> devtools::session_info()
Session info --------------------------------------------------------------------------------------------------
setting value
version R version 3.3.1 (2016-06-21)
system x86_64, darwin13.4.0
ui RStudio (1.0.143)
language (EN)
collate en_US.UTF-8
tz America/Chicago
date 2017-07-19
Packages ------------------------------------------------------------------------------------------------------
package * version date source
bit 1.1-12 2014-04-09 CRAN (R 3.3.0)
bit64 0.9-7 2017-05-08 cran (@0.9-7)
blob 1.1.0 2017-07-07 Github (hadley/blob@9dd54d9)
DBI * 0.7 2017-06-18 cran (@0.7)
devtools 1.12.0 2016-06-24 CRAN (R 3.3.0)
digest 0.6.12 2017-01-27 cran (@0.6.12)
hms 0.3 2016-11-22 CRAN (R 3.3.2)
memoise 1.0.0 2016-01-29 CRAN (R 3.3.0)
odbc * 1.1.1.9000 2017-07-19 Github (rstats-db/odbc@dc42360)
Rcpp 0.12.12 2017-07-15 cran (@0.12.12)
rlang 0.1.1.9000 2017-06-26 Github (hadley/rlang@8594edf)
tibble 1.3.3 2017-05-29 Github (tidyverse/tibble@b2275d5)
withr 1.0.2 2016-06-20 CRAN (R 3.3.0) |
I just tried RODBC library(RODBC) Warning messages: I have previously uninstalled iODBC and reinstalled it, not sure why RODBC is still pointing to it. |
Update, this may not be directly related to odbc issue, since odbc suggests to use unixodbc (which may not work well with Teradata?) I looked online about iODBC and found the linked ini are under /Library/ODBC folder. so I went there and configured both files: [edwops] [Teradata Database ODBC Driver 16.00] Then I was able to connect
After that, I copied exact content to the unixodbc linked inis, still seeing the same error. |
It looks to me like you need a recent version of unixODBC (2.3.0 >) to be compatible with the teradata driver. If you do want to use iODBC you can do so by installing odbc with options |
Hey Jim, I started off with the guide on landing page, and my unixodbc is the latest version - 2.3.4. |
@jimhester could you also guide me how to find the iodbc libraries? what search string should I use? |
The teradata driver and odbc need to be compiled against the same driver manager. You can check which one the driver is expecting using If the driver is compiled against iODBC you will need to make sure odbc is also compiled against iODBC rather than unixODBC. The easiest way to do this is to make sure that Alternatively you can specify the devtools::install_github("rstats-db/odbc", args = "--configure-vars=PKG_LIBS=-liodbc INCLUDE_DIR=/usr/local/Cellar/libiodbc/3.52.12/include LIB_DIR=/usr/local/Cellar/libiodbc/3.52.12/lib/") |
Hi Jim, I tried both approaches, but somehow it's still pointing to unixodbc automatically. My libodbc path is identical to yours
Still same msg when I try to connect
|
The relevant message there is
You need to tweak the quoting slightly (see the single quotes around the configure-vars value), I was using devel devtools which handles this, but can reproduce your behavior with CRAN devtools. devtools::install_github("rstats-db/odbc", args = "--configure-vars='PKG_LIBS=-liodbc INCLUDE_DIR=/usr/local/Cellar/libiodbc/3.52.12/include LIB_DIR=/usr/local/Cellar/libiodbc/3.52.12/lib/'", force = T) |
Thanks for the help. After many attempts, I was able to connect (only) via the connect string style
However, when I try to use the more traditional style
It told me
Any idea why? |
The parameters are case sensitive for some drivers. |
oh correction, I was using keyringr for the 2nd case, like below:
once I swap in the hardcoded string, it works fine. So I guess there's nothing related to odbc package. Last question before I close the issue, what's the default odbc.ini / odbcinst.ini location for iodbc? |
http://www.iodbc.org/dataspace/doc/iodbc/wiki/iodbcWiki/FAQ#What%27s%20an%20odbc.ini%20and%20what%20do%20I%20put%20in%20it%3F has information what what search path iODBC uses to find the config files. I don't think there is an equivalent to |
Appreciate the help along the way! |
Hi Jim,
I was following Aaron's advice and start switching to odbc. However I do have problems in making connection work. Below are my configurations, but it doesn't work nor give me enough info to figure out why. I also tried to escape the space between application and support, but it triggers a file not found error.
odbc.ini
[Teradata]
Driver = Teradata Driver
Database = xxxxxx
Servername = xxxxxx
UserName = xxxxxx
Password = xxxxxx
Port = 1025
odbcinst.ini
[Teradata Driver]
Driver = /Library/Application Support/Teradata/Client/16.00/lib/tdata.dylib
The text was updated successfully, but these errors were encountered: