Terminating an online utility
You can terminate the execution of an active utility or release the resources that are associated with a stopped utility.
About this task
After you terminate a utility, you cannot restart the terminated utility job. The objects on which the utility was operating might be left in an indeterminate state. In many cases, you cannot rerun the same utility without first recovering the objects on which the utility was operating. The situation varies, depending on the utility and the phase that was in process when you issued the command. These considerations about the state of the object are particularly important when you terminate the COPY, LOAD, and REORG utilities.
Procedure
To terminate an online utility:
- For active utilities, issue the command from the DB2 subsystem on which the utility was started. If a DB2 subsystem fails while a utility is in progress, you must restart that DB2 subsystem, and then you can terminate the utility from any system.
- For stopped utilities, you can terminate them from any active member of the data sharing group.
- In a data sharing coexistence environment, you can terminate a utility only on the same release in which the utility was started.
If the utility is active, DB2 terminates the execution of the utility at the next commit point and then performs any necessary cleanup operations. If the utility is stopped, DB2 releases the resources that are associated with the stopped utility.
Example of conditionally terminating a utility
You might choose to put the TERM UTILITY command in a conditionally executed job step; for example, if you never want to restart certain utility jobs. The following figure shows such an example.
Alternatively, consider specifying the TIMEOUT TERM parameter for some online REORG situations.