Resetting the log RBA value in a non-data sharing environment Start of change(6-byte format)End of change

Before a Db2 subsystem in a non-data sharing environment reaches the end of the log RBA range, you need to reset the log RBA value for that subsystem.

Before you begin

Start of change Db2 11 introduced extended 10-byte RBA and LRSN formats, and the BSDS conversion is required at migration to Db2 12. The recommended response before your Db2 subsystem reaches the end of the 6-byte log RBA range is to convert all page sets to use the 10-byte format. For details see What to do before RBA or LRSN limits are reached and The extended 10-byte RBA and LRSN in Db2 12.End of change

At migration to Db2 12, you cannot start Db2 12 until the BSDS is converted to use the 10-byte RBA and LRSN formats. You can convert the BSDS before or during the Db2 12 migration process.

Having full backups of all Db2 subsystem volumes is recommended, including volumes with active and archive log data sets and the BSDSs.

Procedure

To reset the log RBA value in a non-data sharing environment by using the COPY utility:

  1. Drop any user-created indexes on the SYSIBM.SYSTSCPY catalog table.
  2. Alter all of the indexes on the catalog tables so that they have the COPY YES attribute by issuing the ALTER INDEX COPY YES statement, and commit the changes after running every 30 ALTER statements.
    Tip: You do not need to alter the following objects:
    • Db2 directory indexes. By default, these indexes already have the COPY YES attribute.
    • Indexes for the DSNDB06.SYSTSCPY catalog table space. You will be resetting the log RBA value for these indexes later in this procedure.
  3. Issue the -STOP DB2 command to quiesce the subsystem that is approaching the end of the log RBA range.
  4. Restart Db2 in ACCESS(MAINT) mode.
  5. Issue the -DISPLAY THREAD command. Ensure that there are no INDOUBT or POSTPONED ABORT units of recovery.
  6. Issue the -DISPLAY UTILITY command. Ensure there are no active or stopped utilities.
  7. Issue the -DISPLAY DATABASE(*) SPACENAM(*) RESTRICT command. Ensure that all restricted states are removed.
  8. Quiesce the Db2 subsystem again by issuing the -STOP DB2 command.
  9. Use IDCAMS to delete and redefine the table spaces SYSUTILX, SYSTSCPY, and SYSLGRNX and their corresponding indexes. Then, re-initialize these page sets.
    For information about how to re-initialize these page sets, see members DSNTIJDE, DSNTIJIN, DSNTIJID, and DSNTIJIE in library SDSNSAMP.
    CAUTION:
    Edit these members so that only the pertinent page sets are processed.
  10. Complete the following steps to enable the COPY utility to reset the log RBA values in data pages and index pages as they are copied:
    1. Edit member DSN6SPRC of the prefix.SDSNMACS library and locate the entry SPRMRRBA.
    2. Change the SPRMRRBA setting to '1' and save the change.
    3. Run the first two steps of your customized copy of job DSNTIJUZ to rebuild your Db2 subsystem parameter module (DSNZPxxx).
  11. Start of change Stop all IFI applications that might issue READS calls for IFCID 0306 to read log records from the subsystem. End of change
  12. Cold start the subsystem back to the RBA value of 0 (zero).
    This step removes all log data from the BSDS. This step requires utility DSNJU003 with the following options:
    CRESTART CREATE,STARTRBA=0,ENDRBA=0
  13. Start of change Restart all IFI applications that you stopped in step 11. End of change
  14. Start the Db2 subsystem in ACCESS(MAINT) mode.
  15. Take new, full image copies of all table spaces and indexes by using the COPY utility with the SHRLEVEL REFERENCE option to automatically reset the log RBA values.
    1. Start of change COPY the DSNDB06.SYSTSTSS and DSNDB06.SYSTSISS catalog table spaces. End of change
    2. Copy the rest of the catalog and directory table spaces and indexes, including any user-created Db2 catalog indexes.
    3. Alter indexes on user table spaces so that they have the COPY YES attribute by issuing the ALTER INDEX COPY YES statement, and commit the changes after running every 30 ALTER statements.
    4. Copy the table spaces and indexes in user-created databases.
      You can do this step and the next step in parallel.
    5. Copy the tables spaces and indexes in default database DSNDB04.
    Do not copy the table spaces in workfile database DSNDB07. Db2 automatically resets the log RBA values in these table spaces when they are used.
    Restriction: Because FlashCopy® technology does not reset the log RBA, you cannot use the COPY FLASHCOPY option in this situation.
  16. Re-create any user-created indexes on the SYSIBM.SYSCOPY table that were dropped in step 1 of this procedure.
  17. Verify that the log RBA values were reset:
    1. Run a query against the tables SYSIBM.SYSCOPY, SYSIBM.SYSTABLEPART, and SYSIBM.SYSINDEXPART to verify that all objects were copied.
    2. Use the DSN1PRNT utility with the FORMAT option to print several pages from some of the objects so that you can verify that the PGLOGRBA field in the pages are reset to zero.
      The COPY utility updates the PGLOGRBA field and other RBA fields in header pages (page zero) so these fields will contain non-zero values.
  18. Stop Db2, and disable the reset RBA function in the COPY utility by following the instructions in step 10 and setting SPRMRRBA to '0'.
  19. Restart Db2 for normal access.
  20. Alter the Db2 catalog indexes and user-created indexes to have the COPY NO attribute by issuing the ALTER INDEX COPY NO statement.
    Commit the changes after every thirty ALTER statements. However, you should issue these ALTER statements over several days, because during this process SYSCOPY and SYSLGRNX records are deleted and contention might occur.
    Note: If the RBA fields for an object are not reset, abend04E RC00C200C1 is returned during SQL update, delete, and insert operations. The object also is placed in STOPE status. You can use the DSN1COPY utility with the RESET option to reset the log RBA values. This two-step process requires copying the data out and then back into the specified data sets. Before using DSN1COPY with the RESET option, make sure that the object is stopped by issuing the command -STOP DB(...) SPACENAM(...).