Posts Tagged ‘transaction’

Simple testing of transactions in sqlserver management studio

February 3rd, 2012

Testing that transactions do as they should is probably easiest done right in Sqlserver management studio.  The trick is to fire up two of them.

You can set breakpoints as with your usual Visual studio and use the same shortcuts for stepping through.

 

Transactions are complex, do not think otherwise.  Similarly to multi threaded programming it requires knowledge beforehand and just not the usual intellisense-and-see-which-methods-pops-up we have learned to use.

Playing around with transactions before implementing them is crucial for understanding and correct behaviour.

Just understanding that the transaction does what it should is probably not enough for any solution that has more than a trickle of traffic.  Resources I have used a lot are Inside Sqlserver and Sqlserver Books online (BOL). The latter is the same as the help.