Monday, March 25, 2013

Upgrade Fiascos

We recently did an upgrade from SQL 2005 to SQL 2008R2 (yea, I know, better late than never) and I was reminded of the biggest risks in most such upgrades:
  1. Security
  2. Assumptions
  3. More Security
Let's start at the top. Bear in mind our upgrade involved a new cluster and a new OS version.

Tuesday, March 19, 2013

A sample queue with READPAST and OUTPUT

Anyone that has taken a basic data structures class in a language like C++ understands the simple joy of constructing linked lists, queues, trees, and other elementary data storage algorithms. We can still do this in SQL, but there's frequently many solutions to a given problem.

This solution to a simple queue uses READPAST and OUTPUT, and is intended more as an example of their usage than as a fully designed queue system.

The basic goal with our queue is to be able to add a work item of a certain type, and then through another process, read the next work item from the queue and mark it as retrieved. FIFO (First in, First out) applies.