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

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

问题描述

我尝试在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引擎。我现在很困惑。命令有什么问题吗?

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?

我检查许可证
Proc Setinit;

I check the licence Proc Setinit;

result:
SAS / ACCESS 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.

通常情况下,您需要对Teradata传递SQL ...

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 ;

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

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