Recovering a damaged journal with the WRKJRN command
The Work with Journal (WRKJRN) command can be used to recover a damaged journal.
The WRKJRN command associates the receivers with the recovered journals without you having to delete and restore the receivers.
Option 6 on the Work with Journals display verifies that the journal is damaged before proceeding with recovery. If the journal is not damaged, an informational message appears.
For a description of the Work with Journals display, see the WRKJRN command in the online command help. To view the help, type WRKJRN on a command line, and press F1.
Recovery for a damaged journal guides you through the following steps:
- The system attempts to determine which objects are currently being journaled to the indicated journal. If the system cannot successfully build this list, a message appears before the recovery operation begins. For each object type whose journaling is being ended, a status message is sent indicating how many objects have ended.
- Journaling is ended for all access paths that are currently being journaled to the specified journal.
- Journaling is ended for all database files that are currently being journaled to the specified journal. Journaling is ended for all objects.
- The system deletes the journal.
- The system presents the Recover Damaged Journal display, which asks you whether to restore or create the journal and what state to create the journal. The state is *ACTIVE or *STANDBY. If you have remote journals associated with your damaged journal it is suggested that you take the option to restore a previously saved version of the journal.
- If the journal will be restored, the system prompts for the values that are needed for the restore operation.
- If the journal will be created, the system prompts for the receiver name and attributes with the CRTJRNRCV command prompt. The system prompts for values needed to create the journal with the CRTJRN command prompt, with known values that are shown.
- Journaling is restarted for all objects for which it was previously ended. The screen displays after each object type has been restarted. If there were no objects for a specific type, then that step is skipped. A status message is sent periodically while journaling is being started to update you on how many objects have started journaling.
- The system now displays the Specify Journal Receivers screen. There are new input lines so you can enter specific receivers, generic receivers or *ALL. On the display you can enter a specific receiver, a generic name for journal receivers, or *ALL. Additionally, a library name can be specified to limit the search for receivers to only a specific library when finding receivers to associate with the newly created journal. Limiting the search to only certain receivers can significantly speed up the reassociation processing.
A journal receiver is associated with a journal if the journal receiver appears in the journal receiver directory. A receiver that was previously attached to a journal, but is not currently associated with a journal, cannot be used with the journal commands such as Display Journal (DSPJRN), Apply Journaled Changes (APYJRNCHG), Apply Journaled Changes Extend (APYJRNCHGX), and Remove Journaled Changes (RMVJRNCHG).
As the recovery of a damaged journal proceeds, the Display Journal Recovery Status display appears. The information about this display is updated as the operation progresses to indicate which steps have been completed, which steps have been bypassed, and which step will be run next. Whenever a user action is required, the status display is replaced by the appropriate prompt display.
The status field indicates the following operation status:
- Pending. The step has not been started.
- Next. The step will be performed next (after the Enter key is pressed).
- Bypassed. The step was not performed. (It was not necessary).
- Complete. The step has been performed.
- Error. The step has been performed, but errors were encountered.
The first display you usually see after the first status display is the Recover Damaged Journal display. Use this display to choose whether the journal is to be created or restored.
When the last step of the recovery process is complete, a message appears indicating that all objects for which journaling was started must be saved to establish a new recovery point.
If the damaged journal had any remote journals associated with it and a previously saved version of the journal was not restored, use the Add Remote Journal (QjoAddRemoteJournal) API or Add Remote Journal (ADDRMTJRN) command to reassociate those remote journals.
Parent topic:
Recovering a damaged journalRelated tasks
Adding remote journalsRelated reference
Work with Journal (WRKJRN) command Display Journal (DSPJRN) command Apply Journaled Changes (APYJRNCHG) command Apply Journaled Changes Extend (APYJRNCHGX) command Remove Journaled Changes (RMVJRNCHG) command Add Remote Journal (QjoAddRemoteJournal) API Add Remote Journal (ADDRMTJRN) command