sun.com | docs.sun.com |  | How To Buy | My Sun | Worldwide Sites |

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

- NAME
- SYNOPSIS
- DESCRIPTION
- Domain Management
- OPTIONS
- OPERANDS
- EXAMPLES
- EXIT STATUS
- ERROR CODES
- SEE ALSO

## 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 will implicitly map the hostlist to node numbers in the given order. Therefore, 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. A HADB instance must have at least two active nodes. The hostlist defines which interfaces (ip-addresses) the HADB nodes will use for communication. If the hostlist consists of DNS names, an ip-address will be resolved by the management infrastructure.

> The database system user will be assigned the password that is supplied in the ---dbpassword option or ---dbpasswordfile option. This password should be passed in other commands that require data access. All paths used for the database should exist and should be writeable on the hosts.

## Domain Management

> If necessary, the`create` command will create or extend the HADB management domain on the hosts in the hostlist. It also registers the HADB software package on all the the hosts in the hostlist given for the create command. If a package has been registered on a few of the hosts in the domain, the `create` command will register the package on the remaining hosts with its current -packagepath. Apart from domain management issues, the create command is atomic, and if it fails, all database resources will be cleaned up. To avoid performing 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 package. This path is only used if the package is not registered in the domain. This option is deprecated. Use `hadbm registerpackage` 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 three 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
>   Variable | Range | Default
>   --- | --- | ---
>   ConnectionTrace | true/false | false
>   CoreFile | true/false | false
>   DataBufferPoolSize | 162047 | 200 MB
>   DataDeviceSize | 32-262144 | 1024 MB
>   DevicePath | n/a | n/a
>   EagerSessionThreshold | 0-100 | 50 (% of NumberOfSessions)
>   EagerSessionTimeout | 0-2147483647 | 120 seconds
>   EventBufferSize | 0-2097152 | 0 MB
>   HistoryPath | n/a | n/a
>   InternalLogBufferSize | 4-128 | 12 MB
>   LogBufferSize | 4-2047 | 48 MB
>   MaxTables | 100-1100 | 1100
>   NumberOfDatadevices | 1-8 | 1
>   NumberOfLocks | 20000-1073741824 | 50000
>   NumberOfSessions | 1-10000 | 100
>   RelalgDeviceSize | 32-262144 | 128 MB
>   SessionTimeout | 0-2147483647 | 1800 seconds
>   StatInterval | 0-600 | 600 seconds
>   StartRepairDelay | 0-100000 | 20 seconds
>   SQLTraceMode | none/short/full | none
>   SyslogFacility | facility | local0
>   SyslogLevel | level | warning
>   SyslogPrefix | string | hadb-db_name
>   TakeoverTime | 500-16000 | 10000 milliseconds

> 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 the range of 0 to number of datadevices specifed in ---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 administation password.

> W adminpasswordfile

>   The file from which the HADBM administration password is 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. Do not have a few nodes connected to both networks, while other nodes 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.4 | Go To Top | Last Changed 22 Dec 2004

Company Info | Contact | Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.