MSSql database access from Linux?

Oh yeah, it’s possible. Heres how:

  1. Install FreeTDS.
    emerge freetds on Gentoo.
  2. Edit /etc/freetds.conf (or wherever in got dropped) to include something like:
    [yourservername]
      host = your.microsoftsql.com
      port = 1433
      tds version = 7.0
    

    (more info)

  3. Try a command line sql query with tsql
  4. Install DBD::Sybase using the freetds instructions. On gentoo you can try the /usr/bin/g-cpan.pl perl script.
  5. Try some of the sample code to test with.

Now you’ve got access to your Windows SQL database on Linux. KICK ASS!