cannot connect to Teradata - how can I fix it Please

Hi Rcommunity,

I am trying to connect Teradata from Rstudio. I also wanted to use dplyr, therefore, I am following instruction from here.

Below is my code


con <- dbConnect(todbc(), 
                 driver = "{Teradata Driver}", DBCName = "edw.Phealth",
                 uid = "Myusername", pwd = "password")

When above code is executed I get following error:

[Driver Manager] Can't open lib 'Teradata Driver': file not found

Should I be using something else instead of "{Teradata Driver}" ?

Can somebody please help me out, its very important for my work. If anybody could explain and provide me the steps or code for Teradata connection will be very much appreciated. I have very little experience when it comes to database connections.

I am using a secure environment, therefore, cannot copy error message from it but I can provide as much information as I can if required.

Thank you

1 Like

I think you do have to define the Teradata Driver as a connection string at some point. See the "Connection Strings" section of the odbc package here.

dplyr.teradata isn't actually part of dplyr, and I think it's relatively new, so you might consider filing an issue in the repo if you can't sort it out.

How can I find out the driver name required for Teradata? I just don't get it why its not hard to connect a database.

I don't know. I could be wrong about the driver formatting, but I'm trying to extrapolate from the working examples. I've pinged a colleague who will hopefully be able to give better advice. Couple other things to look at, perhaps;

The README for the operating-system-specific driver:

As I mentioned, with a new package, it might be worth filing an issue, since you're likely not the only one who will run into this problem.

1 Like

Hi, here is another link that may help with that:

Here's an article that walks through how to install the ODBC drivers:


I think the important part I am missing is the Driver name and I just can't seem to figure it out. I have installed ODBC but still can't find the driver for Teradata? Does it have to be instally locally in PC ? Is there package for R interface to the Teradata

con <- DBI::dbConnect(odbc::odbc(),
                      Driver = "[your driver's name]",
                      Host   = "[your server's path]",
                      DBCName = "[IP Address or Alias]"
                      UID    = rstudioapi::askForPassword("Database user"),
                      PWD    = rstudioapi::askForPassword("Database password"))

I have a big project which is depended on R connecting to Teradata :expressionless:

Oh that you'd download from the Teradata site, here's a direct link if you're using Windows:

Windows has a ODBC Administrator (if on Windows 10, press the Windows key, and start typing "odbc" to find that app). There you'll see all your available drivers listed. Including the Teradata drive after you install it. In the Driver argument of your connection, use the name that the Teradata driver is listed under the ODBC admin. For example: Driver = "Teradata Driver 16.10"

I was hoping for packages rather then actual driver installation in my Pc. I am using Rstudio Pro in secure environment therefore cannot install it.

I think I will have to find different solution.

Thank you all for help.

Oh ok, as an RStudio Pro customer, your company has access to ODBC drivers that we (RStudio) support: . It includes a Teradata driver.

Of course, that's something an Linux admin would have to install, but it may be worth it because of the importance of your project.


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.