Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to take some old code that was running on windows that connected to a MS SQL server using DBD::ODBC, and move it to linux. Don't ask.

After looking for some time, I can't help but to think I must be missing something.

Could someone please point me to some docs or give me some advice on how to go about doing this. Is the only driver available from easysoft?

Replies are listed 'Best First'.
Re: LINUX + MS SQL server
by bmann (Priest) on Jan 21, 2005 at 05:12 UTC
    Have a look at FreeTDS and DBD::Sybase. I've used these together to connect to SQL server from a BSD box successfully.

    If your heart is set on ODBC, look at iODBC.

      Since I want to use the same code to connect both from Linux and Windows I guess I need iODBC. But, I get stumped with the driver. I still need a SQL Server Driver with iODBC, right?

      Are there no free drivers for SQL Server?
        Whether you use DBD::Sybase or an ODBC (unixodbc or iODBC), you will still need the FreeTDS driver.
Re: LINUX + MS SQL server
by Tanktalus (Canon) on Jan 22, 2005 at 00:22 UTC

    I realise that SQL Server is based on Sybase. And that ODBC should be able to take care of this. But, perhaps I've spent more time on perl than on database decisions, I would have thought about DBI::ProxyServer and DBD::Proxy. You may be able to set up a DBI::ProxyServer running on the SQL Server machine which would use DBD::ODBC or DBD::MSSQL. And on Linux, you'd simply connect to the proxy server.

    Of course, eventually, you'll want to convince management to move to a more heterogeneous database environment. That would make things immensely easier. :-)