SQL/MP Installation and Management Guide

Performing Recovery Operations
HP NonStop SQL/MP Installation and Management Guide523353-004
11-11
Recovering Consistent Files by Resetting the
BROKEN Flag
Recovering Consistent Files by Resetting the
BROKEN Flag
When a disk volume or node crashes or a process terminates unexpectedly, files that
are open at that time are left in a questionable state. In many cases, the files are really
inconsistent because they were actively involved in interrupted database transactions.
These files must be recovered with the volume recovery or file recovery methods. In
other cases, files marked as questionable are actually consistent. These files, although
open at the time of the crash, were not actively taking part in database transactions.
In many cases, you know which files are actually corrupt and which are actually
consistent. Normally, it is better to allow TMF recovery to recover all the files and to
determine which are corrupt and which are not. If, however, you are able to determine
that a file is not corrupt, it can be much quicker to simply reset the BROKEN flag that
indicates to the system that the file is corrupt. To reset this flag, issue an ALTER
TABLE or ALTER INDEX statement using the RESETBROKEN option.
Use the RESETBROKEN option to reset the BROKEN flags for SQL catalog tables. A
catalog, although sometimes open at the time of a crash (as a result of activities such
as automatic recompilation or dynamic SQL operations), is often not actively involved
in update operations. Also, to facilitate recovery of database files, you can reset the
BROKEN flags for the catalog tables if these tables are not corrupt.
You must use the RESETBROKEN option before you use a TMF recovery method.
After it starts, TMF recovery resets the flag.
Restoring Objects With TMF Recovery
Operations
With the TMF volume recovery and file recovery mechanisms, you can recover SQL
catalogs and objects after a system or disk volume crash. You can also use file
recovery to recover a purged object and to recover a database to a specified time.
These recovery operations, and others, are described next. For additional information
about volume recovery and file recovery, see The TMF Subsystem on page 4-10 or the
TMF Operations and Recovery Guide.
Caution. Avoid using the RESETBROKEN option on files that might be corrupt. If you are
unsure of the state of a file, use TMF recovery methods instead. RESETBROKEN is not a
replacement for other recovery methods when the file is corrupt.