connecting to teradata

I am trying to connect to teradata. I have been able to do so using RODBC

### Establish Teradata Connection
connectionstring.teradata <- paste("Driver=teradata;
                                   DBCName=NAME;
                                   UID=",username,";
                                   PWD=",rstudioapi::askForPassword("Password"),";
                                   authentication=LDAP", 
                                   sep = "")
 
# Connect
ch.teradata <- odbcDriverConnect(connectionstring.teradata)

I would like to move to the DBI package, but am having issues when I try the following code, I get an error (Error: nanodbc/nanodbc.cpp:983: 00000: [Teradata][ODBC Teradata Driver][Teradata Database] (210) The UserId, Password or Account is invalid. FailCode = -8017). I think the issue is that I need to tell it to use ldap, but I don't know how ... anybody know?

con_td <- DBI::dbConnect(odbc::odbc(),
                         Driver = "teradata",
                         DBCName = "NAME",
                         # MechanismName = "ldap",
                         uid = "username",
                         pwd = rstudioapi::askForPassword("Password"))

This topic was automatically closed 21 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.