If an NDB is being used as a journal file (that is, it is cleared regularly after a specified time or number of records, for example), it can be cleared in three ways:
The NDB RESET command deletes all data records (and their keys) from an NDB, but preserves the field definitions. Thus, it is equivalent to deleting, defining, re-creating, and reissuing all &NDBDEF ADD statements or NDB FIELD commands required to build the field definitions.
An NDB must not be active when the NDB RESET command is issued. This prevents active users from having the database cleared underneath them. A LOCKED database cannot be reset.
The following sequence of commands resets an NDB:
NDB STOP dbname IMM
NDB RESET dbname
If the database is not active, then the NDB STOP command effectively does nothing. The RESET command gives you the option of placing the database into LOAD MODE.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |