请选择 进入手机版 | 继续访问电脑版
楼主: shenliang_111
4278 9

[原创博文] SAS 怎么与 数据库 POSTGRESQL 连接 [推广有奖]

  • 3关注
  • 12粉丝

教授

15%

还不是VIP/贵宾

-

威望
0
论坛币
26 个
通用积分
0.8674
学术水平
20 点
热心指数
26 点
信用等级
12 点
经验
17989 点
帖子
478
精华
0
在线时间
1623 小时
注册时间
2011-2-24
最后登录
2023-11-6

shenliang_111 发表于 2011-12-10 11:39:40 |显示全部楼层 |坛友微信交流群
20论坛币
如题!请好朋友们帮忙!怎么实现SAS与开源数据库 postgresql的连接?谢谢!

关键词:PostgreSQL post sql POS GRE 数据库 朋友
joelluo 发表于 2011-12-10 13:05:55 |显示全部楼层 |坛友微信交流群
Just take a look, mark
罗永立

使用道具

shenliang_111 发表于 2011-12-13 14:49:40 |显示全部楼层 |坛友微信交流群
自己顶下!

使用道具

ping.gu18 发表于 2011-12-16 12:02:36 |显示全部楼层 |坛友微信交流群
You need to purchase an ODBC-Connect module from SAS. After that, the programming is very similar to the scenario of connecting SAS to Oracle.

使用道具

shenliang_111 发表于 2011-12-16 12:31:19 |显示全部楼层 |坛友微信交流群
ping.gu18 发表于 2011-12-16 12:02
You need to purchase an ODBC-Connect module from SAS. After that, the programming is very similar to ...
I  HAVE THE MODULE OF SAS/ACCESS, IS IT EQUAL TO   ODBC-Connect module ?

使用道具

ping.gu18 发表于 2011-12-17 03:43:55 |显示全部楼层 |坛友微信交流群
shenliang_111 发表于 2011-12-16 12:31
I  HAVE THE MODULE OF SAS/ACCESS, IS IT EQUAL TO   ODBC-Connect module ?
In our case, ODBC-connect was bought separately. I am not sure how SAS/Access is packaged.

使用道具

Connect SAS to PostgreSQL:
http://help.nceas.ucsb.edu/Connect_SAS_to_PostgreSQL

SAS to PostgreSQL with ODBC
http://support.sas.com/kb/13/848.html
Using SAS/ACCESS Interface to ODBC may require slightly different
configurations depending on the data source you are accessing.  Each
data source vendor may require different environment variable settings
than others.

Although, we try to document what is necessary to configure an ODBC
environment, there may be some settings that may be required in one
environment that is not with another.  Therefore, you should always
contact the vendor of your data soruce to be sure you understand their
requirements as far as environment settings, ODBC.INI entries, etc.

Here at SAS we were able to access Postgres using SAS/ACCESS Interface
to ODBC using unixODBC 2.2.8, downloaded and built PostgreSQL 7.4.3 and
the 07.03.0200 version of .psqlodbc for our tests.  All tests went fine.
Below are copies of our odbc.ini and odbcinst.ini files for reference.

odbc.ini:

  [ODBC Data Sources]
  test=PostgreSQL

  [test]
  Driver=/users/dbitest/psqlodbc/lib/psqlodbc.so
  DSN=test
  Trace=0
  Debug=0
  TraceFile=/users/dbitest/debug_build/sql.log
  DebugFile=/users/dbitest/debug_build/debug.log
  Database=test
  Servername=localhost
  Username=dbitest
  Password=dbigrp1
  Port=5432
  Servertype=postgres
  Readonly=no
  CommLog=1

  odbcinst.ini:
  [ODBC Drivers]
  PostgreSQL=Installed

  [PostgreSQL]
  Description=PostgreSQL driver included with PostgreSQL
  Driver=/users/dbitest/psqlodbc/lib/psqlodbc.so
  Setup=/users/dbitest/psqlodbc/lib/psqlodbc.so
  FileUsage=1

Below is a sample of the code used to test the connect to access
Postgres
using SAS/ACCESS Interafce to ODBC.

  proc sql;
  connect to odbc (dsn=test);
  select * from connection to odbc
    (select * from test_table);
  disconnect from odbc;
  quit;

Here is a link that will also provide additional tips and guidelines if
further assistance is needed.

http://support.sas.com/techsup/technote/ts685.pdf

Operating System and Release Information
Product Family Product System SAS Release
Reported Fixed*
SAS System SAS/ACCESS Interface to ODBC 64-bit Enabled AIX 9.1 TS1M0  
64-bit Enabled HP-UX 9.1 TS1M0  
64-bit Enabled Solaris 9.1 TS1M0  
Tru64 UNIX 9.1 TS1M0

使用道具

hisicon 发表于 2014-9-7 00:45:21 |显示全部楼层 |坛友微信交流群
interesting problem to tackle

使用道具

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群

京ICP备16021002-2号 京B2-20170662号 京公网安备 11010802022788号 论坛法律顾问:王进律师 知识产权保护声明   免责及隐私声明

GMT+8, 2024-3-29 00:55