Recovering from a down-level page set problem
When using a stand-alone utility or a non-Db2 utility, you might inadvertently replace a Db2 page set with an incorrect or outdated copy. This type of copy is called down-level. Using a down-level page set can cause complex problems; therefore, you need to recover from this situation.
Symptoms
The following message is issued:
DSNB232I csect-name - UNEXPECTED DATA SET LEVEL ID ENCOUNTERED
The message also contains the level ID of the data set, the level ID that Db2 expects, and the name of the data set.
Causes
A down-level page set can be caused by:
- A Db2 data set is inadvertently replaced by an incorrect or outdated copy. Usually this happens in conjunction with use of a stand-alone or non-Db2 utility, such as DSN1COPY or DFSMShsm.
- A cold start of Db2 occurs.
- A VSAM high-used RBA of a table space becomes corrupted.
Db2 associates a level ID with every page set or partition. Most operations detect a down-level ID, and return an error condition, when the page set or partition is first opened for mainline or restart processing. The exceptions are the following operations, which do not use the level ID data:
- LOAD REPLACE
- RECOVER
- REBUILD INDEX
- DSN1COPY
- DSN1PRNT
Environment
- If the error was reported during mainline processing, Db2 sends a "resource unavailable" SQLCODE and a reason code to the application to explain the error.
- If the error was detected while a utility was processing, the utility generates a return code 8.
Diagnosing the problem
Determine whether the message was issued during restart or at some other time during normal operation. This information is important for determining what steps to take belowResolving the problem
- If the message was issued during restart, take one of the following
actions:
- Replace the data set with one that is at the proper level, by using DSN1COPY, DFSMShsm, or some equivalent method. To check the level ID of the new data set, run the stand-alone utility DSN1PRNT on it, with the options PRINT(0) (to print only the header page) and FORMAT. The formatted print output identifies the level ID.
- Recover the data set to the current time, or to a prior time, by using the RECOVER utility.
- Replace the contents of the data set, by using LOAD REPLACE.
- If the message was issued during normal operation (not during
restart):
- Take one of the actions that are listed for situations when the message was issued during restart.
- Accept the down-level data set by changing its level ID. You can
use the REPAIR utility with the LEVELID statement. (You cannot use
the LEVELID option in the same job step with any
other REPAIR utility control statement.) Attention: If you accept a down-level data set or disable down-level detection, your data might be inconsistent.
- To control how often the level ID of a page set or partition is updated, specify a value between 0 and 32767 on the LEVELID UPDATE FREQ field of panel DSNTIPL.
- To disable down-level detection, specify 0 in the LEVELID UPDATE FREQ field of panel DSNTIPL.
- To control how often level ID updates are taken, specify a value between 1 and 32767.