Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Accessing Microsoft SQL Server from Linux using DBD::Sybase

by briantillman (Initiate)
on Jul 01, 2009 at 18:29 UTC ( [id://776533]=note: print w/replies, xml ) Need Help??


in reply to Accessing Microsoft SQL Server from Linux using DBD::Sybase

Thanks! This worked very well for me while migrating from mysql to MS SQL 2005. A few things to note:

I'm using Perl 5.8.5 with libdbi 0.6.5 on RHEL 4u7 and as such had to use DBD-Sybase-1.04; newer versions of DBD-Sybase require a later version of libdbi.

If your M$ SQL server requires SSL, you can compile freetds with tls and ssl:

--with-gnutls --with-openssl=/usr/include

This ofcourse requires the development packages of gnutls and openssl

Also note, that with SQL Server 2005, I had to set my TDS version to 8.0, this also needs to be done at compile time and configured in freetds.conf:

--with-tdsver=8.0

Many Thanks!
  • Comment on Re: Accessing Microsoft SQL Server from Linux using DBD::Sybase

Replies are listed 'Best First'.
Re^2: Accessing Microsoft SQL Server from Linux using DBD::Sybase
by dragooneye (Novice) on Dec 23, 2010 at 20:40 UTC

    Thanks a million briantillman and CleverFox. Couldn't have done this without you guys. After following your steps, I got a script to connect and make queries. This will save me a LOT of time.

    I have
    • MS SQL Server 2005
    • Perl 5.8.5
    • libdbi 0.6.5
    • RHEL 4 nahant u 5

    Needed DBD-Sybase-1.04 as briantillman pointed out (from http://www.peppler.org/freeware/dbd-sybase.html).

    For noobs such as myself, needed to use the following to grab my versions:

    • cat /etc/redhat-release
    • rpm -qa | grep libdbi
    • perl -v

    Other observations (which could be triggered by my older versions of things): the  export SYBASE=/usr/local/freetds wouldn't work with the latest DBD-Sybase-1.11. I would get

    # perl Makefile.PL Unknown Client Library version - assuming FreeTDS.

    Also when doing a make with DBD-Sybase-1.11 and my versions, I would get the following:

    /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h: In function `dbixst_bounce_method': /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h:14: error: `my_perl' undeclared (first use in this function) /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h:14: error: (Each undeclared identifier is reported only once /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h:14: error: for each function it appears in.) /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h: In function `dbdxst_bind_params': /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h:54: error: `my_perl' undeclared (first use in this function) /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h: In function `dbdxst_fetchall_arrayref': /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driv +er_xst.h:75: error: `my_perl' undeclared (first use in this function) make: *** [Sybase.o] Error 1

    One last note, I am able to connect to MS SQL Server 2005 with tds version = 7.0.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://776533]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-25 12:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found