Jul 31 2006

MS SQL: Plays Badly With Others

Published by Ivan Groznii at 1:48 pm under Linux How-To, Rants |

Box of Evil MS SQLI could redefine the word “livid” today. I am riding on a lava floe of anger, bubbling and fuming with sulfurous rage. The name of my pain is MS SQL; and the cause of my fury is that it doesn’t play well with others.

My company’s website is in the midst of a transition; my predecessor, rather stupidly, decided that the company was going to go with Microsoft technologies and this has to be rectified as quickly as possible. Why? Well, firstly, it’s the cuckoo in the nest - my company is part of a larger group, and all the rest use Open Source technologies. Second, the costs of licensing as well as maintenance have gone up. As a result we are changing over, slowly; my company’s site is now a mixture of PHP and ASP pages. Some of the PHP sections call upon XML feeds generated through a query to MS SQL.

MS SQL is supposed to be an industrial strength database. Microsoft claims it “was engineered for enterprise data management for organizations of any size”; they also claim that their XML support “help organizations seamlessly connect internal and external systems”. Experience has now proven that this is absolute nonsense. There is nothing wrong with the feed when it works, but empirical evidence from the live environment has shown that the additional queries are killing the database server. The server is a well specified box, and should be able to handle the queries just as easily as it did when it was hosting the entire site. It can’t.

Fortunately, there is a way around it - I’ve told my developer to run a query every 24 hours which will take the necessary data from MS SQL and store it in a hash table in MySQL. The PHP code will query MySQL rather than utilise an XML feed. This change will reduce the dependency, though we will have to remember to run the chron job every time there is an urgent update and ensure that the query runs correctly. Overall, there is a silver lining to this dark cloud of a problem; the timetable for shifting completely to PHP / MySQL has been moved up a gear.

However, I am not soon going to forget how badly MS SQL plays with others, the issues this has created, the customer complaints and the sheer amount of pain that we are going through. I try to console myself with the thought that these are “growing pains”; we will mature from having gone down the Microsoft way to a point where we are doing things using proper Open Source tools. From my perspective, that day can’t come soon enough.

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.