SAS connection to Teradata Database using Teradata ODBC

烂漫一生 提交于 2019-12-30 11:09:47

问题


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:


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 ;


来源:https://stackoverflow.com/questions/8237581/sas-connection-to-teradata-database-using-teradata-odbc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!