Clear a database when:
The hadbm status command reveals that the database is non-operational or if See Getting the Status of HADB.
Multiple nodes do not respond and are in waiting state for a long time.
Recovering from session data corruption. See Recovering from Session Data Corruption
The hadbm clear command stops the database nodes, clears the database devices, then starts the nodes. This command erases the Application Server schema data store in HADB, including tables, user names, and passwords. After running hadbm clear, use asadmin configure-ha-cluster to recreate the data schema, reconfigure the JDBC connection pool, and reload the session persistence store.
The command syntax is:
hadbm clear [--fast] [--spares=number] [--dbpassword=password | --dbpasswordfile= file] [--adminpassword=password | --adminpasswordfile= file] [--agent=maurl] [dbname]
The dbname operand specifies the database name. The default is hadb.
The following table describes the special hadbm clear command options. See General Options for a description of other options.
For more information, see hadbm-clear(1).
Table 3–12 hadbm clear Options
Option |
Description |
Default |
---|---|---|
-F |
Skips device initialization while initializing the database. Do not use if the disk storage device is corrupted. |
Not applicable |
-s |
Number of spare nodes the reinitialized database will have. Must be even and less than the number of nodes in the database. |
Previous number of spares |
For example:
hadbm clear --fast --spares=2