Drain and lock table processing
UNLOAD PLUS can drain or lock objects, depending on certain conditions.
UNLOAD PLUS locks tables only when all of the following conditions exist:
- You are unloading a nonpartitioned table space with multiple tables.
- The table space is not in UT status.
- You are not unloading all tables in the table space.
In all other cases, UNLOAD PLUS drains the objects when required.
How long the drain or lock is held
The drain or lock is held throughout the entire unload process with the following exceptions:
- For SHRLEVEL CHANGE CONSISTENT YES, the drain or lock is held throughout the XBM or SUF registration process (including quiesce).
- For SHRLEVEL CHANGE CONSISTENT NO QUIESCE YES, the drain or lock is held throughout the quiesce process.
Controlling drain behavior
You can use the following command options to control drain behavior:
- DRAIN_WAIT
- RETRY
- RETRY_DELAY
- FORCE
If UNLOAD PLUS cannot drain all of the objects within the time period specified by DRAIN_WAIT, UNLOAD PLUS releases the drains that it has obtained so far, waits for the length of time specified in the RETRY_DELAY command option, and tries to drain the objects again. UNLOAD PLUS retries for the number of times specified in the RETRY command option. The FORCE option can change this process by enabling you to specify if and when you want to cancel any threads that might prevent a successful drain.
Controlling lock behavior
To control lock behavior, you can use the SQLDELAY and SQLRETRY installation options. If UNLOAD PLUS cannot acquire a lock on a table, it waits for the length of time specified in the SQLDELAY option and then tries to acquire a lock again. UNLOAD PLUS retries for the number of times specified in the SQLRETRY option.