SQL/MX 3.2.1 Management Manual (H06.26+, J06.15+)
interrupted database transactions. In other cases, files marked as questionable are actually
consistent. These files, although open at the time of the failure, were not actively taking part in
database transactions.
In many cases, you know which files are actually corrupt and which are consistent. Normally, it
is better to allow the TMF file recovery method to recover all the files and determine which are
corrupt and which are not. See “Recovering Files” (page 236).
If you are able to determine that a file is not corrupt, you can simply reset the BROKEN flag that
indicates to the system that the file is corrupt. To reset this flag, use the mxtool FIXUP utility.
Recovering a Broken Partition
The broken flag in a file label can be set by DP2 when it detects that something might be wrong
with a partition. After the problem with the partition is fixed, turn off the broken flag to access the
data. The ability to turn off the broken flag is equivalent to the ALTER TABLE … RESETBROKEN
command in SQL/MP.
To fix a broken file:
1. Turn off the audit bit.
2. Use TANDUMP to fix the problem.
3. Reset the broken flag.
4. Turn on the audit bit.
Correcting File Label Information
Use FIXUP to change these fields in SQL/MX file labels:
• Audit bit
• Broken bit
• Corrupt bit
• Redefinition timestamp
Changing the Audit Bit
SQL/MX tables are always created as audited. In some cases, you might need to use FIXUP to
turn off the audit bit to run a low-level DP2 utility operation. In other cases, after some utility
operation has failed, the audit bit might be left turned off, and you might need to turn the audit bit
on before being able to access the partition.
For example, when using DUP to duplicate a table, the target table is created as nonaudited. If
DUP fails after the data has been loaded but before the audit bit has been turned on, you could
turn on the audit bit and potentially use the new table. Of course, you would have to verify that
the data was loaded correctly. However, checking the validity of the table can be less difficult than
dropping and performing the DUP operation a second time.
Changing the Broken Bit
Like the broken flag, the broken bit is set by DP2 when it detects that something is wrong with the
partition. After the problem with the partition is fixed, the broken bit needs to be turned off to
access the data. The ability to turn off the broken bit is equivalent to using the ALTER TABLE …
RESETBROKEN command in SQL/MP.
To fix a broken file, perform the steps listed in “Recovering a Broken Partition” (page 260).
Changing the Corrupt Bit
The corrupt bit is set during some utility operations to prevent access to the object until the operation
has completed. If the operation fails before the corrupt bit is turned off, the table is unusable. You
might need to reset this bit if you determine that the table is still usable.
260 Performing Recovery Operations










