SUPPORT / SAMPLES & SAS NOTES
 

Support

Usage Note 13848: Hints and tips for configuring SAS/ACCESS Interface to ODBC to access Postgres

DetailsAboutRate It
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 FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to ODBC64-bit Enabled AIX9.1 TS1M0
64-bit Enabled HP-UX9.1 TS1M0
64-bit Enabled Solaris9.1 TS1M0
Tru64 UNIX9.1 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.