简体   繁体   中英

SAS connection to Teradata Database using Teradata ODBC

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!

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 ;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM