Ending a long-running rollback
You might want to end long-running rollbacks that consume critical processor time, lock resources, or take up storage space.
A rollback operation removes all changes made within a transaction since the previous commit operation or rollback operation. During a rollback operation, the system also releases locks related to the transaction. If the system contains thousands of transactions, the system can take hours to complete a rollback operation. These long-running rollbacks can consume critical processor time, lock resources or take up storage space.
Before you end a long-running rollback, know which commitment definitions are being rolled back and what state the commitment definitions are in. The State field for commitment definitions that are rolling back is set to ROLLBACK IN PROGRESS.
Use the Work with Commitment Definitions (WRKCMTDFN) command to check the status of a rollback by following these steps:
- Type WRKCMTDFN JOB(*ALL) from the character-based interface.
- Type F11 to display the State field.
If you end a long-running rollback, files that were changed during the transaction will be left with partial transactions. You must not end a rollback if your files cannot have partial transactions. To see which files were changed during the transaction, choose option 5 to display status from the WRKCMTDFN list. Press F6 to display resource status and select Record Level.
You must have All Object (*ALLOBJ) special authority to end a long-running rollback. To end a long-running rollback, follow these steps:
- Type WRKCMTDFN JOB(*ALL) from the character-based interface.
- Type option 20 (End rollback) on the commitment definition you want to end.
Files with partial transactions have the Partial Transactions Exist, Rollback Ended field set to *YES in the output from the Display File Description (DSPFD) command. You must remove partial transactions before the file can be used. You can remove partial transactions by deleting the file and restoring the file from a prior save. If you do not have a prior save, you can use the Change Journaled Object (CHGJRNOBJ) command to reset the Partial Transaction Exists state so that you can open the file. Using the CHGJRNOBJ requires you to edit the file to bring the file to a consistent state. You must use the CHGJRNOBJ command only if no prior save is available.
Disabling the ability to end a long-running rollback
Users with *ALLOBJ special authority can end rollbacks by default. If you want to restrict users who have *ALLOBJ special authority from ending rollbacks, you can do this by creating data area QGPL/QTNNOENDRB.
Parent topic:
Troubleshooting transactions and commitment control
Related reference
Create Data Area (CRTDTAARA) command