Perl for Linux connecting to SQL Server 6.5 
Author Message
 Perl for Linux connecting to SQL Server 6.5
My boss wants me to write this program in Perl on a Red Hat Linux 5.2
box.   The tricky part is that he wants it to connect to a SQL Server
6.5 database.   Has anyone done this or does anyone know how to do it?
Any help would be helpful.

Sent via Deja.com http://www.***.com/
Share what you know. Learn what you don't.



Sun, 18 Nov 2001 03:00:00 GMT
 Perl for Linux connecting to SQL Server 6.5

Hi Dave,

A couple of ways...

Install the sybperl module, which uses Sybase Open client.
Search Yahoo with sybperl for the home page.
Requires the Open Client from Sybase, version 11 is free from the
Red Hat site. I have used this method, although not extensively.
It should work.

or

Install the DBI and DBD::ODBC modules from CPAN
Get an ODBC driver for Linux from www.openlinksw.com

Good Luck,
Norman

Quote:
> My boss wants me to write this program in Perl on a Red Hat Linux 5.2
> box.   The tricky part is that he wants it to connect to a SQL Server
> 6.5 database.   Has anyone done this or does anyone know how to do it?
> Any help would be helpful.

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.


Mon, 19 Nov 2001 03:00:00 GMT
 Perl for Linux connecting to SQL Server 6.5
Dave,

Quote:
> My boss wants me to write this program in Perl on a Red Hat Linux 5.2
> box.   The tricky part is that he wants it to connect to a SQL Server
> 6.5 database.   Has anyone done this or does anyone know how to do it?

Q.     How do I connect to SQL Server from a non-microsoft machine?  E.g. Unix,
Macintosh etc.
(v1.19 1999.06.03)

A. Ok, this isn't one with a straight answer.  Microsoft don't support or
supply connectivity from non-DOS/Windows/NT machines any longer, so you have to
go to a 3rd party vendor.  The choices are :-

1.  You can try acquiring/licensing/using a Sybase Open CT-Lib/Db-lib client if
one exists for your operating system.  Sybase supply drivers for many non-MS
operating systems.  The downside is that Sybase's and MS's usage of the base
TDS protocol has been diverging ever since the 4.x versions of SQL Server they
both released.  Since then 6.0, 6.5 and especially 7.0 of MS's code, and
versions 10, 11 and above of Sybase's code mean that Sybase's CT-Lib's may or
may not work for you.  You may need to get an old version from Sybase (maybe an
original 4.x db-lib) and it may not support all the functionality you need.  It
certainly won't be supported.  There are several reports of working connections
to 6.5 servers failing when they were upgraded to 7.0.

2.  You could reverse engineer the undocumented TDS protocol yourself.  This
could and does change between versions of SQL Server, so only attempt this if
you want an on-going maintenance challenge.  Several people have done such
reverse engineering for the portions of TDS they needed and have reported it's
not that difficult.  Once such is the FreeTDS project that is reverse
engineering the TDS specification and is currently implementing CTLIB, DBLIB,
and JDBC interfaces for TDS.  ODBC and Perl DBD drivers are planned.  The
FreeTDS JDBC driver is a type 4 driver and should work on any JVM.  The CTLIB
and DBLIB interfaces are known to compile under AIX, Linux, and FreeBSD without
any problems.  More info from http://sunsite.unc.edu/freetds/ .  The mailing
list archive can be viewed at
http://franklin.oit.unc.edu/cgi-bin/lyris.pl?enter=freetds.  Source-code can be
downloaded from ftp://freetds.internetcds.com/pub/freetds_dbd/

3.  If you need to access SQL from Perl, then there is :-

a.  SybPerl (Note that SybPerl is designed for Sybase really so you may have
the same compatibility problems as with CT-Lib)
b.  ODBC using the ODBC extension http://www.roth.net/odbc/
c.  If the version of Perl has COM extensions then you can use ADO
d.  Search www.perl.com for any other code available on the standard CPAN
sites.

4.  If you can use Java then a JDBC driver may be an option.  

   WebLogic : http://weblogic.beasys.com.  (type 2, 3 or 4.  SQL 6.5 and 7.0)
   http:\\www.inetsoftware.de
   www.openlinksw.com
   http://beta.easysoft.com.  JDBC/ODBC bridge (www.easysoft.com)
   http://ourworld.compuserve.com/homepages/Ken_North/jdbcvend.htm
   ftp://freetds.internetcds.com/pub/freetds_jdbc.  Type 4 open-source driver
that is designed to work with
SQLServer and Sybase
   Java.sum.com/products/jdbc

5.  The recommended option is that you acquire an ODBC/OLE-DB driver from a
driver vendor that will offer on-going support.  However, many ODBC vendors
have either moved from pure client drivers to "3-tier" driver systems which
many people don't want, or they have moved from ODBC into OLE-DB.  Therefore
you may have trouble finding just what you want.  (Success and failure stories
welcome - but be persistent with whichever vendors you talk to - they may not
be actively advertising what you want, but that doesn't mean they don't still
have old copies of it buried in a cupboard somewhere).

Vendors to try are (in no particular order) :-

   OpenLink    www.openlinksw.com
   Microfocus  www.microfocus.com/products/data.htm
   Intersolv   www.intersolv.com
   Visigenic   www.visigenic.com
   Applix corp.

6.  Easysoft supply an ODBC bridge product that works from Linux and other
Unixes.  http://beta.easysoft.com.  Works from C (supplied library), Perl DBI
DBD:ODBC or Apache/PHP

7.  Macintosh Info.  You can download a Visigenic ODBC version 2.1.2 driver for
the Macintosh from www.snap.de (they produce a DAL/ODBC DBMS called PrimeBase).  
It appears that the MS provided driver with Office for the Mac no longer works
with SQL 7.0.  It works fine with SQL 6.5 and below.

8.  For other pointers to ODBC/JDBC/OLEDB vendor's :-

   http://ourworld.compuserve.com/homepages/Ken_North/odbcvend.htm
   http://ourworld.compuserve.com/homepages/Ken_North/jdbcvend.htm
   http://ourworld.compuserve.com/homepages/Ken_North/oledbven.htm

 Neil Pike MVP/MCSE.  Protech Computing Ltd
 (Please post ALL replies to the newsgroup only unless indicated otherwise)
 For SQL FAQ entries see
 http://go.compuserve.com/sqlserver (library 1) - latest stuff is always here
 www.ntfaq.com/sql.html
 http://www.swynk.com/faq/sql/sqlserverfaq.asp



Mon, 19 Nov 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. Connect to MS SQL 6.5 from Linux with Perl 5

2. Connect to MS SQL 6.5 from Linux with Perl

3. Connecting a linux machine to a MS SQL Server 6.5

4. Connecting MSSQL Server 6.5 from a Linux machine

5. Connecting SQL Server 7 to SQL Server 6.5 - Help

6. migrating sql databases sever 6.5 from sql server 6.5 to another sql server 6.5

7. Problems connecting sql server 6.5 and sql server 7

8. Connect to SQL 6.5 from Linux with Perls

9. Using Win32odbc for PERL for NT to query SQL-Server 6.5

10. Help Needed - SQL Server 6.5 / Perl for my free website

11. SQL Server 6.5 & Perl cgi scripts

12. No able to connect to SQL 6.5 Server from 7.0 Server


 
Powered by phpBB® Forum Software