It’s Not Nice to Nuke the Database

August 27, 04 by kenrich

Well, it had to happen sooner or later. I submitted a database script to be launched and nuked a large part of the functionality of our web application. Seems I forgot to put a WHERE clause on an update query. While doing so, I nuked a general purpose table that is used for all of the applications on our site effectively taking the site down for about 40 minutes.

This used to happen a lot more often back when most of the
developers had full-time access to the production database. Now, we don’t have any access at all. In fact, there are only two people in my company who have access to the production database. Unfortunately, they don’t always review the scripts we send to them and launch them unconditionally trusting that we have done all of the necessary testing before-hand.

Well I had done the testing but only to make sure that the script ran and seemed to update the fields that I wanted. My mistake was in setting nocount on so I didn’t see how many rows were affected. To compound that mistake: in verifying that the updated occurred properly, I only checked the rows that I knew would be affected without testing the web site or looking at any other data. I guess I should be lucky to still have a job here. Ah well, such is life.

This entry no have comments... but you can be first.

Leave a Reply