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
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 13.
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:
-
Drop any user-created indexes on the SYSIBM.SYSTSCPY catalog table.
-
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.
-
Issue the -STOP DB2 command to quiesce the subsystem that is approaching the
end of the log RBA range.
-
Restart Db2 in ACCESS(MAINT) mode.
-
Issue the -DISPLAY THREAD command. Ensure that there are no INDOUBT or
POSTPONED ABORT units of recovery.
-
Issue the -DISPLAY UTILITY command. Ensure there are no active or stopped
utilities.
-
Issue the -DISPLAY DATABASE(*) SPACENAM(*) RESTRICT command. Ensure that all
restricted states are removed.
-
Quiesce the Db2 subsystem again by issuing the
-STOP DB2 command.
- 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.
-
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:
-
Edit member DSN6SPRC of the prefix.SDSNMACS library and locate the entry SPRMRRBA.
-
Change the SPRMRRBA setting to '1' and save the change.
-
Run the first two steps of your customized copy of job DSNTIJUZ to rebuild your Db2 subsystem parameter module (DSNZPxxx).
-
Stop all IFI applications that might issue READS
calls for IFCID 0306 to read log records from the subsystem.
-
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
-
Restart all IFI applications that you stopped in
step 11.
-
Start the Db2 subsystem in ACCESS(MAINT) mode.
-
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.
-
COPY the DSNDB06.SYSTSTSS and DSNDB06.SYSTSISS catalog table spaces.
-
Copy the rest of the catalog and directory table spaces and indexes, including any user-created
Db2 catalog indexes.
-
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.
-
Copy the table spaces and indexes in user-created databases.
You can do this step and the next step in parallel.
-
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.
-
Re-create any user-created indexes on the SYSIBM.SYSCOPY table that were dropped in step 1 of
this procedure.
-
Verify that the log RBA values were reset:
-
Run a query against the tables SYSIBM.SYSCOPY, SYSIBM.SYSTABLEPART, and SYSIBM.SYSINDEXPART to
verify that all objects were copied.
-
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.
-
Stop Db2, and disable the reset RBA function in the COPY
utility by following the instructions in step 10 and setting SPRMRRBA to '0'.
-
Restart Db2 for normal access.
-
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(...).