[Date Prev][Date Next] [Chronological] [Thread] [Top]

Connecting slapd & postgres iodbc driver



Hi 

Based on the instructions provided in 
http://www.samse.fr/GPL/ldap_pg/HOWTO/x37.html, I was
able to successfully connect iodbc driver manager to
postgres driver. i.e iodbctest command worked
smoothly.

But slapd somehow fails to find and load the drivers -
the debug option outputs the following :
***********************************************
backsql_open_db_conn(4294967295): SQLConnect() to
database "PostgreSQL" failed.
Return code: -1
   Native error code: 0
   SQL engine state:  IM002
   Message:           [iODBC][Driver Manager]Data
source name not found and no default driver specified.
Driver could not be loaded
backsql_get_db_conn(): could not get connection handle
-- returning NULL
backsql_db_open(): connection failed, exiting
backend_startup_one: bi_db_open failed! (1)
slapd shutdown: initiated
************************************************

As suggested in the archives, I have setup ODBCINI and
ODBCSYSINI env variables to respective paths of
odbc.ini & odbcinst.ini.

My test env consists of :
1. libiodbc-3.52.4
2. openldap-2.3.20
3. psqlodbc-08.01.0200
4. postgresq 8.0.0-1

While compiling openldap i had also added
"--disable-hdb" option to get rid of "configure:
error: BDB/HDB: BerkeleyDB version incompatible"
error.

Here's my odbc.ini file
----------------------------
;  odbc.ini
;
[ODBC Data Sources]
pg_ldap=PostgreSQL
                                                      
                                           
[pg_ldap]
Driver=/usr/local/lib/psqlodbc.so
Description=Connection to LDAP/POSTGRESQL
Servername=localhost
;Host=localhost
Port=5432
Protocol=6.4
FetchBufferSize=99
Username=manager
Password=secret
Database=pg_ldap
ReadOnly=no
Debug=1
CommLog=1
                                                      
                                           
[ODBC]
InstallDir=/usr/local/lib
Trace=1
TraceFile=/tmp/odbctrace-$U-$P-$T.log
Debug=1
DebugFile=/tmp/odbcdebug.log

-------------------------------------------

And odbcinst.ini file

------------------
;
;  odbcinst.ini
;
[PostgreSQL]
Description=ODBC for PostgreSQL
Driver=/usr/local/lib/psqlodbc.so
Setup=/usr/local/lib/psqlodbc.so
                                                      
                                           
[ODBC]
Trace=1
Debug=1
Pooling=No
--------------


Any suggestions ???

thanks
kanji

			
---------------------------------
Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.