Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
 
User Commandshadbm-clear(1)


NAME

 hadbm clear - reinitializes all the dataspace on all nodes and starts the database

SYNOPSIS

 hadbm clear [fast] [spares=number_of_spares] [adminpassword=password | adminpasswordfile=filename] [dbpassword=password | dbpasswordfile=filename] [agent=ma_url] [dbname]

DESCRIPTION

Use the hadbm clear command to reinitialize all the data devices and start the database. The hadbm clear command can also be used in the following situations:

  • Restarting the database after a disaster. A disaster refers to double failures, where one or more mirror node pairs are down simultaneously. For example, due to a power failure, machine reboot, or some other unforeseen disaster. The hadbm status command will indicate a database that is hit by a disaster as non-functional.

  • The password provided at the time the database was created is lost during clear and the new password given in the dbpassword=password option will be used when accessing the database in the future. The cleared database will be in an HA Fault Tolerant or Fault Tolerant state.

In interactive mode, the hadbm clear command prompts for a confirmation before clearing the database.

OPTIONS

-F fast

Use this option to skip device initialization to save time. Do not use if the disk storage device is corrupted. The data devices must be initialized for the first time after the database is created.

-s spares

If specified, identifies the number of spares. The number must be such that there are at least two active nodes. This number of spares must be even and must be less than or equal to the number of active nodes in the database. If not specified, the original number of spare nodes found in the database instance earlier will be preserved. Spare nodes are option, but having two or more ensures high availability.

-p dbpassword

The password used for the system user of the database. This password must be valid and is expected to be passed in other commands that require data access.

-P dbpasswordfile

Identifies the file containing the password to be used for the system user of the database.

w adminpassword

The actual HADBM administation password.

W adminpasswordfile

The file from which the HADBM administration password is read.

m agent

Identifies the URL to the Management Agent(s) (hostlist:port).

OPERANDS

dbname

The name of the database. The default database is hadb.

EXAMPLES

Example 1. Using clear with the default database
hadbm clear
Type "yes" or "y" to confirm this operation, anything else to cancel: y
Database successfully cleared
Example 2. Using clear with a database identified
hadbm clear mydatabase
This command will clear the database.
Type "yes" or "y" to confirm this operation, anything else to cancel: y
Database successfully cleared

EXIT STATUS

0

command executed successfully

1

error in executing the command

ERROR CODES

22002

specified database does not exist

22061

database could not be cleared

SEE ALSO

hadbm-addnodes(1), hadbm-clearhistory(1), hadbm-delete(1), hadbm-list(1), hadbm-refragment(1), hadbm-restart(1), hadbm-start(1), hadbm-stop(1)


J2EE SDK 1.4Go To TopLast Changed 22 Dec 2004