FAQ
Hello,

I am using DBD:ODBC (unixODBC/FreeTDS) with Perl 5.8.5 on Solaris and I
am able to connect to a MS SQL 2000 database successfully. I am now
trying to migrate the app to RHEL3 and for some reason I cannot connect
to the same SQL db.

I can connect to the MS SQL db using the isql tool. I run into problems
when I try to run "make test", or when I try to run a simple Perl script
which connects to the db.

All of the output from the isql, perl Makefile.PL, make, and make test
commands are below.

Thanks,
Brandon


========================================================================
============

[root@fcweb10 DBD-ODBC-1.13]# isql FCSQL01 bday pass -m10 -c;
+---------------------------------------+
Connected! |
sql-statement |
help [tablename] |
quit |
+---------------------------------------+
SQL> quit

========================================================================
============


[root@fcweb10 DBD-ODBC-1.13]# perl Makefile.PL
Useless use of private variable in void context at Makefile.PL line 431.

Configuring DBD::ODBC ...
Remember to actually *READ* the README file!
And re-read it if you have any problems.

Using DBI 1.48 (for perl 5.008005 on i686-linux) installed in
/usr/local/lib/perl5/site_perl/5.8.5/i686-linux/auto/DBI/
Using ODBC in /usr/local

Umm, this looks like a unixodbc type of driver manager.
We expect to find the sql.h, sqlext.h and (which were
supplied with unixODBC) in $ODBCHOME/include directory alongside
the /usr/local/lib/libodbc.so library. in $ODBCHOME/lib


Checking if your kit is complete...
Looks good
Injecting selected odbc driver into cc command
Injecting selected odbc driver into cc command
Using DBI 1.48 (for perl 5.008005 on i686-linux) installed in
/usr/local/lib/perl5/site_perl/5.8.5/i686-linux/auto/DBI/
Writing Makefile for DBD::ODBC

The DBD::ODBC tests will use these values for the database connection:
DBI_DSN=dbi:ODBC:FCSQL01 e.g. dbi:ODBC:demo
DBI_USER=bday
DBI_PASS=pass


========================================================================
============

[root@fcweb10 DBD-ODBC-1.13]# make
cp Changes blib/lib/DBD/ODBC/Changes.pm
cp ODBC.pm blib/lib/DBD/ODBC.pm
/usr/local/bin/perl -p -e "s/~DRIVER~/ODBC/g"
/usr/local/lib/perl5/site_perl/5.8.5/i686-linux/auto/DBI//Driver.xst >
ODBC.xsi
/usr/local/bin/perl /usr/local/lib/perl5/5.8.5/ExtUtils/xsubpp -typemap
/usr/local/lib/perl5/5.8.5/ExtUtils/typemap ODBC.xs > ODBC.xsc && mv
ODBC.xsc ODBC.c
Warning: duplicate function definition 'data_sources' detected in
ODBC.xs, line 202
cc -c -I/usr/local/include -I.
-I/usr/local/lib/perl5/site_perl/5.8.5/i686-linux/auto/DBI/
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"1.13\"
-DXS_VERSION=\"1.13\" -fpic
"-I/usr/local/lib/perl5/5.8.5/i686-linux/CORE" -I/usr/local/include
ODBC.c
cc -c -I/usr/local/include -I.
-I/usr/local/lib/perl5/site_perl/5.8.5/i686-linux/auto/DBI/
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -DVERSION=\"1.13\"
-DXS_VERSION=\"1.13\" -fpic
"-I/usr/local/lib/perl5/5.8.5/i686-linux/CORE" -I/usr/local/include
dbdimp.c
Running Mkbootstrap for DBD::ODBC ()
chmod 644 ODBC.bs
rm -f blib/arch/auto/DBD/ODBC/ODBC.so
LD_RUN_PATH="/usr/local/lib" cc -shared -L/usr/local/lib ODBC.o
dbdimp.o -o blib/arch/auto/DBD/ODBC/ODBC.so -L/usr/local/lib -lodbc
chmod 755 blib/arch/auto/DBD/ODBC/ODBC.so
cp ODBC.bs blib/arch/auto/DBD/ODBC/ODBC.bs
chmod 644 blib/arch/auto/DBD/ODBC/ODBC.bs
Manifying blib/man3/DBD::ODBC.3
[root@fcweb10 DBD-ODBC-1.13]#


========================================================================
===========

[root@fcweb10 DBD-ODBC-1.13]# make test
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01base.........ok
t/02simple.......DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/02simple.t line 21
Undefined subroutine &main::BAILOUT called at t/02simple.t line 23.
# Looks like you planned 36 tests but only ran 2.
# Looks like your test died just after 2.
t/02simple.......dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 3-36
Failed 34/36 tests, 5.56% okay
t/03dbatt........ok 2/24DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/03dbatt.t line 24
Undefined subroutine &main::BAILOUT called at t/03dbatt.t line 26.
# Looks like you planned 24 tests but only ran 2.
# Looks like your test died just after 2.
t/03dbatt........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 3-24
Failed 22/24 tests, 8.33% okay
t/05meth.........ok 1/8DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/05meth.t line 24
Undefined subroutine &main::BAILOUT called at t/05meth.t line 26.
# Looks like you planned 8 tests but only ran 1.
# Looks like your test died just after 1.
t/05meth.........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 2-8
Failed 7/8 tests, 12.50% okay
t/07bind.........DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/07bind.t line 22
Undefined subroutine &main::BAILOUT called at t/07bind.t line 24.
# Looks like you planned 11 tests but only ran 1.
# Looks like your test died just after 1.
t/07bind.........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 2-11
Failed 10/11 tests, 9.09% okay
t/08bind2........ok 2/5DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/08bind2.t line 26
Undefined subroutine &main::BAILOUT called at t/08bind2.t line 28.
# Looks like you planned 5 tests but only ran 2.
# Looks like your test died just after 2.
t/08bind2........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 3-5
Failed 3/5 tests, 40.00% okay
t/09multi........ok 3/7DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/09multi.t line 26
Undefined subroutine &main::BAILOUT called at t/09multi.t line 28.
# Looks like you planned 7 tests but only ran 3.
# Looks like your test died just after 3.
t/09multi........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 4-7
Failed 4/7 tests, 42.86% okay
t/20SqlServer....ok 2/37DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/20SqlServer.t line 47
Undefined subroutine &main::BAILOUT called at t/20SqlServer.t line 49.
# Looks like you planned 37 tests but only ran 2.
# Looks like your test died just after 2.
t/20SqlServer....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 3-37
Failed 35/37 tests, 5.41% okay
t/30Oracle.......ok 2/4DBI connect('FCSQL01','bday',...) failed:
[unixODBC][FreeTDS][SQL Server]Unable to connect to data source
(SQL-08001)(DBD: db_login/SQLConnect err=-1) at t/30Oracle.t line 26
Undefined subroutine &main::BAILOUT called at t/30Oracle.t line 28.
# Looks like you planned 4 tests but only ran 2.
# Looks like your test died just after 2.
t/30Oracle.......dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 3-4
Failed 2/4 tests, 50.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
------------------------------------------------------------------------
-------
t/02simple.t 255 65280 36 68 188.89% 3-36
t/03dbatt.t 255 65280 24 44 183.33% 3-24
t/05meth.t 255 65280 8 14 175.00% 2-8
t/07bind.t 255 65280 11 20 181.82% 2-11
t/08bind2.t 255 65280 5 6 120.00% 3-5
t/09multi.t 255 65280 7 8 114.29% 4-7
t/20SqlServer.t 255 65280 37 70 189.19% 3-37
t/30Oracle.t 255 65280 4 4 100.00% 3-4
Failed 8/9 test scripts, 11.11% okay. 117/137 subtests failed, 14.60%
okay.
make: *** [test_dynamic] Error 2
[root@fcweb10 DBD-ODBC-1.13]#

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbi-users @
categoriesperl
postedAug 25, '05 at 5:26p
activeAug 25, '05 at 5:26p
posts1
users1
websitedbi.perl.org

1 user in discussion

Brandon Day: 1 post

People

Translate

site design / logo © 2022 Grokbase