使用 Teradata ODBC 与 Teradata Database 的 SAS 连接 [英] SAS connection to Teradata Database using Teradata ODBC

查看:63
本文介绍了使用 Teradata ODBC 与 Teradata Database 的 SAS 连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试连接到 SAS 中的 Teradata.我在机器上设置了一个 teradata ODBC.我目前的假设是使用 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';

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

结果:错误:找不到 ODBC 引擎.错误:LIBNAME 语句中的错误.

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

一直提示找不到 ODBC 引擎.我现在真的很困惑.命令有什么问题吗?或者我必须在 SAS 之外做其他事情?

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;

结果:SAS/ACCESS Interface to Teradata **日期显示未过期.

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

谁能给我一些想法.非常感谢!

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

推荐答案

不能说我曾经使用过 ODBC 访问 Teradata,可以看到它非常低效.

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

通常,您会通过 SQL 传递给 Teradata...

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 ;

对于直接的 libname,语法为

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 ;

这篇关于使用 Teradata ODBC 与 Teradata Database 的 SAS 连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆