I have been pounding my head against the wall on this for a while, and I am about ready to give up.

I have been tasked with installing Drupal 7.27 on a Red Hat Enterprise Linux 5 server, and use a MS SQL 2008 R2 database.

I have installed freetds, and was able to successfully create a test php file that connected to the database and returned information. I was also able to connect to the database using:

tsql -H hostname -p port -U username

I am using the dlib module for Drupal, and when I go through the steps to install I get all the way to selecting the database type and entering in the username and password. MS SQL Database is listed as an option, and I have verified all neccessary information (database, username, password, etc.). When I click save and continue I recieve this error:

SQLSTATE[HY000] Unknown host machine name (severity 2)

Has anyone been able to successfully install Drupal on a Linux server with MS SQL as the database?

Any advice would be greatly appreciated.


Drupal is connecting to the database, and creating all of the neccessary tables, but cancels the setup process saying that the tables are already created... Well duh! It created the tables! So We are a little further along, but still not quite there.


  • During install, under "Advanced" on the database settings page, you may need to set the hostname / IP there. Commented May 1, 2014 at 2:12
  • @DavidThomas I went to "Advanced" and tried both the hostname and the IP. I verified that all my database information was correct. Still no joy.
    – DNewc
    Commented May 1, 2014 at 14:31

1 Answer 1


The FreeTDS logs always have some answers. Try looking at it. It has helped me to find a reason why I am not able to move ahead with my Drupal installation on Linux and connecting it to SQL Server via FreeTDS.

It starts the process, creates 8 tables and then stops: the page was reset.

I looked in FreeTDS logs and profiler trace that it tried creating an index on table date_formats and failed because it found ANSI settings off. I don't know how to set it on now, if it is a Drupal issue or ODBC or FreeTDS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.