Small code with powerful results, the occasional opinion … and beer.

30 Sep 2008
Anti-Collision Work Queue Retrieval: an approach using GUIDs

I recently wrote a high-volume, fast paced application which supports many threads reaching into a work queue (SQL table) and retrieving a row representing a piece of work.  The table uses an identity column as its primary key. In other work experiences, I have seen SQL locking hints used to prevent two threads from grabbing […]

25 Sep 2008
Triggers in SQL Server: how often are they called

Our dba and I had a short discussion on triggers, because I could not locate an answer to this question: When inserting, updating or deleting more than one row in a table, is the trigger fired iteratively for each affected row, or once with all the records in the inserted and deleted tables? To me […]

22 Sep 2008
RDC and Hibernation on Windows XP Pro / Media Center

I encountered some strange behavior in Windows XP and Media Center versions, where hibernation or shutdown would hang after the system had serviced RDC connections.  It took a while to solve it. RDC into a computer that hibernates?! Before jumping to conclusions, it is just a technique I use to access a mobile laptop from […]