简体   繁体   English

使用Teradata ODBC的SAS连接到Teradata数据库

[英]SAS connection to Teradata Database using Teradata ODBC

I'm trying to connect to Teradata in SAS. 我正在尝试连接到SAS中的Teradata。 I set up an teradata ODBC on the machine. 我在计算机上设置了Teradata ODBC。 The assumption currently for me is that using ODBC is the only way for me to access the database. 目前对我的假设是使用ODBC是我访问数据库的唯一方法。 And here is the syntax of my connection command: 这是我的连接命令的语法:

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

results: Error: The ODBC engine cannot be found. 结果:错误:找不到ODBC引擎。 Error: Error in the LIBNAME statement. 错误:LIBNAME语句中的错误。

It keeps saying that the ODBC engine cannot be found. 一直在说找不到ODBC引擎。 I'm really confused now. 我现在真的很困惑。 Is there anything wrong with the command? 命令有什么问题吗? Or I have to do something else outside SAS? 还是我必须在SAS之外做其他事情?

I check the licence Proc Setinit; 我检查了许可证Proc Setinit;

result: SAS/ACCESS Interface to Teradata * * the date shows not expired. 结果:Teradata的SAS / ACCESS接口* *日期显示未过期。

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. 不能说我曾经使用过ODBC来访问Teradata,可以看到它效率很低。

Normally, you'd do pass-thru SQL to Teradata... 通常,您需要将直通SQL传递给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,语法为

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

data mydata ;
set tdata.enterprise_table ;
run ;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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