Wednesday, January 16, 2013

Parents at the playground and DB2 components

Right now it is not the time for outdoor playgrounds in Germany, but nonetheless: Have you ever watched parents on a playground? They make up an excellent analogy to how some of the DB2 components work.

When you are at a playground with a group of parents and kids, usually the kids play and the parents talk. However, as a background process parents (in most cases) take note of what the kids are doing. If one of the own children falls, gets hurt, scratched, has a mouthful of sand, or other health issues, the observing parent arrives, fixes the problem. The child goes back to playing, the parent back to talking.
In DB2 this is called the fault monitor facility. It keeps DB2 up and running in case of "exiting prematurely" (a.k.a. crash). Commands like db2fmcu and db2fm help setting up the facility. Once it is set up, try a "kill -9" on the db2sysc process and see what is happening...

Another interruption to the socializing parents (I want to use that term as this is social media... ;) occurs when the kids cannot get along sharing a showel, a toy car, or are fighting too heavy about something else. In that case, a parent shows up and tries to make sure everyone gets along well again.
In DB2 and other database systems we have a similar concept called deadlock detection. With many DB2 databases now making use of currently committed semantics for the cursor stability isolation level, deadlocks should be rare.

Not the situation as above, but making sure your child is not kept too long in the queue for the swing or other critical playground equipment is another critical aspect of parenting. That concept is called database monitoring and lock waits are something to keep an eye on.

So the next time you are on the playground socializing, tell others about DB2...