Last Updated: February 25, 2016
· michiels

SQLServer and FreeTDS on Heroku

I just created a buildpack that lets you use FreeTDS and TinyTDS on Heroku. It is based off the default Cedar Ruby and Rails buildpack.

For new apps:

heroku create my_new_app --buildpack https://github.com/firmhouse/heroku-buildpack-ruby-freetds.git

For existing apps:

heroku config:add BUILDPACK_URL=https://github.com/firmhouse/heroku-buildpack-ruby-freetds.git

To configure your database. Modify the following DATABASE_URL sample accordingly:

heroku config:add DATABASE_URL=sqlserver://username:password@sqlserver_host:1433/datbase_name

For a more detailed explanation, see: http://blog.firmhouse.com/connecting-to-sql-server-from-heroku-with-freetds-here-is-how-on-cedar