Hello List,

I have kind of a strange problem:

we are using a SAPDB which our perl webserver scripts access via unixODBC in
the form
DBI->connect("dbi:ODBC:DSN", "USER", "PASSWORD"); 

This has been working for quite a while now. Today I had to install a Mysql
database (please don't stop reading, it seems to be a SAPDB-ODBC-Problem),
installed the mysql-ODBC-drivers, configured ODBC, added a DSN - and whenever I
try to connect to the mysql database, I get the following error:

DBI->connect(USERS) failed: [SAP AG][LIBSQLOD SO]Data source name not found
and no default driver specified. (SQL-IM002)(DBD: db_login/SQLConnect err=-1)
at /usr/local/bin/testmysql.pl line 7

Now what does SAP have to do with a mysql DSN??? Removing all SAPDB DSNs did
not help. Removing the SAPDB driver entries did not help... I always got the
SAP error message when accessing a mysql database. After looking for
libsqlod in many files, I found that it was compiled in into the ODBC.so file in 
/usr/lib/perl5/site_perl/5.6.1/i586-linux/auto/DBD/ODBC/ODBC.so

Looking into the sources of DBD-ODBC-0.43, I found the following strange
line in Makefile.PL:
    if (!$odbchome && -f '/opt/sapdb/interfaces/odbc/lib/libsqlod.a') {
        $odbchome = '/opt/sapdb/interfaces/odbc/';
    }

It seems that as soon as the SAPDB-odbc-driver is found on a system (which I
need to use SAPDB and ODBC), the ODBC-DriverManager is looked for in
/opt/sapdb/interfaces/odbc, not as usual in /usr.

Finding this, I set odbchome to the standard /usr, recompiled DBD-ODBC - and
now access for mysql works perfectly. But - I get the following error when I
try to access a SAPDB:

DBI->connect(USAPDB) failed: [unixODBC][Driver Manager]Driver does not
support this function (SQL-IM001)(DBD: dbd_db_login/SQLSetConnectOption err=-1) at
/usr/local/bin/testmysql.pl line 7

Finally I don't know what to do. We were using the ODBC-Interface to make it
easy to connect to different DB systems. But SAPDB seems to make it
impossible:
Either I use the SAPDB-ODBC-DriverManager with perl - which allows me to
access SAPDBs only. Or I use the standard DriverManager from unixODBC which
allows me to connect to Mysql for example or other DBs.

Does ANYONE know a workaround? You would really help me a lot.

Thanks in advance,
Torben

-- 
+++ GMX - Mail, Messaging & more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr f�r 1 ct/ Min. surfen!

_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to