DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2
From: Honza Pazdziora (adelton_at_fi.muni.cz)
Date: 01/04/05
- Next message: Martin J. Evans: "RE: [dbi] DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Previous message: jimmonty_at_gmail.com: "Re: RFC: New interface for Text::CSV_XS"
- Next in thread: Martin J. Evans: "RE: [dbi] DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Reply: Martin J. Evans: "RE: [dbi] DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Maybe reply: Honza Pazdziora: "Re: DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Reply: Cosimo Streppone: "Re: DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 4 Jan 2005 09:55:20 +0100 To: dbi-users@perl.org
Hello,
I have succesfully installed
freetds-0.62.3-1.1.fc3.rf from Dag Wieers's rpm repository
unixODBC-2.2.9-42
unixODBC-devel-2.2.9-42 from Fedora Core 3's rpm repository
DBD::ODBC 1.13 from sources from CPAN
on top of
perl, v5.8.3 built for i386-linux-thread-multi
from FC3's perl-5.8.3-5 rpm
The make test did not go especially well but that was caused by me not
having enough priviledges on the remote MS-SQL. Accessing the remote
MS-SQL from Linux box is my goal.
My scripts only work if I add PERL_DL_NONLAZY=1 environment setting
before starting my perl scripts that use DBD::ODBC -> unixODBC ->
freetds -> MS-SQL. Without the PERL_DL_NONLAZY=1, the connect to the
remote server fails with
DBD: dbd_db_login/SQLSetConnectOption err=-2
Searching the web and archives, the problem is documented in
Easysoft.com's
http://www.easysoft.com/products/9999/faq_answer.phtml?ID=664&product=2002
Why do I get "SQLSetConnectOption err=-2" errors in my Perl
scripts
However, adding --enable-rtldgroup=yes to unixODBC's configure nor
fiddling with flags passed to dlopen in sys_dl_open function did not
yield change in behaviour -- PERL_DL_NONLAZY=1 makes the connect (and
everything after that, including character sets, etc.) work, without
PERL_DL_NONLAZY=1 I get the SQLSetConnectOption err=-2 error.
I am not sure yet whether the problem really is in Perl, unixODBC or
DBD::ODBC. However, as it first appeared after I used DBD::ODBC,
I thought I ask in dbi-users -- does anyone experience the similar
problem? Or, does anyone use the combination of software mentioned
above (or similar) to work successfully with MS-SQL from Linux? Is
there any way to force the PERL_DL_NONLAZY=1 from inside Perl script,
so that I would put in into ODBC.pm and save myself the trouble of
wrapping all scripts with the environment setting?
I can of course send straces / other logs I someone things they should
be usefull.
Thank you for any hint,
-- ------------------------------------------------------------------------ Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/ .project: Perl, mod_perl, DBI, Oracle, large Web systems, XML/XSL, ... Only self-confident people can be simple.
- Next message: Martin J. Evans: "RE: [dbi] DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Previous message: jimmonty_at_gmail.com: "Re: RFC: New interface for Text::CSV_XS"
- Next in thread: Martin J. Evans: "RE: [dbi] DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Reply: Martin J. Evans: "RE: [dbi] DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Maybe reply: Honza Pazdziora: "Re: DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Reply: Cosimo Streppone: "Re: DBD::ODBC, unixODBC, FreeTDS, MS-SQL, lazy DL, dbd_db_login/SQLSetConnectOption err=-2"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|