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-create(1)


NAME

 hadbm create - creates a database instance

SYNOPSIS

 hadbm create [package=package_name] [packagepath=path] [historypath=path] [devicepath=path] [datadevices=number_of_devices_per_node] [portbase=base_number] [spares=number_of_spares] [set=attribute_name_value_list] [agent=ma_url] [no-cleanup] [no-clear] [devicesize=size] [dbpassword=password | dbpasswordfile=filename] [adminpassword=password | adminpasswordfile=filename | no-adminauthentication] hosts=host_list [dbname]

DESCRIPTION

The hadbm create command creates the specified database in the HADB management domain. The create command implicitly maps the hostlist to node numbers in the given order (i.e., the first host in the host list maps to physical node 0). You can specify where to store data devices, log devices, and history files. An HADB instance must have at least two active nodes. The hostlist defines which interfaces (IP addresses) the HADB nodes communicates on. If the hostlist consists of DNS names, an IP address will be resolved using a resolve mechanism in the management agent.

The database system user will be assigned the password that is supplied in the dbpassword option or the dbpasswordfile option. This password is expected to be passed in other commands that require data access.

All the paths used for the database should exist and should be writeable on the hosts.

If necessary, the create command will create or extend the HADB management domain, using the hosts in the hostlist. It also registers the HADB software package on all the hosts in the hostlist given for the create command. If a package has been registered on only some of the hosts in the domain, the create command will register the package on the remaining hosts with its current packagepath.

Apart from the domain management issues, the create command is atomic, and if it fails, all database resources will be cleaned up. To avoing the cleanup, use the no-cleanup option.

OPTIONS

-k package

The name identifying the software package. If the package is not found, a default package is registered.

-L packagepath

Path to the HADB software package. Only used if the package is not registered in the domain. This option is deprecated. Use the hadbm registerpackage command to register a package in the domain.

-t historypath

The full path to the history files. If the historypath option is not specified, the default path is set up by the management agent(s). The management agent uses the entries in the configuration file (ma.server.dbhistorypath).

d devicepath

The path for the data and log devices. The path to the device must already exist. To set the path differently for each node or device, use the set option. There are four types of devices:

  • DataDevice

  • NiLogDevice (node internal log device

  • RelalgDevice (relational algebra query device)

  • NoManDevice (node manager device)

If the devicepath option is not specified, the default path is set up by the management agent(s). The management agent uses the entries in the configuration file (ma.server.dbdevicepath).

-a datadevices

The number of data devices. The number must be between 1 and 8, on each node.

-b portbase

The port base number used for node 0. The other nodes are then assigned port number bases in steps of 10 from the number specified here.

-s spares

The number of spares. The number must be less than the length of the host list and at least two active nodes should be there.

S set

Identifies the configuration parameters that will be set to the database. Must be specified as a comma-separated list of database configuration attributes in name=value format.

Use this option to set a different devicepath for each node or each device. The syntax for each name=value pair is:

Node-nodenumber.device-devicenumber.DevicePath=path

Where: -devicenumber is only required if the device is a DataDevice.

For example: Node-0.DataDevice-0.DevicePath=/disk0. Any device path that is not set for a particular node or device defaults to the devicepath value.

The following table identifies the configuration attributes available.

Table 1: Configuration Attributes
VariableRangeDefault
ConnectionTracetrue/falsefalse
CoreFiletrue/falsefalse
DataBufferPoolSize162047200 MB
DataDeviceSize322621441024 MB
DevicePathn/an/a
EagerSessionThreshold010050 (% of NumberOfSessions)
EagerSessionTimeout02147483647120 seconds
EventBufferSize020971520 MB
HistoryPathn/an/a
InternalLogBufferSize412812 MB
LogBufferSize4204748 MB
MaxTables10011001100
NumberOfDatadevices181
NumberOfLocks20000107374182450000
NumberOfSessions110000100
Portbase100006300015000
RelalgDeviceSize32262144128 MB
SQLTraceModenone/short/fullnone
SessionTimeout02147436471800 seconds
StartRepairDelay010000020 seconds
StatInterval0600600
SyslogFacility<facility>local0
SyslogLevel<level>warning
SyslogPrefix<string>hadb-<db_name>
TakeoverTime5001600010000 MS

Valid values for SyslogFacility are: local0/local1/local2/local3/local4/local5/local7/kern/mail/none

Valid values for SyslogLevel are: info/warning/error/alert/severe/none

Heterogenous attributes:

  • Node-<nodeno>.HistoryPath=<path_to_history_files>

  • Node-<nodeno>.DevicePath=<default_path_for_devices_on_node>

  • Node-<nodeno>.<device>.DevicePath=<path_for_device_on_node>

Where <device> is one of:

  • DataDevice-<datadevicenumber>

  • RelalgDevice

  • NiLogDevice

  • NoManDevice

<datadevicenumber> is a number in range of 0 to number of data devices specified in the datadevices option.

m agent

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

no-cleanup

Use this option to prevent the deletion of files that are normally deleted (such as the history files, devices, and configuration files) if the create command fails.

no-clear

By default the database is initalized and started. However, if this option is set, the database processes will not be started, the devices will not be initialized, and you must use the clear command to start the database for the first time.

-z devicesize

The size of the data devices (specified in MB). This size is applicable on all devices.

-p dbpassword

The password string for the system user of the database. The minimum length of the password must be 8 characters. You can identify either the database password, or for higher security, the password file where the password is defined.

-P dbpasswordfile

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

w adminpassword

The actual HADBM administration password.

W adminpasswordfile

The file from which the passwords are read.

U no-adminauthentication

Using this option eliminates the need of password identification.

-H hosts

A comma-separated list of all the host names or IP addresses used for all the nodesin the database. An HADB Management Agent must be running on each host. Using the IP address is recommended because there is no dependence on DNS lookups. Hostnames must be absolute. Do not use localhost or 127.0.0.1 as a hostname.

Configuring an HADB instance with double networks: To make HADB tolerate single network failures, the HADB server machines can be equiped with two NIC cards. The HADB instance must be configured to exploit these cards by specifiying both IP addresses of the NIC cards for each node. The first IP address the HADB considers as net-0, the second is set to net-a. The syntax for a two-node configuration is: hosts=h0a+h0b,h1a+h1b.

  • h0a is host-0's IP address on net-0

  • h0b is host-0's IP address on net-1

  • h1a is host-1's IP address on net-0

  • h1b is host-1's IP address on net-1

All nodes in a database instance must be connected to both networks. It is not allowed to have some nodes connected to both networks while others are connected to only one network. The IP address of each NIC card must be on separate IP subnets.

OPERANDS

dbname

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

EXAMPLES

Example 1. Using create with two nodes on a single device

The following example creates a database with the default database name hadb with two active nodes, and a single data device. The system prompts you for the password twice. All paths are default paths and must be created before initiating this command.

hadbm create --devicesize=256 --hosts=host1,host2
Database successfully created and started
Example 2. Using create with two nodes on multiple devices

The following example creates a database named mydb with two active nodes, two spare nodes, two devices per node, and a specific port base number for some specific path.

hadbm create  -H host1,host2 --packagepath=/home/hadb/install 
--historypath=/export/home/hadb/history --devicepath =/export/home/hadb/device 
--configpath /home/hadb/config --datadevices=2 --portbase=1500 
--dbpasswordfile=/home/hadb/dbpfile --spares=2 --devicesize=512 
--set "Node-0.DataDevice-0.DevicePath=/disk0 Node-0.DataDevice-0.DevicePath=/disk1" mydb
Database successfully created and started

Node 0 gets two data devices: /disk0/mydb.data.0 and /disk1/mydb.data1.1. Since Node 1 is not specified with any specific device path in the set option, and since the datadevices option was set to 2, Node 1 gets both devices on the path given in the devicepath option. The devices for Node 1 are then /export/home/hadb/device/mydb.data.1 and /export/home/hadb/device/mydb.data1.1.

EXIT STATUS

0

command executed successfully

1

error in executing the command

ERROR CODES

22021

database exists

22022

specified path does not exist

22023

specified path does not have write permissions

22024

host unreachable

22025

hosts not added in pairs

22026

database name specified is not valid

22027

port base number is not valid

22028

specified number for data devices cannot be supported

22029

specified device size cannot be supported

22030

specified number of spares could not be allocated

22031

attributes are not recognized

22032

password string not valid

22033

invalid value set for attributes

SEE ALSO

hadbm-clear(1), hadbm-delete(1), hadbm-list(1), hadbm-start(1), hadbm-restart(1), hadbm-status(1), hadbm-stop(1)


J2EE SDK 1.4Go To TopLast Changed 31 Jan 2005