Driver could not be loaded (0) SQLSTATE=IM002

Driver could not be loaded (0) SQLSTATE=IM002

am 25.04.2006 14:10:47 von Srimathi Chandrasekaran

hi
i am using the following versions for building rls server against
gLobustollkit4.0

psqlodbc-07.03.0200
postgresql-8.0.1
libiodbc-3.52.4
I want to know whether my installation was correct.
1.I have set the environmental varaibles as follows
setenv GLOBUS_LOCATION0/usr/local/globus-4.0.1
# setenv GLOBUS_IODBC_PATH $GLOBUS_LOCATION
# setenv ODBCINI $GLOBUS_LOCATION/var/odbc.ini
2. for libiodbc-3.52.4
I have done everything as a root

% ./configure --prefix=3D$GLOBUS_IODBC_PATH --disable-gtktest --with-pthr=
eads
--disable-gui --with-iodbc-inidir=3D$ODBCINIDIR (i have set ODBCINDIR var=
iable
also)
make=20
make install
everything is successfully built.
2. i have created odbc.ini in $GLOBUS_LOCATION/var and copied that to
odbcinst.ini which is in the same directory itself
and my odbc.ini file looks like this
odbc.ini

[ODBC Data Sources]
lrc1000=3Dlrc database
rli1000=3Drli database

[lrc1000]
Description =3D LRC database
DSN =3D lrc1000
Driver =3D/usr/local/globus-4.0.1/lib/psqlodbc.so
Servertype =3D postgres
SERVER =3D localhost
USER =3D dbuser
Password =3D
Database =3D lrc1000
OPTION =3D 3
Trace =3D off
port =3D5432

[rli1000]
Description =3D RLI database
DSN =3D rli1000
Driver =3D /usr/local/globus-4.0.1/lib/psqlodbc.so

Servertype =3D postgres
SERVER =3D localhost
USER =3D dbuser
Password =3D
Database =3D rli1000
OPTION =3D 3
Trace =3D off

port=3D5432



[Default]
Driver=3D/usr/local/globus-4.0.1/lib/psqlodbc.so
port=3D5432
3.i have installed postgresql
../configure --prefix=3D$GLOBUS_LOCATION--without readline(if i didnt give=
this
--without readline then it wasnot able to configure) =20
make=20
make install
this was built sucessfully
chown -R postgres:postgres /usr/local/globus-4.0.1
su - postgres



cd /usr/local/globus-4.0.1
bin/initdb -D ./data
bin/pg_ctl -D ./data -l data/logfile start
bin/createuser
bin/createdb -O dbuser -U dbuser -W lrc1000
bin/createdb -O dbuser -U dbuser -W rli1000
bin/psql -l
it also listed the databases whatever i have
then i created the database schema by using the commands
psql -W -U dbuser -d lrc1000 -f
$GLOBUS_LOCATION/setup/globus/globus-rls-lrc-postgres.sql=20
psql -W -U dbuser -d rli1000 -f
$GLOBUS_LOCATION/setup/globus/globus-rls-rli-postgres.sql=20

4. i have installed psqlODBC
../configure --prefix=3D$GLOBUS_LOCATION--enable threads =20
make=20
make install
this was installed properly


But when i run the iodbctest=20
$GLOBUS_IODBC_PATH/bin/iodbctest "DSN=3Dlrc1000;UID=3Ddbuser;PWD=3D"
iODBC Demonstration program
This program shows an interactive SQL processor
Driver Manager: 03.52.0406.0126
1: SQLDriverConnect =3D [iODBC][Driver Manager]Data source name not found=
and no
default driver specified. Driver could not be loaded (0) SQLSTATE=3DIM002
1: ODBC_Connect =3D [iODBC][Driver Manager]Data source name not found and=
no
default driver specified. Driver could not be loaded (0) SQLSTATE=3DIM002
i have gone through email archive but i couldn't get much of it
i am having sleepless nights because of this.
whether anybody can tell me whether my installa tion procedure is correc=
t?
IF u have any rough idea on what direction i proceed it will be great hel=
p to
me.
thanks for your time and consideration
cheers
srimathi.c

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly

Re: Driver could not be loaded (0) SQLSTATE=IM002

am 25.04.2006 14:57:02 von Ludek Finstrle

> psqlodbc-07.03.0200

quite old. You could try 07.03.026X version from pgfoundry.org.

> I want to know whether my installation was correct.
> 1.I have set the environmental varaibles as follows
> setenv GLOBUS_LOCATION0/usr/local/globus-4.0.1
> # setenv GLOBUS_IODBC_PATH $GLOBUS_LOCATION
> # setenv ODBCINI $GLOBUS_LOCATION/var/odbc.ini

The # char mean comment out the line?
Do you specify it in each session? Or do you specify only for install?

> 2. for libiodbc-3.52.4
> I have done everything as a root
>
> % ./configure --prefix=$GLOBUS_IODBC_PATH --disable-gtktest --with-pthreads
> --disable-gui --with-iodbc-inidir=$ODBCINIDIR (i have set ODBCINDIR variable

I see no $ODBCINIDIR definition. I see only definition of $ODBCINI.

> But when i run the iodbctest

Do you have specified in this session $ODBCINI?

> $GLOBUS_IODBC_PATH/bin/iodbctest "DSN=lrc1000;UID=dbuser;PWD="
> iODBC Demonstration program
> This program shows an interactive SQL processor
> Driver Manager: 03.52.0406.0126
> 1: SQLDriverConnect = [iODBC][Driver Manager]Data source name not found and no
> default driver specified. Driver could not be loaded (0) SQLSTATE=IM002

FAQ for iODBC says:

[iODBC][Driver Manager]Data source name not found and no default driver specified. Driver could not be loaded, SQLSTATE=IM002

There are several reasons why this message could occur. The best solution
is to trace through what's happening: your application has been linked
against libiodbc, which has tried to find an odbc.ini file one way or
another - either through the ODBCINI environment variable or the fall-back
paths (typically /etc/odbc.ini, depending on how it was compiled). You
should check that such a file exists in a suitable location, and that
it is accessible (particularly if your application runs with different
user privileges - such as apache/php running as a www-data user).

Additionally, it could be that iODBC has found a suitable odbc.ini file,
but none of the file(s) found contain the DSN you've requested. Check
the syntax of your request - is the ODBC connect-string correct, and
does the DSN you're requesting exist? See also the section of this
FAQ, above, entitled `What's an odbc.ini and what do I put in it?'.

Regards,

Luf

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org