<?xml version="1.0" encoding="windows-1252"?>
<node id="878870" title="Re^2: Accessing Microsoft SQL Server from Linux using DBD::Sybase" created="2010-12-23 15:40:09" updated="2010-12-23 15:40:09">
<type id="11">
note</type>
<author id="866006">
dragooneye</author>
<data>
<field name="doctext">
&lt;p&gt;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.&lt;/p&gt;

I have 
&lt;ul&gt;
&lt;li&gt;MS SQL Server 2005&lt;/li&gt;
&lt;li&gt;Perl 5.8.5&lt;/li&gt;
&lt;li&gt;libdbi 0.6.5&lt;/li&gt;
&lt;li&gt;RHEL 4 nahant u 5&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Needed DBD-Sybase-1.04 as briantillman pointed out (from [http://www.peppler.org/freeware/dbd-sybase.html]).&lt;/p&gt;

&lt;p&gt;For noobs such as myself, needed to use the following to grab my versions:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;cat /etc/redhat-release&lt;/li&gt;
&lt;li&gt;rpm -qa | grep libdbi&lt;/li&gt;
&lt;li&gt;perl -v&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
Other observations (which could be triggered by my older versions of things): the &lt;code&gt; export SYBASE=/usr/local/freetds &lt;/code&gt; wouldn't work with the latest DBD-Sybase-1.11.  I would get
&lt;/p&gt;
&lt;code&gt;
# perl Makefile.PL
Unknown Client Library version - assuming FreeTDS.
&lt;/code&gt;
&lt;p&gt;
Also when doing a make with DBD-Sybase-1.11 and my versions, I would get the following:

&lt;/p&gt;

&lt;code&gt;
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driver_xst.h: In function `dbixst_bounce_method':
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driver_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/Driver_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/Driver_xst.h:14: error: for each function it appears in.)
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driver_xst.h: In function `dbdxst_bind_params':
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driver_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/Driver_xst.h: In function `dbdxst_fetchall_arrayref':
/usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi/auto/DBI/Driver_xst.h:75: error: `my_perl' undeclared (first use in this function)
make: *** [Sybase.o] Error 1
&lt;/code&gt;

&lt;P&gt;One last note, I am able to connect to MS SQL Server 2005 with tds version = 7.0.&lt;/P&gt;</field>
<field name="root_node">
392385</field>
<field name="parent_node">
776533</field>
</data>
</node>
