楼主: shenliang_111
4839 9

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

  • 3关注
  • 12粉丝

教授

15%

还不是VIP/贵宾

-

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

楼主
shenliang_111 发表于 2011-12-10 11:39:40 |AI写论文
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.

7
情迷仲夏夜 发表于 2011-12-17 04:32:13
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

8
hisicon 发表于 2014-9-7 00:45:21
interesting problem to tackle

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

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-31 02:44