0

I am trying to connect my HANA Server (SLES) with a Greenplum cluster. In my HANA server I have installed the last version of PostgreSQL and PostgreSQL ODBC. In "/usr/local/lib/" path I have the following files:

-rwxr-xr-x 1 root root    1056 May  8 14:31 psqlodbca.la
-rwxr-xr-x 1 root root 1382864 May  8 14:31 psqlodbca.so
-rwxr-xr-x 1 root root    1056 May  8 14:31 psqlodbcw.la
-rwxr-xr-x 1 root root 1494311 May  8 14:31 psqlodbcw.so

Therefore I have installed PostgreSQL ODBC correctly.

In /etc/odbc.ini I have the following configuration:

[psqlodbc_test_dsn]
Description             = psqlodbc regression test DSN
Driver          = PostgreSQL Unicode
Trace           = Yes
TraceFile               =
Database                = contrib_regression
Servername              = mdw.aws
Username                = root
Password                =
Port                    = 5432
ReadOnly                = No
RowVersioning           = No
ShowSystemTables                = No
ShowOidColumn           = No
FakeOidIndex            = No
ConnSettings            = set lc_messages='C'

And in /etc/odbcinst.ini I have the following configuration:

[PostgreSQL Unicode]
Description     = PostgreSQL ODBC driver (Unicode version), for regression tests
Driver          = ../.libs/psqlodbcw.so
Debug           = 0
CommLog         = 0

When in /etc/odbc.ini I change Driver = /usr/local/lib/psqlodbcw.so and I try to run "isql -v psqlodbc_test_dsn" the following error appears:

[01000][unixODBC][Driver Manager]Can't open lib '/usr/local/lib/psqlodbcw.so' : file not found

[ISQL]ERROR: Could not SQLConnect

But when in /etc/odbc.ini I change Driver = PostgreSQL Unicode and I try to run "isql -v psqlodbc_test_dsn" the following error appears:

[IM002][unixODBC][Driver Manager]Data source name not found, and no default driver specified

[ISQL]ERROR: Could not SQLConnect

What could be the error? Thanks for the support!

Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
  • Sorry I don't get it. Are you using HANA, Greenplum or Postgres? –  May 09 '17 at 11:51
  • I am using a HANA Server (with SLES) where i have installed postgresSQL ODBC to connect with a master greenplum machine (with centos) where i have installed greenplum. – Joan Sánchez Escudero May 09 '17 at 12:15
  • If you run `ldd /usr/local/lib/psqlodbcw.so` - are there any unmet dependencies? – erg May 09 '17 at 15:01
  • If I run "ldd /usr/local/lib/psqlodbcw.so", the following lines appears: linux-vdso.so.1 => (0x00007fff4333f000) libpq.so.5 => not found libodbcinst.so.2 => /usr/local/lib/libodbcinst.so.2 (0x00007fc2cb975000) libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007fc2cb76b000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fc2cb567000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fc2cb349000) libc.so.6 => /lib64/libc.so.6 (0x00007fc2cafd0000) /lib64/ld-linux-x86-64.so.2 (0x00007fc2cbe29000) – Joan Sánchez Escudero May 10 '17 at 07:24
  • I have execute the command "ln -s /usr/local/pgsql/lib/libpq.so.5 /usr/lib64/libpq.so.5" because I saw the "libpq.so.5" had no dependencies, and I have been able to fix it. Now, when I execute "isql -v psqlodbc_test_dsn", an error changed by the following: "[08001][unixODBC]could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"? [ISQL]ERROR: Could not SQLConnect" What could be the error? Thanks for the support! – Joan Sánchez Escudero May 11 '17 at 08:08

0 Answers0