Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

How do I install Magento with a MS SQL Server 2008 database? 
Jr. Member
Total Posts:  3
Joined:  2012-02-29


My company has 100% MS SQL Server databases and we need to install a Magento and run it against a MS SQL Server 2008.

Can I do it or Magento only runs with MySQL?



Magento Community Magento Community
Magento Community
Magento Community
Sr. Member
Total Posts:  94
Joined:  2008-03-31
Lancaster, United Kingdom

Hi fernaramburu

The short answer is no. However you could install mysql and php on the server in order to get magento running on windows 2008 server, something like XAMP etc (there maybe a better performing version of mysql/php for windows out there), if its then communication with an MSSQL database you need you would need to build some kind of \"middle man\” parser to translate the communication between the two systems.

Let me know if you do decide to take on a project like this, it would be interesting to see the outcome!

Magento Community Magento Community
Magento Community
Magento Community
Ryan Grow
Jr. Member
Total Posts:  21
Joined:  2009-12-04

I’ve been doing some research into putting Magento on MSSQL and I don’t think it would be that hard. There was a major change in Magento v1.6 to use the PDO_mysql driver, because of this it should be possible to use the pdo_dblib (which on linux connects to mssql). I was able to get magento to connect to the MSSQL server, but because Magento was still trying to pass Mysql syntax I was not able to create the database…

Here is what I have done

1. I duplicated the Mysql.php files in the following locations and renamed them Mssql.php


2. I modified the new Mssql files to use MSSQL

This is the file that connects Magento to the Varien library that contains the Sql code
- I just changed everywhere it said Mysql to Mssql

I think that this file is what executes statements
- again I just changed the Mysql to Mssql

I think that this file builds the statements this one requires a little reworking
- again I just went through it changed the Mysql to Mssql, but then I had a co-worker who know Mssql alter the Mysql only syntax to be Mssql Friendly

3. I Modify app/etc/local.xml and app/etc/config.xml so it would use the new connection scripts


Connection example


add connection type

4.This is where I ran into a problem, the database setup scripts are all written for Mysql and there is about 40 files that all start with mysql4. Someone would have to go through each one and Modify all the queries if the database is to install on MSSQL
They are located in the below folder

Magento Community Magento Community
Magento Community
Magento Community
Rakesh Alhan
Jr. Member
Total Posts:  13
Joined:  2011-01-31

Hello Ryan Grow,
Firstly a big thanks for your this post.

But can you please confirm, is this working on your end?

Even i have tried this. I made copies for following files

Please help, what’s wrong i’m doing..

Rakesh Alhan

Magento Community Magento Community
Magento Community
Magento Community
Jr. Member
Total Posts:  1
Joined:  2011-06-28

I am interested in paying for the development of SQL Server as a backend for magento.

Is anyone working on SQL Server adapter and creation files?

Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top