Recovering from sustained traps
The Db2® instance prepares the first occurrence data capture (FODC) package for the trap that you have
encountered. By default, the Db2 instance has been
configured for trap resiliency. The Db2 instance has also
determined whether or not the trap is sustainable. The term sustainable
means that the
trapped Db2
engine thread has been suspended and the Db2 instance continues to
run.
About this task
By default, the Db2 instance has been configured for trap resiliency based on the default setting of the DB2RESILIENCE registry variable.
- Recognizing a sustained trap
- Traps are sustained to minimize the effect on the database system when traps (Db2 programming errors)
occur. A sustained trap results in the following diagnostics:
- An FODC directory is created under the fully qualified path specified with the diagpath database manager configuration parameter.
- Error message ADM14013C is logged to the administration notification and db2diag log
files.Note: ADM14011C is logged if the trap could not be sustained, resulting in the instance being shut down.
- Error sqlcode -1224 is returned to the application.
- The EDU thread is suspended, which can be observed in the output of db2pd -edus.
- Recovery
- While it is expected that a sustained trap does not hamper the
regular operation of the instance, a suspended EDU thread does hold
on to some resources, and it is recommended to stop and restart the
instance at your earliest convenience by following these steps:
- To terminate all active applications which issue a COMMIT or ROLLBACK
within the timeout period, which minimizes the recovery window for
crash recovery when the db2start command is run,
issue the following command:
db2 quiesce instance instance_name user user_name defer with timeout minutes
- [Optional] To terminate any applications that did not COMMIT or
ROLLBACK during the timeout period in Step 1 and any new applications
which accessed the database after the timeout period completed, issue
the following command:
db2 quiesce instance instance_name user user_name immediate
- To shut down the instance, issue:
db2stop force
- Restart the Db2 instance using either
one of the following commands:
ordb2start
db2 START DATABASE MANAGER
- To terminate all active applications which issue a COMMIT or ROLLBACK
within the timeout period, which minimizes the recovery window for
crash recovery when the db2start command is run,
issue the following command:
- Diagnosis
- Locate the FODC directory that is specified under the diagpath database manager configuration parameter. The location of the FODC directory can also be confirmed by viewing the administration notification or db2diag log files. Forward the FODC information to IBM Software Support.