Running stored procedures on MSSQL via any language on Linux

If you need to run store procedures on Microsoft SQL Server on perl, php, ruby, etc., you need to configure /etc/freetds/freetds.conf with the server connection information. Specifically, specify the tds version to be 8.0. Something like the following.

/etc/freetds/freetds.conf

[Server80]
host = domain.com
port = 1433
tds version = 8.0

Connection to the server via php would look like this.

$link = mssql_connect("Server80", "user", "pass");

Scaling down from MS to open source

We just moved a service that was running on the Microsoft stack (Windows Server 2008, .NET, MSSql Server, IIS) to an open source stack (Ubuntu Server, php, Codeigniter framework, apache2, postgres).

We now run the service on a cloud server with dual cpu and 256MB ram (Yes, that’s megabytes).

The old server ran on dual core with 2GB of ram.