Hitachi

Hitachi Advanced Database Command Reference


20.2.2 Format of initialization options

Organization of this subsection

(1) Specification format

[set adb_init_dbarea_initialize = {Y|N}]
[set adb_init_multi_max = maximum-number-of-threads-used-to-create-DB-area-files]
[set adb_init_wrk_page_size = page-size-of-work-table-DB-area]
[set adb_init_wrk_blk_path = block-special-file-name-for-allocating-work-table-DB-area-file]
[set adb_init_mst_blk_path = block-special-file-name-for-allocating-master-directory-DB-area-file]
[set adb_init_dic_blk_path = block-special-file-name-for-allocating-dictionary-DB-area-file]
[set adb_init_stbl_blk_path = block-special-file-name-for-allocating-system-table-DB-area-file]
 
{{adbinitdbarea
     -n data-DB-area-name
    [-p {4|8|16|32}]
    [-v block-special-file-name[,block-special-file-name]...]
    [-q]
    [-i initial-allocation-size[,number-of-files-to-be-created]]
    [-f data-DB-area-file-storage-directory-name]
    [-g output-interval-for-progress-messages-for-DB-area-file-creation-processing]
 }}

The specification rules for the foregoing initialization options are the same as for the server definitions. For details about the server definition specification files, see the topic Syntax rules for the server definition in the HADB Setup and Operation Guide.

(2) Explanation of specification format

(a) Set format

adb_init_dbarea_initialize = {Y|N}

Specifies whether the DB areas are to be initialized. When N is specified in this operand, block special files must be allocated to all DB area files other than in the work table DB area.

Y:

Initializes all DB areas.

If specification of this operand is omitted, Y is assumed.

N:

Creates only symbolic links without initializing the DB areas. Note that only the work table DB area is initialized.

When N is specified in this operand, the following option values are ignored when DB area files are created:

  • adbinit command options

    -u option

    -p option

  • Initialization options (operands in the set format)

    adb_init_multi_max operand

  • Initialization options (adbinitdbarea operand's options)

    -q option

    -g option

    -p option

    • Initial allocation size in the -i option

Multi-node function
adb_init_multi_max = maximum-number-of-threads-used-to-create-DB-area-files

~<integer>((1 to 65,535))<<40>>

Specifies the maximum number of threads to be used to create data DB area files.

Specify this operand in the following cases:

  • An error related to the number of threads or file open operations, or a memory shortage has occurred during execution of the adbinit command

    If many data DB area files are created, the numbers of threads and descriptors might exceed the system limit, resulting during execution of the adbinit command in an error related to the number of threads or file open operations, or a memory shortage (output of the KFAA96211-E message). In such a case, you might be able to prevent such errors by executing the adbinit command with a small value specified in this operand.

    If 1 is specified in this operand, one data DB area file is created at a time.

  • 40 or more block special files are used

    Performance might improve if you increase the maximum number of threads by specifying a larger value in this operand.

When data DB areas are created, one thread is generated for each data DB area and one thread is created for each data DB area file. For example, if you create DB area A (two DB area files) and DB area B (three DB area files), a total of seven threads are generated.

adb_init_wrk_page_size = page-size-of-work-table-DB-area

~<integer>((32 to 32,768))<<256>> (kilobytes)

Specifies the page size (in kilobytes) for the work table DB area. Specify the page size that you estimated when you designed the work table DB area. For details about estimating the page size of the work table DB area, see the topic Designing a work table DB area in the HADB Setup and Operation Guide.

If you specify a value that is not divisible by 32, the specified value is rounded up to the next multiple of 32 kilobytes.

The work table DB area is created according to the page size specified in this operand. Specifying the adb_dbarea_wrk_page_size operand in the server definition allows you to change the page size of the work table DB area when the HADB server starts. For details about the adb_dbarea_wrk_page_size operand, see Operands related to system configuration (set format) in the HADB Setup and Operation Guide.

adb_init_wrk_blk_path = block-special-file-name-for-allocating-work-table-DB-area-file

~<path name>((2 to 255 bytes))

When a block special file is to be allocated for a work table DB area file, this option specifies an absolute path name for the block special file, expressed as a file entity or a symbolic link. If this operand is omitted, work table DB area files are created under the DB directory.

Make sure that the file name specified in this operand differs from the file names of the block special files specified in other operands.

Important

An improvement in performance can be expected when block special files are allocated instead of regular files.

However, note that when block special files are allocated, any existing data in the block special files is deleted. If you are not sure whether existing data ought to be deleted, do not allocate block special files.

A block special file mounted on the OS cannot be allocated. A block special file to be allocated must be unmounted.

adb_init_mst_blk_path = block-special-file-name-for-allocating-master-directory-DB-area-file

~<path name>((2 to 255 bytes))

When a block special file is to be allocated for the master directory DB area file, this option specifies an absolute path name for the block special file, expressed as a file entity or a symbolic link. If this operand is omitted, the master directory DB area file is created under the DB directory.

Make sure that the file name specified in this operand differs from the file names of the block special files specified in other operands.

For details about specifying block special files, see the notes for the adb_init_wrk_blk_path operand.

adb_init_dic_blk_path = block-special-file-name-for-allocating-dictionary-DB-area-file

~<path name>((2 to 255 bytes))

When a block special file is to be allocated for the dictionary DB area file, this option specifies an absolute path name for the block special file, expressed as a file entity or a symbolic link. If this operand is omitted, the dictionary DB area file is created under the DB directory.

Make sure that the file name specified in this operand differs from the file names of the block special files specified in other operands.

For details about specifying block special files, see the notes for the adb_init_wrk_blk_path operand.

adb_init_stbl_blk_path = block-special-file-name-for-allocating-system-table-DB-area-file

~<path name>((2 to 255 bytes))

When a block special file is to be allocated for the system-table DB area file, this option specifies an absolute path name for the block special file, expressed as a file entity or a symbolic link. If this operand is omitted, the system-table DB area file is created under the DB directory.

For details about specifying block special files, see the notes for the adb_init_wrk_blk_path operand.

(b) Command format

adbinitdbarea

Specifies the definition of a data DB area. You specify this operand for each data DB area that is to be created.

The options to be specified depend on the type of DB area files that are to be allocated for the data DB area. The following table provides guidelines for the options to be specified.

Table 20‒2: Guidelines for the options to be specified depending on the type of files that are to be allocated as data DB area files

No.

Option name

Type of files allocated as DB area files

Description of option

Block special file

Regular file

1

-n

R

R

Specifies the name for the data DB area.

2

-p

R

R

Specifies the page size for the data DB area.

3

-v

R

N

Specifies names for the block special files that are to be allocated as the data DB area files.

4

-q

R

N

Specifies that the data DB area files are to be created in quick mode.

5

-i

R

R

Specifies the initial allocation size for each data DB area file and the number of data DB area files to be created.

6

-f

O

O

Specifies that symbolic links to the data DB area files or block special files are to be stored in a subdirectory of the DB directory.

7

-g

O

O

Specifies the interval for output of progress messages for data DB area file creation processing.

Legend:

R: Required/Recommended. Specification of this option is required or is recommended.

O: Decide whether to specify this option after reading its description.

N: Not specified.

-n data-DB-area-name

~<character string>((1 to 30 bytes))

Specifies a name for the data DB area that is to be created. The name specified in this option is used as the name of the data DB area files.

The following notes apply:

  • The characters permitted for a DB area name are alphanumeric characters, underscore (_), and hyphen (-). A DB area name must begin with an alphabetic character.

  • If a DB area name to be used is the same as a reserved word for SQL statements, enclose the DB area name in a backslash and double quotation mark (\"). For details about the reserved words for SQL statements, see Reserved words in SQL Basics in the manual HADB SQL Reference.

  • If a specified DB area name contains a lowercase letter, enclose the entire DB area name in a backslash and double quotation mark (\"). If it is not enclosed in a backslash and double quotation mark, the character string used as the DB area name will be treated as being in all uppercase letters.

    Example: \"DBarea01\"

  • This DB area name must differ from the name of any other DB area or directory created under the DB directory. For details about the names of other DB areas, see Table 20‒5: Attributes of DB areas that are created in 20.5.1 Attributes of DB areas that are created. For details about the names of directories that are created under the DB directory, see Table 20‒6: Directories that are created under the DB directory in 20.5.2 Directories that are created.

-p {4|8|16|32}

Specifies the page size (in kilobytes) for the data DB area. Specify the page size you estimated when you designed the data DB area. For details about how to estimate the page size for the data DB area, see Points to consider when determining the page size in data DB areas in the HADB Setup and Operation Guide.

-v block-special-file-name[,block-special-file-name]...

~<path name>((2 to 255 bytes))

Specify this option when you allocate block special files as data DB area files. This option specifies the absolute path names of the block special files, expressed as file entities or symbolic links.

The following notes apply:

  • Each block special file name must differ from any block special file name specified in any other operand.

  • For guidelines for the number of block special files (number of logical volumes that make up one DB area) and size to be specified in this option, see the following: Points to consider when setting up an LVM in the HADB Setup and Operation Guide.

  • Specify as many block special file names as there are DB area files to be created (as specified in the -i option). If fewer block special file names are specified than the number of DB area files to be created, the adbinit command results in an error.

  • For details about specifying block special files, see the notes for the adb_init_wrk_blk_path operand.

When you specify this option, the command creates symbolic links to the block special files under the DB directory.

-q

Specifies that the data DB area files are to be created in quick mode. Specifying this option enables you to reduce the time required to create the data DB area files.

The -q option is applied if the files to be initialized are block special files.

Note

When the data DB area files are created in quick mode, only each file's management page (containing information such as the file size) is created. The pages for storing actual data are not created. This is why it takes less time to create the data DB area files.

-i initial-allocation-size[,number-of-files-to-be-created]

Specifies the initial allocation size for each data DB area file and the number of data DB area files to be created.

  • initial-allocation-size

    ~<alphabetic and numeric characters>((0K to 127P))<<0K>>

    Specifies the initial allocation size for each data DB area file, using one of the following letters to indicate the units: K for kilobytes, M for megabytes, G for gigabytes, T for terabytes, or P for petabytes. The size of a data DB area file is determined according to the specified initial allocation size. However, depending on the location of pages during initial allocation, the initial allocation size specified in this option might not be allocated for data DB area files.

    The guidelines for the initial allocation size depend on the type of the data DB area file. Therefore, do not create different types of data DB area files at the same time. The following table shows the guidelines for the initial allocation size according to the types of data DB area file.

    Table 20‒3: Types of data DB area file and guidelines for the initial allocation size

    No.

    Type of data DB area file

    Guidelines for the value of initial allocation size

    1

    Regular file

    The value of initial-allocation-size multiplied by the number-of-files-to-be-created must be less than the value of free-space-in-file-system-in-which-to-allocate-data-DB-area-files. You can specify any value that meets this condition. When you determine the specific value, consider the disk space consumption and the time required for executing the adbinit command.

    2

    Block special file

    Physical volume (normal block special file to which physical blocks are statically allocated)

    If all physical volumes to be allocated have the same size, specify the size of one volume for initial-allocation-size.

    We do not recommend that physical volumes of different sizes are allocated at the same time. If you need to allocate physical volumes of different sizes at the same time, specify the size of the smallest volume.

    3

    Virtual volume (block special file with storage virtualization technology called thin provisioning# applied)

    To use a virtual volume of less than 16 terabytes, specify 0K.

    If a virtual volume might use 16 or more terabytes, specify the size you are planning to use. However, we do not recommend allocation of virtual volumes if the use of 16 or more terabytes is expected. If a size of 16 or more terabytes is specified, a large number of physical blocks are required from the beginning, which lacks the advantage of using lower cost virtual volumes.

    #: For details about thin provisioning, see the manuals of storage products.

    If the data being stored exceeds the initial allocation size of the data DB area file, the HADB server automatically expands the required area (that is, automatic extension of DB area is performed). The maximum value of the area that can be expanded depends on the initial allocation size. For details, see DB area automatic extension in the HADB Setup and Operation Guide.

    Note

    The size of the data DB area file might not be allocated as specified in the -i option. The following describes the reason.

    A data DB area file consists of the following pages:

    • Directory pages

    • Segments (pages for storing table data and indexes)

    When the size of the data DB area file is specified in the -i option, pages are located so that the file fits in the specified size. However, if the size specified in the -i option is reached in the middle of a directory page or segment, the number of pages is adjusted as follows:

    • Consecutive directory pages are always created at the beginning of the data DB area file. Therefore, if a value smaller than the minimum size of the data DB area file (approximately 5.4 megabytes) is specified, the value is rounded up.

    • Pages that make up segments are managed in units of a segment (that is, in units of the number of pages that make up a segment). Therefore, the number of pages are adjusted so that the specified file size is not exceeded in the middle of a segment. For example, if the file size is exceeded in the middle of the eighth segment, the eighth segment is not created (only seven segments are created).

    For details about directory pages and segments in data DB area files, see Existence of directory page groups and locations of directory pages in Page types in Pages in DB area structure (segments and pages) in the HADB Setup and Operation Guide.

  • number-of-files-to-be-created

    ~<integer>((1 to 1,024))<<1>> (count)

    Specifies the number of data DB area files to be created.

    If the -v option is specified, make sure that number-of-files-to-be-created is the same as the number of block special files specified in the -v option.

The initial allocation size, depending on the -i option value, is explained in the following by way of an example.

Example:

adbinitdbarea -n DBAREA01 -i 2G,3

In this example, three data DB area files are to be created in the data DB area named DBAREA01, and two gigabytes of space are to be allocated as the initial allocation size for each data DB area file. The total initial allocation size for DBAREA01 will be six gigabytes.

If the initial allocation size determined by the -i option value exceeds the maximum permissible size, the adbinit command will result in an error and the KFAA96228-E message will be issued. If this happens, change the -i option value according to the information provided in the message.

Important

If a large block special file exceeding the maximum value of automatic extension of the DB area file is allocated, an unusable area is generated in the block special file. As a result, the warning message KFAA96244-W is output when the adbinit command is executed. If you want to use areas in the block special file almost to the capacity limit, take the corrective action described for the KFAA96244-W message.

The maximum value of automatic extension of a DB area file is determined according to the specified initial allocation size. A multiple of 16 terabytes rounded up from the specified initial allocation size will be the maximum value of automatic extension of one DB area file. For example, if the specified initial allocation size is 20 terabytes, the maximum value of automatic extension of the DB area file is 32 terabytes.

Note that there is no way to make an unusable area usable.

To allocate small-capacity and large-capacity block special files to a single DB area, initialize the block special files by specifying a different initial allocation size for each of these files. The following shows an example.

Example: The following two block special files are allocated to DB area AREA1:

  • /dev/mapper/vg_10TB_1 (size: 10 terabytes)

  • /dev/mapper/vg_30TB_1 (size: 30 terabytes)

Procedure

  1. Initialize the database by using the adbinit command. At this time, initialize the /dev/mapper/vg_10TB_1 file with the initialization option specified as follows.

    adbinitdbarea -n AREA1 ... -i 10T -v /dev/mapper/vg_10TB_1

  2. Start the HADB server by using the adbstart command.

  3. Expand DB area AREA1 by using the adbmodarea command. At this time, add the /dev/mapper/vg_30TB_1 file with the DB area addition and modification option specified as follows.

    adbexpandarea -n AREA1 ... -i 30T -v /dev/mapper/vg_30TB_1

When the two block special files are concurrently initialized in step 1 above, a value exceeding 10 terabytes cannot be specified for the initial allocation size. Therefore, the maximum value of automatic extension of the DB area file is 16 terabytes. In this case, the maximum available space in the 30-terabyte block special file is only 16 terabytes, which is the maximum value of automatic extension of the DB area file.

-f data-DB-area-file-storage-directory-name

~<path name>((1 to 70 bytes))

Specifies the subdirectory that stores the data DB area files or a symbolic link to the block special files, expressed as a path name relative to the DB directory. A data DB area file with the DB area name as its name or a symbolic link to a block special file is stored directly under this subdirectory.

If you omit this option, the data DB area file names or the symbolic links to the block special files are stored directly under the DB directory.

The following shows specification examples.

Example:

adbinitdbarea -n DBAREA01 -f DB01/

This example creates a subdirectory named DB01 directly under the DB directory and then creates a data DB area file with file name DBAREA01 or symbolic link to the block special file under that subdirectory.

The following notes apply when you specify this option:

  • There is no need to specify a forward slash (/) at the beginning of a relative path name.

  • Specify a path name that begins with a single-byte alphabetic character, ends with a forward slash (/), and consists of only single-byte alphanumeric characters, the underscore (_), and the hyphen (-). If the path name does not end with a forward slash, a forward slash is added automatically at the end of the path name. The permitted maximum length of a path name is 69 bytes.

  • If the name of the DB area file storage directory includes a lowercase letter, enclose the entire storage directory name in a backslash and double quotation mark (\"). If it is not enclosed in a backslash and double quotation mark, the character string used as the storage directory name will be treated as being in all uppercase letters.

    Example: \"Db02/\"

  • No path under a directory that is created under the DB directory can be specified. For details about the directories that are created under the DB directory, see Table 20‒6: Directories that are created under the DB directory in 20.5.2 Directories that are created.

  • If the specified path contains an intermediate directory with the same name as the DB area name, directory or file creation might fail. For this reason, you must make sure that the directory in which each DB area file is created does not contain any intermediate directory with the same name as the DB area name.

-g output-interval-for-progress-messages-for-DB-area-file-creation-processing

~<integer>((0 to 100))<<0>> (%)

Specify this option when you wish to issue messages that report the progress of data DB area file creation processing.

This option specifies as a percentage the message output interval. For example, if 30 is specified, the command issues the KFAA96232-I message reporting the progress when completion of DB area creation processing reaches 30%, 60%, and 90%.

If you specify 0 or nothing in this option, no progress messages are output.

(3) Model initialization option

A model initialization option is provided ($ADBDIR/sample/conf/adbinit.opt). Use this model when you create initialization options.

If you use the sample application program, you need data DB areas (ADBUTBL01 and ADBUIDX01). This model codes definitions for the data DB areas (specification of adbinitdbarea operands). Therefore, if you use the model, make sure that you do not delete the definitions of the data DB areas.

For details about the sample application program, see Sample Application Program in the HADB Application Development Guide.