Hitachi

Hitachi Advanced Database Command Reference


13.2.1 Explanation of the specification format and options (outputting summary information or usage information)

Organization of this subsection

(1) Specification format

The following indicates the specification format of the adbdbstatus command for outputting summary information or usage information.

For details about the specification format to output information about the need for reorganization of column store tables, see (1) Specification format in 13.2.2 Explanation of the specification format and options (outputting information about the need for reorganization of column store tables).

adbdbstatus
  [-d {summary|used}]
  [-c {dbarea|table|index|archivechunk}]
  [-n {DB-area-name|table-name|index-name}]
  [-t]
  [-k enclosing-character]
  [-s {delimiter|tab}]
  [-S {K|M|G}]
  [-r range-specification]
  [--shared-lock]

(2) Relationships among specified options and output information

When the adbdbstatus command outputs summary information or usage information, the type of information to be output is determined by the combination of the following options:

The table below shows the relationships among the DB status analysis pattern to be executed, the type of information that is output, and the combination of options. For details about the options, see the descriptions of the -d, -c, and -n options in (3) Explanation of options.

Table 13‒1: Relationships among the DB status analysis pattern to be executed, the type of information that is output, and the combination of options

No.

DB status analysis pattern

Type of information that is output

Combination of options

Target of analysis

Information to be analyzed

-d option specification

-c option specification

-n option specification

1

Entire database (all DB areas)

Usage of DB areas

Summary information for DB areas

summary or omitted

dbarea or omitted

--

2

Usage of DB area files and chunks

Usage information for DB areas, tables, and indexes

used

dbarea or omitted

--

3

Specific DB area

Usage of a DB area

Summary information for DB areas

summary or omitted

dbarea or omitted

DB-area-name

4

Usage of DB area's files and chunks

Usage information for DB areas, tables, and indexes

used

dbarea or omitted

DB-area-name

5

All tables

Usage and status of tables

Summary information for tables

summary or omitted

table

--

6

Usage of DB area files in DB areas where tables and chunks are stored

Usage information for DB areas, tables, and indexes

used

table

--

7

Specific table

Usage and status of a table

Summary information for tables

summary or omitted

table

table-name

8

Usage of DB area files in DB areas where tables and chunks are stored

Usage information for DB areas, tables, and indexes

used

table

table-name

9

All indexes

Usage and status of indexes

Summary information for indexes

summary or omitted

index

--

10

Usage of DB area files in DB areas where indexes and chunks are stored

Usage information for DB areas, tables, and indexes

used

index

--

11

Specific index

Usage and status of an index

Summary information for indexes

summary or omitted

index

index-name

12

Usage of DB area files in DB areas where indexes and chunks are stored

Usage information for DB areas, tables, and indexes

used

index

index-name

13

Archived chunk created in a specific table

Usage and status of chunks created in a multi-chunk table

Summary information of archived chunks

summary or omitted

archivechunk

table-name

14

Usage information of each archive file corresponding to an archived chunk

Usage information of archived chunks

used

archivechunk

table-name

Legend:

--: The -n option is omitted.

(3) Explanation of options

The following describes the options of the adbdbstatus command used to output summary information or usage information. For details about the options used to output information about the need for reorganization of column store tables, see (2) Explanation of options in 13.2.2 Explanation of the specification format and options (outputting information about the need for reorganization of column store tables).

-d {summary|used}

Specifies the type of output results:

summary: Summary information

For details about the items that are displayed as the summary information, see the following:

used: Usage information

For details about the items that are output as the usage information, see the following:

• -c {dbarea|table|index|archivechunk}

Specifies the range of information to be collected by the adbdbstatus command:

dbarea: DB area information

Information about DB areas is to be collected.

table: Table information

Information about tables is to be collected.

index: Index information

Information about indexes is to be collected.

archivechunk: Archived chunks created in a table

Information about archived chunks created in a table is to be collected.

If archivechunk is specified, the table name of the archivable multi-chunk table must be specified in the -n option.

-n {DB-area-name|table-name|index-name}

~<character string>

Specifies the name of a DB area, table, or index when you want to collect information about a specific DB area, table, or index.

DB-area-name

Specifies the name of a DB area.

This option can be specified when either the -c option is omitted or dbarea is specified in the -c option. The work table DB area name (ADBWRK) and the master directory DB area name (ADBMST) cannot be specified.

table-name

Specifies a table name in the format schema-name.table-identifier. The schema name cannot be omitted. Specifying a viewed table results in an error.

This option can be specified when table is specified in the -c option.

In addition, if archivechunk is specified in the -c option, the table name of the archivable multi-chunk table must be specified.

To specify the table name of a dictionary table (base table) or system table (base table), specify HADB as the schema name.

For details about the specification rules that apply when a schema name or table identifier includes any lowercase letter or backslash (\), see 1.4.3 Table name specification rules.

index-name

Specifies an index name in the format schema-name.index-identifier. The schema name cannot be omitted.

This option can be specified when index is specified in the -c option.

To collect information about the B-tree index corresponding to the primary key, you must specify the index identifier (same as the constraint name) that was generated automatically. For details about how to check the index identifier of the B-tree index corresponding to the primary key, see Searching a dictionary table in the HADB Setup and Operation Guide.

To specify an index defined in a dictionary table (base table) and system table (base table), specify HADB as the schema name.

The following rules apply to specification of DB area names and index names:

  • The specified character string is treated as being in all uppercase letters.

  • If the character string to be specified as the name includes a lowercase letter, enclose the entire name in double quotation marks ("), and then enclose it in single quotation marks ('). If the name is not enclosed in double quotation marks (") and then within single quotation marks ('), it is treated as being in all uppercase letters.

    Example: -n '"ADBuser01"'.'"Index01"'

For details about the naming rules for DB areas, tables, and indexes, see Specifying names in SQL writing conventions in SQL Basics in the manual HADB SQL Reference.

-t

Specifies that title lines (column headers) are not to be output.

-k enclosing-character

~<character string>((1 byte))<<">>

Specifies an enclosing character to be used for the character strings in CSV format. If this option is omitted, the double quotation mark (") is assumed to be the enclosing character.

A single-byte character must be specified as the enclosing character (a character string consisting of two or more bytes cannot be specified). None of the following characters can be specified as the enclosing character:

  • Space, tab, or asterisk (*)

  • The character that is used as the delimiter (the value of or default value for the -s option)

Important
-s {delimiter|tab}

~<character string>((1 byte))<<,>>

Specifies the delimiter used in CSV format. To specify the tab character as the delimiter, specify tab. If this option is omitted, the comma (,) is assumed to be the delimiter.

Only tab or a single-byte character can be specified as the delimiter (except for tab, a character string consisting of two or more bytes cannot be specified). None of the following characters can be specified as the delimiter:

  • Uppercase letters (A to Z), lowercase letters (a to z), numeric characters (0 to 9), underscore (_), double quotation mark ("), or asterisk (*)

  • The character that is used as the enclosing character (the value of or default value for the -k option)

Important
-S {K|M|G}

Specifies that the output items for usage amounts are to be displayed in kilobytes, megabytes, or gigabytes, rather than in segments or pages.

When this option is omitted, the output items for usage amounts are displayed in segments or pages.

K: Kilobytes

Specifies that the output items for usage amounts are to be displayed in kilobytes.

M: Megabytes

Specifies that the output items for usage amounts are to be displayed in megabytes.

G: Gigabytes

Specifies that the output items for usage amounts are to be displayed in gigabytes.

When this option is specified, the column titles for the corresponding output items are also changed to match the units specified for the display information. The following table shows the relationships among the value of this option, the display units for output items, and the column titles.

Table 13‒2: Display units and column titles for usage amount output items

No.

Information type

Output item

Value of this option

Display units for output items

Column title

1

Summary information for DB areas

Number of segments in use in the DB area

--

Segments

Used_segments

2

K

Kilobytes

KB_Used_segments

3

M

Megabytes

MB_Used_segments

4

G

Gigabytes

GB_Used_segments

5

Total number of segments in the DB area

--

Segments

Total_segments

6

K

Kilobytes

KB_Total_segments

7

M

Megabytes

MB_Total_segments

8

G

Gigabytes

GB_Total_segments

9

Summary information for tables

Number of segments in use by the table

--

Segments

Used_segments

10

K

Kilobytes

KB_Used_segments

11

M

Megabytes

MB_Used_segments

12

G

Gigabytes

GB_Used_segments

13

Number of pages in use by the table

--

Pages

Used_pages

14

K

Kilobytes

KB_Used_pages

15

M

Megabytes

MB_Used_pages

16

G

Gigabytes

GB_Used_pages

17

Summary information for indexes

Number of segments in use by the index

--

Segments

Used_segments

18

K

Kilobytes

KB_Used_segments

19

M

Megabytes

MB_Used_segments

20

G

Gigabytes

GB_Used_segments

21

Number of pages in use by the index

--

Pages

Used_pages

22

K

Kilobytes

KB_Used_pages

23

M

Megabytes

MB_Used_pages

24

G

Gigabytes

GB_Used_pages

25

Usage information for DB areas, tables, and indexes

Number of segments in use

--

Segments

Used_segments

26

K

Kilobytes

KB_Used_segments

27

M

Megabytes

MB_Used_segments

28

G

Gigabytes

GB_Used_segments

29

Number of pages in use

--

Pages

Used_pages

30

K

Kilobytes

KB_Used_pages

31

M

Megabytes

MB_Used_pages

32

G

Gigabytes

GB_Used_pages

33

Total number of segments in the DB area file

--

Segments

Total_segments

34

K

Kilobytes

KB_Total_segments

35

M

Megabytes

MB_Total_segments

36

G

Gigabytes

GB_Total_segments

37

Number of initialized pages in the DB area file

--

Pages

Initialized_pages

38

K

Kilobytes

KB_Initialized_pages

39

M

Megabytes

MB_Initialized_pages

40

G

Gigabytes

GB_Initialized_pages

Legend:

--: This option is omitted.

-r range-specification

If you want to output information about archived chunks, specify the range of chunks whose information you want to output. For details about the -r option, see (4) Explanation of the -r option (range specification).

--shared-lock

Specifies that the lock of the adbdbstatus command is to be changed. Specify this option if you want to execute the adbdbstatus command concurrently with the following commands and SQL statements:

  • adbimport command (when background import is performed)

  • adbmergechunk command

  • Update SQL statements (INSERT statement, DELETE statement, and UPDATE statement)

For details about the lock when the --shared-lock option is specified, see Locked resources that are reserved and their lock modes in the HADB Setup and Operation Guide.

If the adbdbstatus command with the --shared-lock option specified is executed, some output items cannot be acquired. Also, if the adbdbstatus command with the --shared-lock option specified is executed concurrently with a transaction that updates the database, values of some output items might be inconsistent. For details, see the following.

Important

For details about the output items when the --shared-lock option is specified, see 13.4.2 List of items that are output as summary information for tables, 13.5.2 List of items that are output as summary information for indexes, and 13.7.2 List of items that are output as usage information for DB areas, tables, and indexes.

■ Output items that cannot be acquired if the --shared-lock option is specified

If the --shared-lock option is specified, the following output items cannot be acquired. In this case, no_check is always displayed.

  • Summary information for tables

    Whether the table is non-updatable (Non-updatable), and command termination status (Command_status)

  • Summary information for indexes

    Uniqueness constraint violation (Unique_constraint_violated), and whether the index is in unfinished status (Unfinished)

In addition, if the --shared-lock option is specified, information about deletion-pending chunks corresponding to the following tables or indexes is not output:

  • System table (base table)

  • Index defined for a system table (base table)

  • Table for which the adbmergechunk command is being executed

  • Index defined for a table for which the adbmergechunk command is being executed

■ Restrictions on output items when the --shared-lock option is specified

The adbdbstatus command with the --shared-lock option specified can be executed for a table for which one of the following commands was executed. In this case, the latest value might not be displayed for items relating to the number of segments, pages, or chunks. (The values that existed when the relevant command started might be displayed.) Therefore, a displayed value might be inconsistent with the values of other output items.

  • adbimport command (when background import is performed)

  • adbidxrebuild command (executed with the --create-temp-file option specified after background import is canceled)

  • adbmergechunk command

  • adbreorgsystemdata command

Note that if the --shared-lock option is specified when the following information is to be output, the adbdbstatus command causes an error:

  • Summary information for DB areas

    If summary is specified for the -d option (or the -d option is omitted) and dbarea is specified for the -c option (or the -c option is omitted)

  • Summary information of archived chunks

    If summary is specified for the -d option (or the -d option is omitted) and archivechunk is specified for the -c option

  • Usage information of archived chunks

    If used is specified for the -d option and archivechunk is specified for the -c option

(4) Explanation of the -r option (range specification)

When you want to output information about archived chunks, use the -r option to specify the range of chunks whose information is to be output. If the specified range contains any part of the range of values in the archive range column (the column used to narrow down the search range when searching the archivable multi-chunk table), the corresponding chunks' information is output. If the corresponding chunk does not exist, no information is output.

The range specification is interpreted based on the data type in the archive range column.

The following table lists the types of range specifications and links to their detailed explanations.

Table 13‒3: Types of range specifications and their links

No.

Type of range specification

Link

1

Date range specification

(a) Specifying ranges of dates

2

Time range specification

(b) Specifying ranges of times

3

Time stamp range specification

(c) Specifying ranges of time stamps

4

Fixed-length character string range specification

(d) Specifying ranges of fixed-length character strings

5

Decimal range specification

(e) Specifying ranges of decimal numbers

6

Integer range specification

(f) Specifying ranges of integers

7

Floating point range specification

(g) Specifying ranges of floating point numbers

This section shows which chunks' information is to be output, using the following conditions as an example:

Figure 13‒2: Relationship between the content of the date range specification and the chunks whose information is to be output

[Figure]

The rules for specifying the -r option are as follows:

(a) Specifying ranges of dates

Specify a range of dates for the chunks whose information you want to output.

Format
-r {YYYY-MM-DD|YYYY/MM/DD}-{YYYY-MM-DD|YYYY/MM/DD}

Connect the minimum value (date specification) and maximum value (date specification) by using a hyphen (-). There must be no spaces between the minimum value and the hyphen (-), or between the maximum value and the hyphen (-).

Explanation

YYYY: Year (0001-9999)

MM: Month (01-12)

DD: Day (01 to the last day of the month specified in MM)

Specification example

Specification example 1: -r 2016/01/01-2016/12/31

Specification example 2: -r 2016-01-01-2016-12-31

Specify each date in either of the following formats: YYYY-MM-DD or YYYY/MM/DD (delimit YYYY, MM, and DD using forward slashes (/) or hyphens (-)).

In the case of specification example 1, 2016/01/01 and 2016/12/31 are treated as date specifications.

In the case of specification example 2, 2016-01-01 and 2016-12-31 are treated as date specifications.

The rules for specifying ranges of dates are as follows:

  • If there are not enough digits in the values you want to specify in YYYY, MM, or DD, pad the left side of the value with zeros (0).

  • The data types in the archive range column for which you can specify a date range are as follows:

    • DATE

    • TIMESTAMP

  • Only dates can be specified in a date range specification. If the data type in the archive range column is TIMESTAMP, specified values are treated as if the time has been omitted. Therefore, the start time and end time in a specified value are corrected as shown in the following table. As a result, all chunks containing data in the specified date range are subject to information output.

    Table 13‒4: Correction of the start time and end time

    No.

    Number of digits in the fractional seconds defined in the TIMESTAMP-type column

    Start time

    End time

    1

    0

    0 hours 0 minutes 0 seconds

    23 hours 59 minutes 59 seconds

    2

    3

    0 hours 0 minutes 0.000 seconds

    23 hours 59 minutes 59.999 seconds

    3

    6

    0 hours 0 minutes 0.000000 seconds

    23 hours 59 minutes 59.999999 seconds

    4

    9

    0 hours 0 minutes 0.000000000 seconds

    23 hours 59 minutes 59.999999999 seconds

    5

    12

    0 hours 0 minutes 0.000000000000 seconds

    23 hours 59 minutes 59.999999999999 seconds

  • The following table lists the message IDs that are displayed when the specified date range is invalid, and describes possible errors. If any of these errors occurs, correct the error, and then execute the adbdbstatus command.

    Table 13‒5: Message IDs that are displayed when the specified date range is invalid, and possible errors

    No.

    Message ID that is displayed

    Possible error

    Example of invalid specification

    Example of corrected specification

    1

    KFAA50225-E

    • Too many digits in the date

    • Not enough digits in the date

    -r 2015/7/1-2015/008/031

    -r 2015/07/01-2015/08/31

    2

    A date outside the range is specified.

    -r 2015/01/01-2015/06/31

    -r 2015/01/01-2015/06/30

    3

    • KFAA90002-E

    • KFAA96720-I

    The range specification format is invalid.

    Specification example

    -r 2015/01/11∆-∆2015/7/31

    Explanation

    Because there is a space between the date specification and the hyphen (-), the shell erroneously uses spaces to delimit the option arguments.

    -r 2015/01/11-2015/07/31

    Legend:

    ∆: Space

(b) Specifying ranges of times

Specify a range of times for the chunks whose information you want to output.

Format
-r hh:mm:ss[.[nn...n]]-hh:mm:ss[.[nn...n]]

Connect the minimum value (time specification) and maximum value (time specification) by using a hyphen (-). There must be no spaces between the minimum value and the hyphen (-), or between the maximum value and the hyphen (-).

Explanation

hh:: Hours (00-23)

mm: Minutes (00-59)

ss: Seconds (00-59)

.: Decimal point

nn...n: Fractional seconds (n is 0-9)

Specification example

Specification example 1: -r 00:00:00-12:59:59

Specification example 2: -r 00:00:00.000-12:59:59.999

The hh, mm, and ss values of each time are delimited by using colons (:).

When specifying fractional seconds, connect the ss and nn...n values by using a decimal point (.).

In the case of specification example 1, 00:00:00 and 12:59:59 are treated as time specifications.

In the case of specification example 2, 00:00:00.000 and 12:59:59.999 are treated as time specifications.

The rules for specifying ranges of times are as follows:

  • If there are not enough digits in the values you want to specify in hh, mm, or ss, pad the left side of the value with zeros (0).

  • The data type in the archive range column for which you can specify a time range is as follows:

    • TIME

  • If the fractional seconds have more digits than the fractional seconds defined in the TIME-type column, the excess digits are truncated.

  • If fractional seconds are omitted, the start time and end time are corrected to reflect the number of digits in the fractional seconds defined in the TIME-type column. The following table lists details about how this correction is made.

    Table 13‒6: Correction of the start time and end time when fractional seconds are omitted

    No.

    Number of digits in the fractional seconds defined in the TIME-type column

    Start time

    End time

    1

    3

    .000 seconds

    .999 seconds

    2

    6

    .000000 seconds

    .999999 seconds

    3

    9

    .000000000 seconds

    .999999999 seconds

    4

    12

    .000000000000 seconds

    .999999999999 seconds

  • For details about comparing the minimum and maximum values for time specifications, see Comparing datetime data in Data types that can be compared in Data types that can be converted, assigned, and compared in the manual HADB SQL Reference.

  • The following table lists the message IDs that are displayed when the specified time range is invalid, and describes possible errors. If any of these errors occurs, correct the error, and then execute the adbdbstatus command.

    Table 13‒7: Message IDs that are displayed when the specified time range is invalid, and possible errors

    No.

    Message ID that is displayed

    Possible error

    Example of invalid specification

    Example of corrected specification

    1

    KFAA50225-E

    • Too many digits in the time

    • Not enough digits in the time

    -r 0:0:0-012:59:59

    -r 00:00:00-12:59:59

    2

    A time outside the range is specified.

    -r 00:00:00-12:60:00

    -r 00:00:00-12:59:59

    3

    • KFAA90002-E

    • KFAA96720-I

    The range specification format is invalid.

    Specification example

    -r 00:00:00-12:59:59

    Explanation

    Because there is a space between the time specification and the hyphen (-), the shell erroneously uses spaces to delimit the option arguments.

    -r 00:00:00-12:59:59

    Legend:

    ∆: Space

(c) Specifying ranges of time stamps

Specify a range of time stamps for the chunks whose information you want to output.

Format
-r '{YYYY-MM-DD|YYYY/MM/DD}∆hh:mm:ss[.[nn...n]]'
    -'{YYYY-MM-DD|YYYY/MM/DD}∆hh:mm:ss[.[nn...n]]'

Connect the minimum value (time stamp specification) and maximum value (time stamp specification) by using a hyphen (-). There must be no spaces between the minimum value and the hyphen (-), or between the maximum value and the hyphen (-).

Explanation

YYYY: Year (0001-9999)

MM: Month (01-12)

DD: Day (01 to the last day of the month specified in MM)

∆: Halfwidth space or tab

hh:: Hours (00-23)

mm: Minutes (00-59)

ss: Seconds (00-59)

.: Decimal point

nn...n: Fractional seconds (n is 0-9)

Specification example

Specification example 1: -r '2016/01/01 00:00:00'-'2016/12/31 12:59:59'

Specification example 2: -r '2016/01/01 00:00:00.000'-'2016/12/31 12:59:59.999'

Connect the date and time of each specified time stamp by using a halfwidth space, and enclose entire date or time values in single quotation marks ('). When specifying dates, use either of the following formats: YYYY-MM-DD or YYYY/MM/DD (delimit YYYY, MM, and DD using forward slashes (/) or hyphens (-)). When specifying times, delimit the hh, mm, and ss values by using colons (:). When specifying fractional seconds, connect the ss and nn...n values by using a decimal point (.).

In the case of specification example 1, 2016/01/01 00:00:00 and 2016/12/31 12:59:59 are treated as time stamp specifications.

In the case of specification example 2, 2016/01/01 00:00:00.000 and 2016/12/31 12:59:59.999 are treated as time stamp specifications.

The rules for specifying ranges of time stamps are as follows:

  • If there are not enough digits in the values you want to specify in YYYY, MM, DD, hh, mm, or ss, pad the left side of the value with zeros (0).

  • The data type in the archive range column for which you can specify a time stamp range is as follows:

    • TIMESTAMP

  • If the fractional seconds have more digits than the fractional seconds defined in the TIMESTAMP-type column, the excess digits are truncated.

  • If fractional seconds are omitted, the start time and end time are corrected to reflect the number of digits in the fractional seconds defined in the TIMESTAMP-type column. The following table lists details about how this correction is made.

    Table 13‒8: Correction of the start time and end time when fractional seconds are omitted

    No.

    Number of digits in the fractional seconds defined in the TIMESTAMP-type column

    Start time

    End time

    1

    3

    .000 seconds

    .999 seconds

    2

    6

    .000000 seconds

    .999999 seconds

    3

    9

    .000000000 seconds

    .999999999 seconds

    4

    12

    .000000000000 seconds

    .999999999999 seconds

  • For details about comparing the minimum and maximum values for time stamp specifications, see Comparing datetime data in Data types that can be compared in Data types that can be converted, assigned, and compared in the manual HADB SQL Reference.

  • The following table lists the message IDs that are displayed when the specified time stamp range is invalid, and describes possible errors. If any of these errors occurs, correct the error, and then execute the adbdbstatus command.

    Table 13‒9: Message IDs that are displayed when the specified time stamp range is invalid, and possible errors

    No.

    Message ID that is displayed

    Possible error

    Example of invalid specification

    Example of corrected specification

    1

    KFAA50225-E

    • Too many digits in the time stamp

    • Not enough digits in the time stamp

    -r '2015/7/100:00:00'-'2015/008/03112:59:59'

    -r '2015/07/0100:00:00'-'2015/08/3112:59:59'

    2

    A time stamp outside the range is specified.

    -r '2015/01/0100:00:00'-'2015/06/3112:60:00'

    -r '2015/01/0100:00:00'-'2015/06/3012:59:59'

    3

    • KFAA90002-E

    • KFAA96720-I

    The range specification format is invalid.

    Specification example

    -r '2016/04/0100:00:00'-'2016/06/3012:59:59'

    Explanation

    Because there is a space between the time stamp specification and the hyphen (-), the shell erroneously uses spaces to delimit the option arguments.

    -r '2016/04/0100:00:00'-'2016/06/3012:59:59'

    4

    Specification example

    -r 2016/04/0100:00:00-2016/06/3012:59:59

    Explanation

    Because the time stamp specification is not enclosed in single quotation marks ('), the shell sees the space between the date and time values, and erroneously uses spaces to delimit the option arguments.

    Legend:

    ∆: Space

(d) Specifying ranges of fixed-length character strings

Specify a range of fixed-length character strings for the chunks whose information you want to output.

Format
-r a...a-a...a

Connect the minimum value (fixed-length character string specification) and maximum value (fixed-length character string specification) by using a hyphen (-). There must be no spaces between the minimum value and the hyphen (-), or between the maximum value and the hyphen (-).

Explanation

a...a: String of one or more characters

Specification example

-r 20160101-20161231

20160101 and 20161231 are treated as fixed-length character string specifications.

The rules for specifying ranges of fixed-length character strings are as follows:

  • Specify a fixed-length character string of one or more characters.

  • Fixed-length character string specifications are case sensitive.

  • The data type in the archive range column for which you can specify a fixed-length character string range is as follows:

    • CHARACTER

  • If the fixed-length character string includes a character that has a special meaning in the OS or shell, such as a double quotation mark (") or vertical bar (|), specify the escape character (\) immediately before that character. Alternatively, enclose the entire fixed-length character string in single quotation marks (').

    Specification example

    Specification example 1: -r a\|c-def

    Specification example 2: -r 'a|c'-def

    In both examples, a|c and def are treated as fixed-length character string specifications.

  • If a character string is enclosed in double quotation marks (") and then the entire string is enclosed in single quotation marks ('), both the character string and the double quotation marks (") are treated as a fixed-length character string.

    Specification example

    -r '"abc"'-def

    "abc" and def are treated as fixed-length character string specifications.

  • If you specify a fixed-length character string that includes any hyphens (-), enclose the entire fixed-length character string in single quotation marks ('). This is to differentiate hyphens (-) in the specification from hyphens used to separate the minimum and maximum values.

    Specification example

    • When enclosing a specification in \' (backslashes and single quotation marks)

      -r \'a-c\'-def

    • When first enclosing a specification in single quotation marks ('), and then enclosing the entire string in double quotation marks (")

      -r "'a-c'"-def

    In both examples, a-c and def are treated as fixed-length character string specifications.

    In addition, even if a specified fixed-length character string does not include any hyphens (-), if you enclose the specification in single quotation marks ('), the enclosed value is treated as the fixed-length character string specification, with the single quotation marks (') omitted.

    Specification example

    • When enclosing a specification in \' (backslashes and single quotation marks)

      -r \'abc\'-def

      abc and def are treated as fixed-length character string specifications.

  • If a specified fixed-length character string includes any single quotation marks ('), specify two single quotation marks (') in succession to express one single quotation mark (').

    Specification example

    • When specifying two \' (backslashes and single quotation marks)

      -r a\'\'c-def

    • When enclosing a specification that includes a single quotation mark ('), in double quotation marks (")

      -r "a''c"-def

    In both examples, a'c and def are treated as fixed-length character string specifications.

  • For details about comparing the minimum and maximum values for fixed-length character string specifications, see Comparing character string data in Data types that can be compared in Data types that can be converted, assigned, and compared in the manual HADB SQL Reference.

  • The following table lists the message IDs that are displayed when the specified fixed-length character string range is invalid, and describes possible errors. If any of these errors occurs, correct the error, and then execute the adbdbstatus command.

    Table 13‒10: Message IDs that are displayed when the specified fixed-length character string range is invalid, and possible errors

    No.

    Message ID that is displayed

    Possible error

    Example of invalid specification

    Example of corrected specification

    1

    KFAA50225-E

    The fixed-length character string specification includes multiple hyphens (-) that are used to separate the minimum and maximum values.

    -r a-c-def

    -r 'a-c-def'

    -r \'a-c\'-def

    2

    • KFAA90002-E

    • KFAA96720-I

    The range specification format is invalid.

    Specification example

    -r abc-def

    Explanation

    Because there is a space between the fixed-length character string specification and the hyphen (-), the shell erroneously uses spaces to delimit the option arguments.

    -r abc-def

    Legend:

    ∆: Space

(e) Specifying ranges of decimal numbers

Specify a range of decimal numbers for the chunks whose information you want to output.

Format
-r [{+|-}]{a...a[.[b...b]]|.b...b}
    -[{+|-}]{a...a[.[b...b]]|.b...b}

Connect the minimum value (decimal specification) and maximum value (decimal specification) by using a hyphen (-). There must be no spaces between the minimum value and the hyphen (-), or between the maximum value and the hyphen (-).

Explanation

+, -: Signs (the "+" sign can be omitted)

a...a: Integer part (a is 0-9)

.: Decimal point

b...b: Fractional part (b is 0-9)

Specification examples in the case of DECIMAL(5,2)

Specification example 1: -r -100-100

Specification example 2: -r -100.00-+100.00

-100.00 and +100.00 are treated as decimal specifications.

The rules for specifying ranges of decimal numbers are as follows:

  • Either the integer part or the fractional part must be specified. If there is no fractional part, the decimal point can be omitted.

  • The data type in the archive range column for which you can specify a decimal range is as follows:

    • DECIMAL

  • If the fractional parts have more digits than the fractional parts defined in the DECIMAL-type column, the excess digits are truncated.

  • The following table lists the message IDs that are displayed when the specified decimal range is invalid, and describes possible errors. If any of these errors occurs, correct the error, and then execute the adbdbstatus command.

    Table 13‒11: Message IDs that are displayed when the specified decimal range is invalid, and possible errors

    No.

    Message ID that is displayed

    Possible error

    Example of invalid specification

    Example of corrected specification

    1

    KFAA50225-E

    A numerical value has been specified that cannot be used with the data type in the archive range column.

    Specification example

    -r 0-123456789012345678901234567890123456789

    Explanation

    A decimal specification contains 39 digits.

    Specification example

    -r 0-12345678901234567890123456789012345678

    Explanation

    Specify a decimal using 38 digits.

    2

    • KFAA90002-E

    • KFAA96720-I

    The range specification format is invalid.

    Specification example

    -r 0-1

    Explanation

    Because there is a space between the decimal specification and the hyphen (-), the shell erroneously uses spaces to delimit the option arguments.

    -r 0-1

    Legend:

    ∆: Space

(f) Specifying ranges of integers

Specify a range of integers for the chunks whose information you want to output.

Format
-r [{+|-}]a...a-[{+|-}]a...a

Connect the minimum value (integer specification) and maximum value (integer specification) by using a hyphen (-). There must be no spaces between the minimum value and the hyphen (-), or between the maximum value and the hyphen (-).

Explanation

+, -: Signs (the "+" sign can be omitted)

a...a: Numerical value (a is 0-9)

Specification example

Specification example 1: -r -100-100

Specification example 2: -r -100-+100

-100 and +100 are treated as integer specifications.

The rules for specifying ranges of integers are as follows:

  • The data types in the archive range column for which you can specify an integer range are as follows:

    • INTEGER

    • SMALLINT

  • The following table lists the message IDs that are displayed when the specified integer range is invalid, and describes possible errors. If any of these errors occurs, correct the error, and then execute the adbdbstatus command.

    Table 13‒12: Message IDs that are displayed when the specified integer range is invalid, and possible errors

    No.

    Message ID that is displayed

    Possible error

    Example of invalid specification

    Example of corrected specification

    1

    KFAA50225-E

    A numerical value has been specified that cannot be used with the data type in the archive range column.

    In the case of INTEGER

    -r 0-9223372036854775808

    In the case of SMALLINT

    -r 0-2147483648

    In the case of INTEGER

    -r 0-9223372036854775807

    In the case of SMALLINT

    -r 0-2147483647

    2

    • KFAA90002-E

    • KFAA96720-I

    The range specification format is invalid.

    Specification example

    -r 0-1

    Explanation

    Because there is a space between the integer specification and the hyphen (-), the shell erroneously uses spaces to delimit the option arguments.

    -r 0-1

    Legend:

    ∆: Space

(g) Specifying ranges of floating point numbers

Specify a range of floating point numbers for the chunks whose information you want to output.

Format
-r [{+|-}]{a...a[.[b...b]]|.b...b}[{E|e}[{+|-}]c...c]
    - [{+|-}]{a...a[.[b...b]]|.b...b}[{E|e}[{+|-}]c...c]

Connect the minimum value (floating point specification) and maximum value (floating point specification) by using a hyphen (-). There must be no spaces between the minimum value and the hyphen (-), or between the maximum value and the hyphen (-).

Explanation

+, -: Signs (the "+" sign can be omitted)

a...a: Integer part of the mantissa (a is 0-9)

.: Decimal point

b...b: Fractional part of the mantissa (b is 0-9)

E, e: Floating-point numeric literal

c...c: Exponent (c is 0-9)

Figure 13‒3: Example of specifying a floating point range by using the -r option

[Figure]

In the case of specification example 1, -100 and 100 are treated as floating point specifications.

In the case of specification example 2, -1.0E2 and +1.0E2 are treated as floating point specifications.

In the case of specification example 3, -100 and 1.0E+2 are treated as floating point specifications.

The rules for specifying ranges of floating point numbers are as follows:

  • The data type in the archive range column for which you can specify a floating point range is as follows:

    • DOUBLE PRECISION

  • The following table lists the message IDs that are displayed when the specified floating point range is invalid, and describes possible errors. If any of these errors occurs, correct the error, and then execute the adbdbstatus command.

    Table 13‒13: Message IDs that are displayed when the specified floating point range is invalid, and possible errors

    No.

    Message ID that is displayed

    Possible error

    Example of invalid specification

    Example of corrected specification

    1

    KFAA50225-E

    The number of specifiable characters is exceeded.

    Specification example

    -r 0-123...(omitted)...789

    Explanation

    A floating point specification contains 510 characters.

    Specification example

    -r 0-123...(omitted)...78

    Explanation

    Specify a floating point specification using 509 characters.

    2

    • KFAA90002-E

    • KFAA96720-I

    The range specification format is invalid.

    Specification example

    -r 0-1

    Explanation

    Because there is a space between the floating point specification and the hyphen (-), the shell erroneously uses spaces to delimit the option arguments.

    -r 0-1

    Legend:

    ∆: Space