Building bridges - Native SQL Server support in Drupal

We are very pleased to announce the availability of the first beta version of the Drupal 7 database driver for SQL Server, which my team and I have been working on over the last few weeks.

Microsoft made this possible by providing us access to a preview version of the SQL Server Driver for PHP 2.0 with support for PDO that was announced today here at Drupalcon San Francisco. I warmly thank the teams of Microsoft (especially Ashay Chaudhary, Jay Kint and Pierre Couzy) for their responsiveness, help and trust.

This driver allows you to install and run Drupal 7 using an SQL Server database, and it makes it possible to deploy Drupal on a full Microsoft stack (Windows Server, IIS, and SQL Server). We believe this will foster the adoption of our beloved CMS / framework, Drupal.

Drupal 7 will be the first CMS/framework of its kind to be fully supported on such a wide range of open-source and proprietary database back ends: MySQL, PostgreSQL, SQLite, now SQL Server. We hear that Oracle support is in the works, too.

At Commerce Guys, we are committed to bringing strong e-commerce support to Drupal. Interoperability is a key aspect of this. The ability to play nice with installed systems, pull and push data to and from them is essential. The SQL Server driver for Drupal 7 is a first step toward that goal. We are also making interoperability a key design goal of the new Drupal Commerce e-commerce suite.

The source code of the Drupal 7 database driver for SQL Server will be available shortly on the project page on Drupal.org.

How can I test this?

To run it right now requires the preview version of the preview version of the SQL Server Driver for PHP 2.0 with support for PDO that Microsoft recently announced, and a few core patches (reviews welcome, these will be listed on the project page shortly).

It can be quite complex to get all the pieces together, so we have set up a combined package (Drupal 7 + Patches + PHP + PDO) and an easy-to-use install script, along with step-by-step installation instructions, all available here, and on the Microsoft website.

Drupal 7 on SQL Server has a very nearly a 100% pass rate to core tests, but as with all beta software, some caveats apply:

  • The Locale module is not yet supported, because it uses an index on an unlimited TEXT column, which is not supported by SQL Server. We are working on fixing this.
  • There are still a lot of "environmental failures" when running the test suite under Windows. We welcome the initiative to have a test bot running on Windows (), and would love some help in this area.

Contributions welcome

Please feel free to test the software and report any bugs you might find. Most important of all: do not hesitate to jump on board! Your contributions are very welcome!