2
votes

I'm trying to connect to Teradata in SAS. I set up an teradata ODBC on the machine. The assumption currently for me is that using ODBC is the only way for me to access the database. And here is the syntax of my connection command:

Libname Teradata ODBC dsn = 'dsnname' uid = 'uid' pwd = 'pwd';

results: Error: The ODBC engine cannot be found. Error: Error in the LIBNAME statement.

It keeps saying that the ODBC engine cannot be found. I'm really confused now. Is there anything wrong with the command? Or I have to do something else outside SAS?

I check the licence Proc Setinit;

result: SAS/ACCESS Interface to Teradata ** the date shows not expired.

Could anyone give me some idea. Thank you very much!

1
Chris's answer below looks correct. You have the SAS/Access interface to Teradata installed, not the SAS/Access interface to ODBC (I'm guessing). That's why it's giving you an error message. Replacing the words "ODBC" with "Teradata" should resolve it as Chris pointed out.Robert Penridge

1 Answers

4
votes

Can't say I've ever used ODBC to access Teradata, can see it being highly inefficient.

Normally, you'd do pass-thru SQL to Teradata...

proc sql ;
  connect to teradata (user='username' pass='password' tdpid=prodserver) ;
  create table mydata as
  select * from connection to teradata
  (select a.* 
   from ds.enterprise_table as a) ;
  disconnect from teradata ;
quit ;

For a direct libname, the syntax would be

libname tdata teradata user='username' pass='password' tdpid=prodserver schema=ds ;

data mydata ;
set tdata.enterprise_table ;
run ;