Adding SQL Server Management Studio to a development machine

A quick post in case any of you developers out there are having trouble adding the SQL Server Management Studio tool if you have Visual Studio 2005 with an installation of SQL Server Express Edition 2005.
The setup.exe will fail when it checks your current install, especially if you’ve been applying Windows Updates which may have upgraded your SQL Express Edition database to a later version than is on the SQL Server 2005 CD.
The trick when trying to add the tools is to run the setup.exe with the optional command-line parameter of SKUUPGRADE=1. So open a Command Line window, browse to your CD drive with the SQL Server 2005 disc in it and type:
setup.exe SKUUPGRADE=1
It won’t moan now when it comes to check either the existing edition installed on your machine, or that there may be hidden 2005 Tools already on your machine and not listed in Add/Remove Programs (which I’ve seen in other blog posts).
Hope this helps reduce lost hair from being pulled out!

Stored procedure error handling in SQL Server 2000

Today, we’re continuing work on our multipart message aggregation upgrade for a future Esendex release.

One part of the investigations this morning has been looking into how we manage the database access as we add parts of an incoming message to it for later processing. As we have multiple servers processing inbound messages, there was the potential for two threads trying to write to the database simultanously with different parts of the same message. Both could look at the database and think there were no existing parts of a multipart message, and decide to try and insert a new multipart message record.

During this work we found out that SQL Server 2000 will still raise an SQLException error despite error handling put in T-SQL.
Continue reading Stored procedure error handling in SQL Server 2000