Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide

- Previous: Expanding HADB
- Next: Getting Device Information

## Getting the Status of HADB

Use the `hadbm status` command to display the status of the database or its nodes. The command syntax is:

    hadbm status
    [--nodes]
    [--adminpassword=password | --adminpasswordfile=file]
    [--agent=maurl]
    [dbname]

The dbname operand specifies the database name. The default is `hadb`.

The `--nodes` option (short form `-n`) displays information on each node in the database. For more information , see Node Status. See General Options for a description of other command options.

For more information, see hadbm-status(1).

##### Example 3–15 Example of getting HADB status

For example:

    hadbm status --nodes

### Database States

A database’s state summarizes its current condition. The following table describes the possible database states.

Table 3–14 HADB States

Database State | Description
--- | ---
High-Availability Fault Tolerant (HAFaultTolerant) | Database is fault tolerant and has at least one spare node on each DRU.
Fault Tolerant | All the mirrored node pairs are up and running.
Operational | At least one node in each mirrored node pair is running.
Non Operational | One or more mirrored node pairs is missing both nodes. If the database is non-operational, clear the database as described in Clearing a database.
Stopped | No nodes are running in the database.
Unknown | Cannot determine the state of the database.

### Node Status

Use the`--nodes` option to make the `hadbm status` command display the following information for each node in the database:

- Node number

- Name of the machine where the node is running

- Port number of the node

- Role of the node. For a list of roles and their meanings, see Roles of a Node

- State of the node. For a list of states and their meanings, see States of a Node

- Number of the corresponding mirror node.

A node’s role and state can change as described in these sections:

- Roles of a Node

- States of a Node

#### Roles of a Node

A node is assigned a role during its creation and can take any one of these roles:

- Active: Stores data and allows client access. Active nodes are in mirrored pairs.

- Spare: Allows client access, but does not store data. After initializing data devices, monitors other data nodes to initiate repair if another node becomes unavailable.

- Offline: Provide no services until their role changes. When placed back online, its role can change back to its former role.

- Shutdown: An intermediate step between active and offline, waiting for a spare node to take over its functioning. After the spare node has taken over, the node is taken offline.

#### States of a Node

A node can be in any one of the following states:

- Starting: The node is starting.

- Waiting: The node cannot decide its start level and is offline. If a single node is in this state for more than two minutes, stop the node and then start it at the `repair` level; see Stopping a Node and Starting a Node Clearing a database.

- Running: The node is providing all services that are appropriate for its role.

- Stopping: The node is in the process of stopping.

- Stopped: The node is inactive. Repair of a stopped node is prohibited.

- Recovering: The node is being recovered. When a node fails, the mirror node takes over the functions of the failed node. The failed node tries to recover by using the data and log records in main memory or on disk. The failed node uses the log records from the mirror node to catch up with the transactions performed when it was down. If recovery is successful, the node becomes active. If recovery fails, the node state changes to repairing.

- Repairing: The node is being repaired. This operation reinitializes the node and copies the data and log records from the mirror node. Repair is more time consuming than recovery.

- Previous: Expanding HADB
- Next: Getting Device Information

- © 2010, Oracle Corporation and/or its affiliates