SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Performing Recovery Operations
HP NonStop SQL/MX Installation and Management Guide523723-004
12-33
Using FIXUP to Correct Problem Data and Objects
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 NonStop
SQL/MP.
To fix a broken file, perform the steps listed in Recovering a Broken Partition on
page 12-32.
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.
For example, PURGEDATA sets the corrupt bit before deleting rows. If PURGEDATA
fails before deleting all rows, the corrupt bit remains set. If you determine that even
though PURGEDATA failed it is acceptable to use the table, you can reset the corrupt
bit.
Changing the Redefinition Timestamp
The redefinition timestamp changes whenever a DDL change made on the object
results in a structure change. All partitions of a single object, including tables, views,
indexes, and SQL worktables must have the same redefinition timestamp. However,
dependent objects can have their own distinct redefinition time.
For example, this command creates table A with three partitions:
Create table tableA
(col1 int not null primary key, col2 char (20))
Partition (add first key (1000) location $vol1,
add first key (2000) location $vol2);
Table A also has a dependent index that contains two partitions:
Create index tableA_index1 on tableA (col2)
Partition (add first key ("m" location $vol1));
The three partitions on tableA must have the same redefinition timestamp. The two
partitions on index tableA_index1 must have the same redefinition timestamp.
However, tableA can have a different redefinition timestamp than index tableA_index1.
If one of the partitions of an object has a different timestamp than the others, use the
FIXUP operation to make them all the same (for example, when you restore a single