[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Connecting slapd & postgres iodbc driver
- To: openldap-software@OpenLDAP.org
- Subject: Connecting slapd & postgres iodbc driver
- From: kanji linux <kanjilinux@yahoo.com>
- Date: Fri, 24 Mar 2006 14:57:19 -0800 (PST)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=p6xL73nAvpwyELFDklupyCfARze6qVADy3Iui1G7Es2db16RPi6Bg8WiRnLw/tFqYLONyNISSp6esHRy2HHfjoS8c0kJmB7f+ITqMgSj9GtogMTLkvrYD6wnVQ6yICb8+dToVpjJbOVp+oykKPi1nwdX4gLJ8YSajqmtJto4O1c= ;
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.