I have a few perl programs which use Sybase::DBlib and Sybase::CTlib to connecto to Sybase 12.5 databases. The Sybase databases have been migrated to SQL Server 2008(R2), so I have to change the perl programs to connect to the SQL Server databases.

I'm trying to use FreeTDS to do that as it supports TDS protocol 8 (which is same as the one used by SQL Server). I have got FreeTDS installed (as mentioned by this node in perlmonks: http://www.perlmonks.org/?node_id=392385) and made required changes to the freetds.conf. This node also mentions compiling of DBD::Sybase after exporting the LD_LIBRARY_PATH and SYBASE to the freetds installation paths.

Since I already have Sybase::CTlib and Sybase::CTlib installed, should I recompile them after exporting the LD_LIBRARY_PATH and SYBASE to point to freetds paths? (Posted the same question on the above node too, sorry for the double post)

Another question: The perl libraries are compiled as 32 bit and FreeTDS libraries are compiled as 64 bit. Will this be an issue? For example this is what I see when I run a 'file' command on:

$ file /opt/perl-5.6.1/lib/site_perl/5.6.1/i686-linux/auto/Sybase/DBli +b/DBlib.so /opt/perl-5.6.1/lib/site_perl/5.6.1/i686-linux/auto/Sybase/DBlib/DBlib +.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), not + stripped
and
$ file /opt/sqlserver/client/freetds/0.82-1/lib/libsybdb.so.5.0.0 /opt/sqlserver/client/freetds/0.82-1/lib/libsybdb.so.5.0.0: ELF 64-bit + LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

Some other details - freetds version: 0.82-1, perl version: 5.6.1, SQL Server: 2008 R2, OS: Linux 2.6


In reply to Accessing sql server from perl using dblib/ctlib and freetds by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.