Task 1: Find the log RBA after the inaccessible part of the log
The first task in restarting Db2 by truncating the log is to locate the log RBA after the inaccessible part of the log.
About this task
The range of the log between RBAs X and Y is inaccessible to all Db2 processes.
Procedure
To find the RBA after the inaccessible part of the log, take the action that is associated with the message number that you received (DSNJ007I, DSNJ012I, DSNJ103I, DSNJ104I, DSNJ106I, and DSNJ113E):
- When message DSNJ007I is issued:
The problem is that an operator canceled a request for archive mount. Reason code 00D1032B is associated with this situation and indicates that an entire data set is inaccessible.
For example, the following message indicates that the archive log data set DSNCAT.ARCHLOG1.A0000009 is not accessible. The operator canceled a request for archive mount, resulting in the following message:
DSNJ007I OPERATOR CANCELED MOUNT OF ARCHIVE DSNCAT.ARCHLOG1.A0000009 VOLSER=5B225.To determine the value of X, run the print log map utility (DSNJU004) to list the log inventory information. The output of this utility provides each log data set name and its associated log RBA range, the values of X and Y.
- When message DSNJ012I is issued:
The problem is that a log record is logically damaged. Message DSNJ012I identifies the log RBA of the first inaccessible log record that Db2 detects. The following reason codes are associated with this situation:
- 00D10261
- 00D10262
- 00D10263
- 00D10264
- 00D10265
- 00D10266
- 00D10267
- 00D10268
- 00D10348
For example, the following message indicates a logical error in the log record at log RBA X'7429ABA'.
DSNJ012I ERROR D10265 READING RBA 000007429ABA IN DATA SET DSNCAT.LOGCOPY2.DS01 CONNECTION-ID=DSN, CORRELATION-ID=DSNA given physical log record is actually a set of logical log records (the log records that are generally spoken of) and the log control interval definition (LCID). Db2 stores logical records in blocks of physical records to improve efficiency. When this type of an error on the log occurs during log initialization or current status rebuild, all log records within the physical log record are inaccessible. Therefore, the value of X is the log RBA that was reported in the message, rounded down to a 4-KB boundary. (For the example message above, the rounded 4-KB boundary value would be X'7429000'.)
- When message DSNJ103I or DSNJ104I is
issued:
For message DSNJ103I, the underlying problem depends on the reason code that is issued:
- For reason code 00D1032B, an allocation error occurred for an archive log data set.
- For reason code 00E80084, an active log data set that is named in the BSDS could not be allocated during log initialization.
For message DSNJ104I, the underlying problem is that an open error occurred for an archive and active log data set.
In any of these cases, the message that accompanies the abend identifies an entire data set that is inaccessible. For example, the following DSNJ103I message indicates that the archive log data set DSNCAT.ARCHLOG1.A0000009 is not accessible. The STATUS field identifies the code that is associated with the reason for the data set being inaccessible.
DSNJ103I - csect-name LOG ALLOCATION ERROR DSNAME=DSNCAT.ARCHLOG1.A0000009,ERROR STATUS=04980004 SMS REASON CODE=reasond-codeTo determine the value of X, run the print log map utility (DSNJU004) to list the log inventory information. The output of the utility provides each log data set name and its associated log RBA range, the values of X and Y.
Verify the accuracy of the information in the print log map utility output for the active log data set with the lowest RBA range. For this active log data set only, the information in the BSDS is potentially inaccurate for the following reasons:
- When an active log data set is full, archiving is started. Db2 then selects another active log data set, usually the data set with the lowest RBA. This selection is made so that units of recovery do not need to wait for the archive operation to complete before logging can continue. However, if a data set has not been archived, nothing beyond it has been archived, and the procedure is ended.
- When logging begins on a reusable data set, Db2 updates
the BSDS with the new log RBA range for the active log data set and
marks it as
Not Reusable.
The process of writing the new information to the BSDS might be delayed by other processing. Therefore, a possible outcome is for a failure to occur between the time that logging to a new active log data set begins and the time that the BSDS is updated. In this case, the BSDS information is not correct.
If the data set is marked
Not Reusable,
the log RBA that appears for the active log data set with the lowest RBA range in the print log map utility output is valid. If the data set is markedReusable,
you can assume for the purposes of this restart that the starting log RBA (X) for this data set is one greater than the highest log RBA that is listed in the BSDS for all other active log data sets. - When message DSNJ106I is issued:
The problem is that an I/O error occurred while a log record was being read. The message identifies the log RBA of the first inaccessible log record that Db2 detects. Reason code 00D10329 is associated with this situation.
For example, the following message indicates an I/O error in the log at RBA X'7429ABA'.
DSNJ106I LOG READ ERROR DSNAME=DSNCAT.LOGCOPY2.DS01, LOGRBA=000007429ABA,ERROR STATUS=0108320CA given physical log record is actually a set of logical log records (the log records that are generally spoken of) and the log control interval definition (LCID). When this type of an error on the log occurs during log initialization or current status rebuild, all log records within the physical log record, and beyond it to the end of the log data set, are inaccessible. This is due to the log initialization or current status rebuild phase of restart. Therefore, the value of X is the log RBA that was reported in the message, rounded down to a 4-KB boundary. (For the example message above, the rounded 4-KB boundary value would be X'7429000'.)
- When message DSNJ113E is issued:
The problem is that the log RBA could not be found in the BSDS. Message DSNJ113E identifies the log RBA of the inaccessible log record. This log RBA is not registered in the BSDS. Reason code 00D1032B is associated with this situation.
For example, the following message indicates that the log RBA X'7429ABA' is not registered in the BSDS:DSNJ113E RBA 000007429ABA NOT IN ANY ACTIVE OR ARCHIVE LOG DATA SET. CONNECTION-ID=DSN, CORRELATION-ID=DSNUse the print log map utility (DSNJU004) to list the contents of the BSDS.
A given physical log record is actually a set of logical log records (the log records that are generally spoken of) and the log control interval definition (LCID). When this type of an error on the log occurs during log initialization or current status rebuild, all log records within the physical log record are inaccessible.
Using the print log map output, locate the RBA that is closest to, but less than, X'7429ABA' for the value of X. If you do not find an RBA that is less than X'7429ABA', a considerable amount of log information has been lost. If this is the case, continue with Recovering from a failure resulting from total or excessive loss of log data. Otherwise, continue with the next topic.