I'm testing Greenplum ODBC drivers from 2 different vendors:
1. Greenplum
2. DataDirect
Here are the results of my tests:
- The Greenplum drivers does not work with my application, only DataDirect works.
- The Greenplum driver comes with 2 types of Driver Manager
- DataDirect
- datadirect-52_64
- datadirect-51sp2_64
- datadirect-53sp2_64
- Unix ODBC v2.2.12
When I used the UnixODBC v2.2.12 I get the following error:
Error code -1: Native code 0
State IM005
[unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_DBC failed
When I used the Greenplum DataDirect drivers, I got the following error (depending on the version):
./odbctest: error while loading shared libraries: libddicu21.so: cannot open shared object file: No such file or directory
./odbctest: error while loading shared libraries: libddicu22.so: cannot open shared object file: No such file or directory
The above led me to believe that the DataDirect drivers bundled with my application is incompatible with the Greenplum ones.
Here's how to configure the Greenplum drivers:
1. Create a ocbc.ini
[Greenplum]
Description = PostgreSQL driver for Greenplum
Driver = /app/gp/greenplum-connectivity-4.1.1.0-build-4/drivers/odbc/psqlodbc-08.03.0400/unixodbc-2.2.12/psqlodbcw.so
Trace = 1
TraceFile=/app/gp/greenplum-connectivity-4.1.1.0-build-4/odbctrace.out
Debug=1
Database = gpdemo
Servername = 192.168.1.65
UserName = gpadmin
Password = password
Port = 5432
ReadOnly = No
RowVersioning = No
DisallowPremature = No
ShowSystemTables = Yes
ShowOidColumn = No
FakeOidIndex = No
useDeclareFetch = 1
Fetch = 4096
UpdatableCursors = No
Protocol = 7.4-1
2. Amend the parameters in the script greenplum_connectivity_path.sh (commented values are for reference)
GP_ODBC_DRIVER=psqlodbc-08.02.0500
GP_ODBC_DRIVER_MANAGER=datadirect-52_64
#GP_ODBC_DRIVER_MANAGER=datadirect-51sp2_64
#GP_ODBC_DRIVER_MANAGER=unixodbc-2.2.12
#GP_ODBC_DRIVER_MANAGER=datadirect-53sp2_64
#GP_ODBC_DRIVER=psqlodbc-08.04.0200
#GP_ODBC_DRIVER_MANAGER=unixodbc-2.2.12
#GP_ODBC_DRIVER=psqlodbc-08.03.0400
#GP_ODBC_DRIVER_MANAGER=unixodbc-2.2.12
#GP_ODBC_DRIVER=psqlodbc-08.02.0400
#GP_ODBC_DRIVER_MANAGER=datadirect-52_64
ODBCINI=/app/gp/greenplum-connectivity-4.1.1.0-build-4/odbc.ini
export ODBCINI
For DataDirect, it is quite simple:
1. Configure the sample odbc.ini in /app/Progress/DataDirect/Connect64_for_ODBC_61
2. Source the file odbc.sh
And then restart my application. (use odbctest to verify odbc.ini is working properly).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment