IBM Support

Using DFRID to Allow Restoring Logical Files before Physical Files

Troubleshooting


Problem

At V6R1, i5/OS has support to allow logical and physical files in different libraries to be restored in any order.

Resolving The Problem

At V6R1, i5/OS has support to allow logical and physical files in different libraries to be restored in any order.

o

There is a new DFRID parameter on the RSTLIB and RSTOBJ command. For example:

RSTLIB SAVLIB(*ALLUSR/*IBM/*NONSYS) DFRID(*DFT)

Automatically handles order dependencies without user action. Valid only for *ALLUSR, *IBM, or *NONSYS
o DFRID(name) is used to associate multiple restore commands.
o There are two new commands. The following command restores deferred objects associated with the RSTxxx DFRID(name):

RSTDFROBJ DFRID(name)

The following command removes deferred objects if you decide they cannot be restored:

RMVDFRID DFRID(name)

For the following example, there are six libraries. Three libraries contain physical files (PFA, PFB, PFC), and three libraries contain logical files (LFA, LFB, LFC) each dependent on a PF in a different library as follows:

LFA point to PFA, LFB to PFB and LFC to PFC
ll
mat libraries containing logical files were saved to tape before the libraries containing physical files.
 
                   File      
Data file label    Sequence  
LFA                0000000001
LFB                0000000002
LFC                0000000003
PFA                0000000004
PFB                0000000005
PFC                0000000006
  • - Single Restore Operation with DFRID



    When all libraries are restored together, you specify a DFRID, and you have SAVSYS special authority the logical files will be restored, even though the based-on physical files do not exist with the libraries containing, the logical files are restored:

    RSTLIB SAVLIB(*ANY) DEV(ALBYVRT) MBROPT(*ALL) DFRID(DFRTEST)
    Input volume GEN001 is not under media inventory control.
    File LFA in library LFA deferred.
    FILE LFA not restored to LFA.
    1 objects restored. 1 not restored to LFA.
    2 blocks processed for sequence 1, volume GEN001, on device ALBYVRT.
    File LFB in library LFB deferred.
    FILE LFB not restored to LFB.
    1 objects restored. 1 not restored to LFB.
    2 blocks processed for sequence 2, volume GEN001, on device ALBYVRT.
    File LFB in library LFB deferred.
    FILE LFC not restored to LFC.
    1 objects restored. 1 not restored to LFC.
    2 blocks processed for sequence 3, volume GEN001, on device ALBYVRT.
    File LFA in library LFA restored.
    File PFA in library PFA restored.
    2 objects restored from PFA to PFA.
    2 blocks processed for sequence 4, volume GEN001, on device ALBYVRT.
    File LFB in library LFB restored.
    File PFB in library PFB restored.
    2 objects restored from PFB to PFB.
    2 blocks processed for sequence 5, volume GEN001, on device ALBYVRT.
    File LFC in library LFC restored.
    File PFC in library PFC restored.
    2 objects restored from PFC to PFC.
    2 blocks processed for sequence 6, volume GEN001, on device ALBYVRT.
    All objects completed for DFRID DFRTEST.
    3 libraries restored; 3 partially restored; 0 not restored.


    Example of Joblog

  • - Multiple Restore Operation with DFRID



    RSTLIB SAVLIB(LF*) DEV(ALBYVRT) MBROPT(*ALL) DFRID(DFRTEST)
    License key information installed for 5761SS1.
    Input volume IBMIRD is not under media inventory control.
    File LFA in library LFA deferred.
    FILE LFA not restored to LFA.
    1 objects restored. 1 not restored to LFA.
    2 blocks processed for sequence 1, volume IBMIRD, on device ALBYVRT.
    File LFB in library LFB deferred.
    FILE LFB not restored to LFB.
    1 objects restored. 1 not restored to LFB.
    2 blocks processed for sequence 2, volume IBMIRD, on device ALBYVRT.
    File LFC in library LFC deferred.
    FILE LFC not restored to LFC.
    1 objects restored. 1 not restored to LFC.
    2 blocks processed for sequence 3, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 4, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 5, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 6, volume IBMIRD, on device ALBYVRT.
    DFRID DFRTEST has 3 objects remaining.
    0 libraries restored; 3 partially restored; 0 not restored.


    RSTLIB SAVLIB(PF*) DEV(ALBYVRT) MBROPT(*ALL) DFRID(DFRTEST)
    License key information installed for 5761SS1.
    Input volume IBMIRD is not under media inventory control.
    2 blocks processed for sequence 1, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 2, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 3, volume IBMIRD, on device ALBYVRT.
    File LFA in library LFA restored.
    File PFA in library PFA restored.
    2 objects restored from PFA to PFA.
    2 blocks processed for sequence 4, volume IBMIRD, on device ALBYVRT.
    File LFB in library LFB restored.
    File PFB in library PFB restored.
    2 objects restored from PFB to PFB.
    2 blocks processed for sequence 5, volume IBMIRD, on device ALBYVRT.
    File LFC in library LFC restored.
    File PFC in library PFC restored.
    2 objects restored from PFC to PFC.
    2 blocks processed for sequence 6, volume IBMIRD, on device ALBYVRT.
    All objects completed for DFRID DFRTEST.
    3 libraries restored at 06/03/11 01:53:49.

  • - Multiple Restore Operations without DFRID on PF Restore



    RSTLIB SAVLIB(LF*) DEV(ALBYVRT) MBROPT(*ALL) DFRID(DFRTEST)
    License key information installed for 5761SS1.
    Input volume IBMIRD is not under media inventory control.
    File LFA in library LFA deferred.
    FILE LFA not restored to LFA.
    1 objects restored. 1 not restored to LFA.
    2 blocks processed for sequence 1, volume IBMIRD, on device ALBYVRT.
    File LFB in library LFB deferred.
    FILE LFB not restored to LFB.
    1 objects restored. 1 not restored to LFB.
    2 blocks processed for sequence 2, volume IBMIRD, on device ALBYVRT.
    File LFC in library LFC deferred.
    FILE LFC not restored to LFC.
    1 objects restored. 1 not restored to LFC.
    2 blocks processed for sequence 3, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 4, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 5, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 6, volume IBMIRD, on device ALBYVRT.
    DFRID DFRTEST has 3 objects remaining.
    0 libraries restored; 3 partially restored; 0 not restored.

    RSTLIB SAVLIB(PF*) DEV(ALBYVRT) MBROPT(*ALL) DFRID(*DFT)
    License key information installed for 5761SS1.
    Input volume IBMIRD is not under media inventory control.
    2 blocks processed for sequence 1, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 2, volume IBMIRD, on device ALBYVRT.
    2 blocks processed for sequence 3, volume IBMIRD, on device ALBYVRT.
    File PFA in library PFA restored.
    2 objects restored from PFA to PFA.
    2 blocks processed for sequence 4, volume IBMIRD, on device ALBYVRT.
    File PFB in library PFB restored.
    2 objects restored from PFB to PFB.
    2 blocks processed for sequence 5, volume IBMIRD, on device ALBYVRT.
    File PFC in library PFC restored.
    2 objects restored from PFC to PFC.
    2 blocks processed for sequence 6, volume IBMIRD, on device ALBYVRT.
    3 libraries restored at 06/03/11 01:57:52.

    RSTDFROBJ DFRID(DFRTEST)
    File LFA in library LFA restored.
    File LFB in library LFB restored.
    File LFC in library LFC restored.
    3 objects completed for DFRID DFRTEST.

    Example of CPC371C

    Note: Also message CPI373B can be logged indicating that restore completed, not only CPC371C.



If the RSTLIB command is not changed, when GO RESTORE Options 21, 22 or 23 are executed, DFRID(*DFT) is specified.

With BRMS, all the above information is performed automatically. More information can be found on BRMS wiki page Rebuilding relationships between objects during restores using the Restore Deferred Objects (RSTDFROBJ) command

Where is the deferred id stored on the system?

Library QRECOVERY, files QADBRSDFR, QADBRSDFRJ and QADBRSDFRI.
 
It is quite possible for orphaned or abandoned records to accumulate in the QADBRSDFR or QADBRSDFRJ (at R710 and higher) file over time. The purpose of the RMVDFRID command is to allow user-initiated cleanup of  QADBRSDFR and QADBRSDFR files for a particular DFRID.
System-initiated cleanup will be performed for all DFRIDs if the QADBRSDFR or QADBRSDFRJ file is deleted or if damage is detected. Cleanup has the effect of throwing away the records.

It is important for users to clean up the QADBRSDFR and QADBRSDFRJ files, by restoring deferred files and removing any unwanted deferral records, as a completion step in their restore process. Users should beware that orphaned records can cause interference and confusion for future restores of those files.

Notes:
  1. RSTOBJBRM and RSTLIBBRM do not include the DFRID parameter and do default to use DFRID(Q1ARSTID) under the covers. As mentioned above BRMS creates the deferred id under the covers and performs the RSTDFROBJ automatically.
  2. When specifying an object to restore using WRKMEDIBRM, Option 7, 7, the DFRID parameter will default to Q1ARSTID and can be changed to *NONE, if needed.
  3. When specifying an object to restore using WRKMEDIBRM, Option 9 or WRKOBJBRM, the DFRID parameter will default to Q1ARSTID and cannot be be changed.
  4. In order to see what objects are deferred with DFRID Q1ARSTID, the following SQL statement can be used:
    SELECT * FROM QRECOVERY/QADBRSDFR WHERE DBRDFRID = 'Q1ARSTID'
    SELECT * FROM QRECOVERY/QADBRSDFRJ WHERE DBRDFRID = 'Q1ARSTID'
   Then if deferred objects are not needed, can be possible to remove all entries of DFRID(Q1ARSTID) using    command RMVDFRID DFRID(Q1ARSTID).
5. At R710 (with TR7 and SF99701 level 30 or higher) and later releases,  restore processing is enhanced to allow start of journaling to be deferred for database files, data areas, data queues and libraries when the object or library is restored before the journal. Once the journal is restored, the object that deferred start of journaling will now reestablish and resume journaling.  System file, QADBRSDFRJ, will be used to track objects that defer start journaling.  The file will be created into the QRECOVERY library for SYSBAS and the QRCYnnnnn library for independent ASPs (IASP).
6. If there are deferred objects remaining in a DFRID from a previous restore attempt, the next restore that uses the same DFRID will attempt to restore those deferred objects. Users could see the following messages should those deferred objects not be able to be restored:

CPF3232: File &1 in library &2 already exists.
CPF3205: File not created.
CPI321E: File &1 in library &2 deferred.
CPD32F2: Restore of file &1 in library &2 failed to complete.
CPI373C: DFRID &1 has &3 objects remaining.

These messages are usually the result of deferred object records for files being left over from a previous restore operation. These deferred object records can be cleaned up by using the RMVDFRID DFRID(xxxxx) where xxxxx is the DFRID being used for the restore operation.
7. A new system file, QADBRSDFRJ, will be used to track objects that defer start journaling.  The file will be created into the QRECOVERY library for SYSBAS and the QRCYnnnnn library for independent ASPs (IASP). One record will be inserted into the file for each object that defers starting journaling. More information about deferred journal restore can be found on doc Deferred Journal Restore

[{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.1.0"}]

Historical Number

470590333

Document Information

Modified date:
06 May 2020

UID

nas8N1018811