I am trying to connect to postgresql server and it always fails. any
idea what i am doing wrong? i tried these ways:
1) trying with odbc source
- iodbctest "DSN=psql;uid=test;pwd=test"
works, no problem
- dbisql -c "DSN=psql;uid=test;pwd=test"
fails, it says "Unable to load 'PostgreSQL ANSI' errno=2"
"Unable to load 'libodbc.so' errno=2"
i noticed that dbdsn -l lists only user data source odbc and none
other (and even this odbc section in .odbc.ini is in fact with
debugging info and not with any database server connection data)
2) trying with odbc connection string
dbisql -c "Driver=/usr/lib/odbc/
psqlodbca.so;server=localhost;database=test;uid=test;pwd=test"
it doesn't complain about any error but doesn't connect anyway. all
it does is that it shows connection window
any idea what can i try next?
i use dbisql only for test. real target is to start mobilink server on
postgresql database (yes, i know its not officially supported, but i
want to try, see how it will behave and maybe try to workaround
official limitations)
when i try to start mobilink server now with
mlsrv11 -v -c "Driver=/usr/lib/odbc/
psqlodbca.so;server=localhost;database=test;uid=test;pwd=test" -x
tcpip
it doesn't write any error, but it won't run. i don't know why. i can
connect to sql anywhere database and it works. but again, i must use
direct connection to server/port, i can't do it using dsn=
so questions are:
1) why sybase tools can't work with data sources defined in
$HOME/.odbc.ini when iodbctest can?
2) why is there problem with connection string with Driver= parameter
defined, am i missing something there?
3) considering that i have rewritten version of mobilink setup script
for postgresql, is there any other thing which may make mobilink not
work with postgresql database?
best regards
Michal Seliga
.odbc.ini looks like this:
[test]
Description= SA11
Userid= dba
Password= sql
ServerName= test
CommLinks= ALL
AutoStart= YES
AutoStop= YES
Unconditional= YES
DisableMultiRowFetch= YES
Debug= yes
LogFile=/tmp/mllog
server=127.0.0.1
Driver= /opt/sqlanywhere11/lib32/libdbodbcansi11_r.so
with this .odbc.ioni content i can use dbdsn -l andit really shows
that source 'test; is present
i can launch iodbctest "dsn=test" and it connects and works
when i launch
mlsrv11 -c "DSN=test"
it writes
I. 2010-07-22 12:16:58. SQL Anywhere MobiLink Server Version
11.0.1.2440
I. 2010-07-22 12:16:58.
I. 2010-07-22 12:16:58. Copyright (c) 2001-2009, iAnywhere Solutions,
Inc.
I. 2010-07-22 12:16:58. Portions copyright (c) 1988-2009, Sybase, Inc.
All rights reserved.
I. 2010-07-22 12:16:58. Use of this software is governed by the Sybase
License Agreement. Refer to http://www.sybase.com/softwarelicenses
I. 2010-07-22 12:16:58.
I. 2010-07-22 12:16:58. This server is licensed to:
I. 2010-07-22 12:16:58. Developer Edition
I. 2010-07-22 12:16:58. Restricted Use
I. 2010-07-22 12:16:58. Running Linux 2.6.32-23-generic #37-Ubuntu SMP
Fri Jun 11 07:54:58 UTC 2010 on X86
I. 2010-07-22 12:16:58. Server built for X86 processor architecture
I. 2010-07-22 12:16:58. <Main> Local file for remote synchronization
logs: 'mlsrv.mle'
and thats all, it doesn't work
so once again, now after removing all 3rd party complications, what
should i do to make mobilink work?