This is my understanding of it. Please correct me if I'm wrong:
Originally Posted by linakichi
SHRLEVEL NONE: after the unload phase, no access possible, so essentially the tablespace is "exclusively locked".
SHRLEVEL REFERENCE & CHANGE:
with the FASTSWITCH option on, at (almost) all times access is possible, be it to the old version of the data. During the switch phase, no access allowed, i.e., essentially an "exclusive lock".
For SHRLEVEL CHANGE, during the last iteration of the LOG phase, no writes possible, so essentially a "read lock". And no "massive delete" possible during the unload phase.
(Actually, the used locking mechanism is known as "claim and drain"; in some phases only the writers are drained, in some other phases also the readers are drained.)
Separate claims & drains happen for the indexes; general no index access is allowed during any of the phases, exceptions being the partitioned or partitioning indexes.
For details, see pages 471-473 of the v8 Utility Guide; for version 9, this is pages 491-493.
__IBM Certified Database Administrator, DB2 9 for z/OS
__IBM Certified Application Developer
__ABIS Training and Consulting