How to submit the ROLLBACK statement
You submit the ROLLBACK statement only through the batch command facility. When submitting ROLLBACK statements, you must run the batch command facility in local mode.
Vary any area being rolled back offline to all DC/UCF systems.
When to use ROLLBACK
The ROLLBACK utility is most commonly used after a local mode update job has abnormally terminated or has been run incorrectly, resulting in incorrect data being introduced into the database. In this case, use the ROLLBACK utility to restore the affected parts of the database to an earlier, uncorrupted, state.
Both the database and the journal must be available and readable to run the ROLLBACK utility.
When not to use ROLLBACK
If the database is unusable or incomplete because of a physical I/O error, then you cannot use the ROLLBACK utility.
In this case, use a backup copy of the database and run ROLLFORWARD.
Note: For more information about when and how to use the ROLLBACK and ROLLFORWARD utilities, see the CA IDMS Database Administration Guide.
How ROLLBACK works
The ROLLBACK utility starts with the current state of the database. It uses before images from a tape or journal file to restore progressively earlier states of the database, file, segment, or area.
You can run the ROLLBACK utility sequentially, applying before images in reverse order. Or you can run the ROLLBACK utility in sorted mode. In sorted mode, the ROLLBACK utility applies the earliest before image of any record being restored.
ROLLBACK uses one journal file
The journal file is a sequential file that can reside on disk or tape. If you have multiple journal files, you must consolidate them, in the order in which they were created, to a single file and use the single file with the ROLLBACK utility.
Disk journal file
If the journal file is on disk, it cannot be read backwards in certain operating systems. To accommodate this, a SYSIDMS PARM has been created, ROLLBACK3490. To utilize this feature, the journal file must be sorted on the first UTC timestamp of each journal block, in a descending order. In this manner, the ROLLBACK utility, using the ROLLBACK3490 feature, reads each block forward, but is actually getting the blocks in descending order. Although the blocks are in descending order, the journal records within the blocks are in ascending order. As ROLLBACK reads each block in descending order, it processes each journal block from the end to the beginning. So even though the journal file is a sequential file on disk, sorted descending, ROLLBACK is processing the journal records in a descending order. To sort the journal blocks in descending order, use the following sort parm:
SORT FIELDS=(13,16,BI,D)
Note:
Tape journal file
If you want the journal file on tape, you can put the file on tape by using the ARCHIVE JOURNAL utility, or by using a tape journal to begin with. If you have multiple tape journal files, you must concatenate them, in the order in which they were created, to a single file; and use the single file with the ROLLBACK utility.
If the tape file requires more than one tape volume, the volumes must be mounted in the order in which they were created.
Note: Depending on the version of z/OS that you are using and whether the tape volumes are labeled, you might need to mount either the first tape volume produced or all tape volumes produced before they can be read backwards.
ROLLBACK and VSAM files
You can run the ROLLBACK utility against most native VSAM files. However, because VSAM does not support deleting ESDS file records, the ROLLBACK statement cannot be used on a native VSAM ESDS file that might cause the ROLLBACK utility to try to delete a record. Therefore, a run unit that has added records to an ESDS file can only be recovered by restoring the file to an earlier time and then executing the ROLLFORWARD utility.
Note: For more information about CA IDMS/DB and native VSAM files, see the CA IDMS Database Administration Guide.
When to use sequential mode
Use sequential mode if the journal file is very small or very large. If the journal file is small, you get no advantage from sorting. If the journal file is very large, it could require more sort space than you have available.
When to use sorted mode
Use sorted mode unless you have a strong reason not to. Be sure you have enough sorting space available. If there is not enough sort space available during ROLLBACK processing, the operation terminates with an error. The database will not be affected.
When to use VERIFY
Specify VERIFY only when rolling back an intact database. If you specify VERIFY when recovering from an abended job or an abended central version, the ROLLBACK utility terminates with an error.
VERIFY is ignored if you specify SORTED.
Recovering large numbers of files
For z/OS users, the maximum number of files that can be accessed by a central version is greater than the number that can be accessed by a local mode batch job. This has implications for manual recovery. If more than 3,273 files must be recovered, it will be necessary to execute the ROLLBACK utility multiple times in separate job steps, recovering a subset of the areas or segments in each execution.
When to use HOTBACKUP
Specify HOTBACKUP when restoring a database from a hot backup. For more information about hot backup, see the CA IDMS Database Administration Guide.
ROLLBACK and Distributed Transactions
ROLLBACK reports on distributed transactions and supports the use of an input manual recovery control file. The input recovery control file is used to complete InDoubt distributed transactions. For more information, see JCL Considerations and the "Common Facilities for Distributed Transactions" appendix.
Note: For considerations associated with distributed transactions during recovery operations, see the CA IDMS Database Administration Guide.
|
Copyright © 2014 CA.
All rights reserved.
|
|