Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

RECOVER CATALOG USING REPLICATION

The database administrator can use the utility statement RECOVER CATALOG USING REPLICATION to repair an entire original database with a complete replication. Partial replications can be used to repair corresponding parts of the original.

The version which is to be repaired is determined by the specified CAT-REC file. The specified CAT-REC file may not be older than that of the replication.
If you specify a CAT-REC file which is older than the current CAT-REC file of the original, you are effectively resetting the database (see section “Reset using RECOVER CATALOG USING REPLICATION”).

The CAT-REC file of the original database is overwritten when RECOVER USING REPLICATION is used. The database administrator must save the version of the original before calling RECOVER, if he/she plans to access it again.

Using a replication for repair is only possible if the original database's catalog space and user spaces have always been processed using the Logging facility.
A regularly updated replication ensures greatly accelerated repair of the original database. If the replication is used to repair the original database, the modifications have to be applied only to those logging files which differed between in original and the replication at the time the error occurred.
The more frequently a replication is updated, the more up-to-date it is and hence the quicker the repair can be performed.

If only a partial replication exists, only the catalog space and the user spaces contained in this partial replication can be repaired. The other spaces might then need to be repaired using RECOVER SPACE (see “Recovering user spaces in various situations”).

You can only use a replication for repair if the conditions which permit a REFRESH REPLICATION are satisfied in the original. This means that the logical data backup must not have been interrupted and no space in the replication may been deleted from the original using DROP SPACE

If you use the COPY function, the replication is retained and can be used for further processing. If you use the RENAME function, the replication becomes the original database and is no longer available as a replication. When using RENAME, the replication and original must be located on the same BS2000 user ID and the files of the original must no longer exist since it is otherwise no longer possible to recatalog the files.


Figure 22: Repairing the original database using a replication


  1. You can use RECOVER CATALOG USING REPLICATION to repair a database from the replication, the logging files and the current CAT-REC file.

  2. The COPY option leaves the replication unchanged.

Procedure

If the original database's CAT-REC file was not physically destroyed when an error occurred, it can be used for the repair. If a CAT-REC file no longer exists, the latest copy must be identified.

In order to recover the current version of the original, the CAT-REC file of the original must be used for repair. If you use an older CAT-REC copy, the catalog is reset.

The database administrator must provide the required logging files for repair. If the replication is processed from the same DBH as the original database, it must be placed in the FREE status before repair. This is not necessary if different DBHs are used. However, no parallel REFRESH REPLICATION of the replication may be performed.

If a RECOVER USING REPLICATION where the current CAT-REC file was not specified is aborted, it is possible that the CAT-REC file of the original may have already been overwritten. To make sure that no data is lost, this file should be backed up before RECOVER is called. This is not automatically performed by SESAM/SQL.

Partial replication without index space

If the partial replication is not used for recovery, the indexes to the tables are not necessary. This makes it possible, for example, to use only spaces with tables for the partial replications. If this partial replication is used for repair, the spaces with the primary data are recovered. The spaces containing the indexes can then be recreated using RECOVER TO *DUMMY.

It is therefore not necessary to log index spaces outside the partial replication. These spaces are reset to their old backup status or are recreated with RECOVER TO *DUMMY, in which case all indexes are recreated. However, for time reasons this is only recommended for small tables or where a small number of indexes are present.