[Gllug] perl querying SQL server 7

Bruce Richardson brichardson at lineone.net
Tue Aug 21 12:08:14 UTC 2001


On 8/21/01, 12:01:40 PM, Jim Bailey <jim at lateral.net> wrote regarding 
[Gllug] perl querying SQL server 7:


> Hi Bruce,

> I don't know if you can help with this but Dean says you have done
> something similar recently, I would be grateful for pointers we are
> trying to query a M$ SQL 7 server via perl on a Unix box and it is
> proving a nightmare.  The ISP won't allow DBD::Proxy for some reason It
> looks like we are stuck with ODBC but apparently there are lots of
> problems.

First you need to install an ODBC manager.  Either iODBC 
(http://iodbc.org/) or unixODBC (http://www.unixodbc.org/) will do 
(though my experience is with unixODBC).  If you can't find a recent 
package (2.0.5 or greater) of unixODBC download the latest source:
(The unixODBC management utilities need libqt version 2.2.x - I don't use 
anything QT-ish so I just edit the config files manually)

Once iODBC or unixODBC is installed, you need an ODBC driver for SQL 
server, which means FreeTDS (http://freetds.org/).  Download the latest 
source and compile it for whichever ODBC library you used.  Give me a 
shout when you get to this stage.

I have no experience of using Perl with ODBC, though.  To use PHP with it 
you have to recompile PHP against whichever ODBC manager you installed.

ODBC is a Good Thing.  Being able to use the same sql shell (and PHP 
calls) to access both PostgreSQL and SQL Server databases is making my 
life much easier.

-- 

Bruce


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list