Skip to Content.
Sympa Menu

freetds - Re: [freetds] what am I missing?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Konrad J Hambrick <konrad AT payplus.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] what am I missing?
  • Date: Tue, 24 May 2011 04:33:58 -0500


Chris --

I believe Randy nailed it. Your DBI->connect() string must include
the $TDSHOST ( the Name in Brackets in /usr/local/etc/freetds.conf ).

Like so:

If your freetds.conf contains a server config:

[Win2k3]
host = win2k3.kjh.lan
port = 1433
tds version = 8.0

then your DBI->connect() string should be (note the server= in the connect
string):

my $dbh = = DBI->connect( "DBI:Sybase:maxConnect=100:server=Win2k3",
$TDSUser,
$TDSPass,
{ PrintError =>
0, # Option #1
AutoCommit =>
1, # Option #2, etc
} ) ;

HTH

-- kjh

Randy Syring wrote, On 05/23/2011 11:10 PM:
Try TDSDUMPCONFIG to see all the connection params that TDS is using.

http://www.freetds.org/userguide/logging.htm

I don't see a server name or IP address, might that be the issue?

--------------------------------------
Randy Syring
Intelicom
Direct: 502-276-0459
Office: 502-212-9913

For the wages of sin is death, but the
free gift of God is eternal life in
Christ Jesus our Lord (Rom 6:23)


On 05/23/2011 11:51 PM, Chris Bartram wrote:
Thanks! Took care of the Perl .so loading issues...

/usr/local/bin/tsql connection now working; I can connect and query data that
way.

Perl dbi:ODBC fails with following error codes:

DBI connect('SQLServer','user',...) failed: [unixODBC][FreeTDS][SQL
Server]Unable to connect to data source (SQL-08001) [state was 08001 now
01000]
[unixODBC][FreeTDS][SQL Server]Adaptive Server connection failed (SQL-01000)
[unixODBC][FreeTDS][SQL Server]Unexpected EOF from the server (SQL-01000) at
./testscom.pl line 9

Source looks like this:

$dbh = DBI->connect("dbi:ODBC:SQLServer","user",$userpass);

(also tried the DRIVER={};Server= format; same errors.)

Target server is a SQL 2005 cluster; default instance – not a named
instance.Calling from perl on a RHEL system.


Any suggestions?

-Chris Bartram
"The purpose of life is not to be happy. It is to be useful, to be
honorable,
to be compassionate, to have it make some difference that you have lived and
lived well". (Ralph Waldo Emerson)




________________________________
From: James K. Lowden<jklowden AT freetds.org>
To: freetds AT lists.ibiblio.org
Sent: Wed, May 18, 2011 11:04:43 PM
Subject: Re: [freetds] what am I missing?

On Tue, 17 May 2011 19:30:17 -0700 (PDT)
Chris Bartram<chrisrbartram AT yahoo.com> wrote:

When I try the ODBC connection in a Perl program I get
errors that the .so is not found; yet an ls shows the file(s) right
where it's supposed to be looking. tsql looks like it might be
working?
http://www.freetds.org/91/userguide/linker.how.htm

If Perl says it can't find the .so, it's telling the truth. Because
Perl::DBI is using dlopen(3), nothing in the Perl executable nor the
DBI library affects where the runtime linker looks. You have to tell
it. LD_LIBRARY_PATH is your friend, but you may have to resort to
LD_PRELOAD.

HTH.

--jkl
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds
_______________________________________________
FreeTDS mailing list
FreeTDS AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/freetds





Archive powered by MHonArc 2.6.24.

Top of Page