Hitachi

Hitachi Advanced Database Command Reference


43.2.1 Explanation of the specification format and options

Organization of this subsection

(1) Specification format

adbunarchivechunk
  -u authorization-identifier
  [-p password]
  [-g output-interval-for-chunk-archive-processing-progress-messages]
  [-w {name-of-storage-directory-for-temporary-work-files
        |directory-path-file-name-used-to-specify-storage-destination-for-temporary-work-files}]
  [-z unarchive-chunk-option-file-name]
  [-t]
  {-c chunk-ID-specification[,chunk-ID-specification]...|-r range-specification}
  [--force]
  table-to-be-processed
Important

You must specify the table to be processed as the last option that is specified.

(2) Explanation of options

-u authorization-identifier

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

Specifies the authorization identifier of the HADB user who executes the adbunarchivechunk command.

To execute the adbunarchivechunk command, the user must have the following two privileges:

  • CONNECT privilege

  • UNARCHIVE CHUNK privilege for the table to be processed

For this option, specify an authorization identifier in the range from 1 to 100 bytes. Note that the byte count (1 to 100 bytes) does not include the double quotation marks used to enclose the authorization identifier.

Important

If the character string used as the authorization identifier includes any lowercase letter or a backslash (\), make sure that you check the rules for specifying authorization identifiers. For the rules for specifying authorization identifiers, see 1.4.2 Rules for specifying authorization identifiers and passwords.

-p password

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

Specifies the password for the authorization identifier that was specified in the -u option.

Important

If the password includes a character that has a special meaning in the OS or shell, such as a double quotation mark (") or vertical bar (|), make sure that you check the rules for specifying passwords. For the rules for specifying passwords, see 1.4.2 Rules for specifying authorization identifiers and passwords.

If the adbunarchivechunk command is executed with this option omitted, a message prompting the user to enter a password is displayed. In an environment in which a password cannot be entered from the standard input, such as when the command is executed in the background, make sure that you do not omit this option.

-g output-interval-for-chunk-unarchive-processing-progress-messages

~<integer>((0 to 1,000,000,000))<<0>>(in 1,000 rows)

Specifies the interval at which to output progress messages for chunk unarchive processing.

For example, if 2 is specified in this option, the KFAA80205-I progress message is output each time 2,000 rows of chunk are unarchived.

Furthermore, when chunk unarchive processing is performed on multiple chunks, progress messages are output for each chunk. For example, if 2 is specified in this option, and three chunks are undergoing chunk unarchive processing, the KFAA80205-I progress message is output each time 2,000 rows of data are unarchived for each of the three chunks. You can tell from the progress message which chunk's processing it refers to.

If this option is omitted or 0 is specified in this option, no progress message is output.

-w {temporary-work-file-storage-directory-name|name-of-directory-path-file-specifying-temporary-work-file-storage-locations}

~<OS path name>((2 to 518 bytes))

Specifies a storage location for the temporary work files that are created during chunk unarchive processing, expressed as either of the following:

  1. Absolute path name of the storage directory for temporary work files

  2. Absolute path name of the file (directory path file) that specifies storage directories for temporary work files

If frequent input/output operations are performed on the temporary work files stored under a single directory, performance might be adversely affected. We recommend that you use method 2 and store temporary work files in directories on multiple disks to distribute the workload of input/output operations on the disk. The following shows an example specification using method 2 (specifying a directory path file).

Example of directory path file

/mnt/diska/wwwww
/mnt/diskb/xxxxx
/mnt/diskc/yyyyy
/mnt/diskd/zzzzz

The following is a guideline for the number of directories to be specified:

Guideline-for-number-of-directories-to-be-specified = A × B

A: Number of data storage threads

Use the following formula to determine the value:

Value of the unarchive chunk option adb_unarcv_rthd_num -1

B: Number of B-tree and text indexes that are defined for the target table of chunk unarchiving

If you do not know the number of B-tree and text indexes, check the number of B-tree and text indexes that are defined for the table by using the following SQL statement:

SELECT "N_INDEX"-"N_RANGE_INDEX"
    FROM "MASTER"."SQL_TABLES"
        WHERE "TABLE_SCHEMA"='authorization-identifier'
           AND "TABLE_NAME"='name-of-table-to-be-processed'
  • A maximum of 255 directories can be specified in a directory path file.

  • The directories specified in the directory path file are used to store temporary work files, in the order in which they are written in the file. When the last directory specified in the directory path file is used (in this example, /mnt/diskd/zzzzz), the first directory (in this example, /mnt/diska/wwwww) is then used again.

The following specification rule applies to this option (for both methods 1 and 2):

  • Do not specify a forward slash (/) at the end of a path name.

For details about how to estimate the sizes of the temporary work files that will be created under the directories specified in the -w option, see Estimating the size of the temporary work file for executing the adbunarchivechunk command in Estimating the size of the temporary work file for executing a command in Preparing Resources in the HADB Setup and Operation Guide. If this option is omitted, temporary work files are created under $DBDIR/ADBWORK.

It is advisable to provide a dedicated directory to store temporary work files. If a directory storing other files is used for temporary work files, data in the existing files might be corrupted. Also make sure that symbolic links and relative paths are specified correctly. For details about the files whose names must differ from the temporary work file storage directory name, see 43.6 Notes.

If the disk that stores temporary work files runs out of free space, specify another disk with a larger capacity as the storage location. For details about the actions to take if the disk that stores temporary work files runs out of free space, see Steps to take in the event of a shortage of disk space for storing temporary work files during command execution in Command-related problems in Troubleshooting in the HADB Setup and Operation Guide.

-z unarchive-chunk-option-file-name

~<OS path name>((2 to 510 bytes))

Specifies the absolute path name of the unarchive chunk option file that contains the unarchive chunk options. If this option is omitted, all unarchive chunk options are assumed to be their default values because no unarchive chunk option file is specified.

For details about the unarchive chunk options, see 43.2.2 Format of unarchive chunk options.

Make sure that the unarchive chunk option file name is unique, and not already taken by another file. If the unarchive option file has the same name as another file, data in the file might be lost. For details about the files whose names must differ from the unarchive chunk option file name, see 43.6 Notes.

-t

Specify this option if you want to check the chunks to be unarchived before actually executing chunk unarchive processing.

If you specify this option, the chunk IDs of chunks to be unarchived among those corresponding to the range specified in the -c option or the -r option are output in the KFAA80245-I message.

To perform chunk unarchive processing on these chunks, do not change any options other than the -t option, and execute the adbunarchivechunk command with the -t option omitted. To revise which chunks are to be unarchived, correct the specified values in the -c option or the -r option, and then execute the adbunarchivechunk command.

Important

If you specify this option, chunk unarchive processing is not executed.

-c chunk-ID-specification[,chunk-ID-specification]...

~<integer>((1 to 9,223,372,036,854,775,807))

Specify the chunk IDs of chunks to be unarchived among those in the table to be processed. You can specify one or more chunk IDs.

You can specify chunk IDs as follows. Note that you can combine multiple methods of specifying chunk IDs.

Figure 43‒3: Example of specifying chunk IDs in the -c option

[Figure]

  • Specifying individual chunk IDs (individual specification)

    If you want to specify the IDs of individual chunks to be unarchived, delimit the chunk IDs by using commas (,).

    Important

    There must be no spaces before or after a comma (,).

  • Specifying a range of chunk IDs (range specification)

    If you want to specify a range of chunk IDs to be unarchived, use the format smallest-chunk-ID-in-the-range-largest-chunk-ID-in-the-range (connect the two chunk IDs with a hyphen (-)).

    Important

    There must be no spaces before or after the hyphen (-). The chunk ID specified to the right of the hyphen must be greater than the chunk ID specified to the left of the hyphen.

Among the chunks whose IDs are specified, the following chunks will not be unarchived (only chunks in the table to be processed that are subject to unarchiving will be unarchived):

  • Chunks that are not in the table to be processed

  • Chunks that are not archived

The following rules apply to specifying this information:

  • You can specify maximum of 30,000 chunk IDs. The following explains how chunk IDs are counted:

    ∙ For a range specification, all chunk IDs in the specified range are counted.

    • If any duplicate chunk IDs are specified, the duplicate chunk IDs are counted.

    Examples of specifying chunk IDs and how to count them

    Example 1: -c 1,3,5: The command assumes that three chunk IDs are specified (1, 3, and 5).

    Example 2: -c 1,3,5-8,10: The command assumes that seven chunk IDs are specified (1, 3, 5, 6, 7, 8, and 10).

    Example 3: -c 1,3,5,5-8,10: The command assumes that eight chunk IDs are specified (1, 3, 5, 5, 6, 7, 8, and 10).

  • The maximum permitted length of the entire value specified in the -c option is 32 kilobytes. If the length would exceed 32 kilobytes, use range specifications or execute the adbunarchivechunk command more than once.

    [Figure]

  • For details about specifications that result in an error and specification examples, see (3) Errors that can be caused by the -c option.

▪ Searching for chunk IDs of chunks that are in a table to be processed

The following explains how to determine the chunk IDs of chunks that are in a table to be processed:

  • Searching system tables for STATUS_CHUNKS

    Search system tables for STATUS_CHUNKS, and check the chunk IDs.

    For details, see Checking the information about all chunks in a table based on a table name in Searching system tables in System Tables in the HADB Setup and Operation Guide.

  • Executing the adbdbstatus command

    Execute the following commands to output the DB area as well as the table and index usage information, and then check the chunk IDs (Chunk_ID) (the results are output in CSV format). For details about the items that are output as usage information for DB areas, tables, and indexes, see 13.7.2 List of items that are output as usage information for DB areas, tables, and indexes.

    adbdbstatus -d used -c table -n name-of-table-to-be-processed

    Specify the table name in the format schema-name.table-identifier.

-r range-specification

Specify a range of chunks to be unarchived. For details about the -r option, see (4) Explanation of the -r option (range specification).

--force

Normally, you will omit this option.

Specify this option in the following situation:

  • When a re-executed adbunarchivechunk command terminates abnormally, the output error message's solution column clearly states that you must execute the adbunarchivechunk command with this option specified

An example of this sort of situation is when you cannot access the command status file needed for re-execution (file in the $DBDIR/ADBSYS/ADBUTL directory). If you execute the adbunarchivechunk command with this option specified, chunk unarchive processing is forcibly executed.

The procedure for executing the adbunarchivechunk command with this option specified is as follows:

  1. Execute the adbunarchivechunk command with the --force option specified.

  2. Delete the temporary work files based on the explanation in the following topic in the HADB Setup and Operation Guide: When there are unneeded temporary work files on the disk in Steps to take in the event of a shortage of disk space for storing temporary work files during command execution

table-to-be-processed

Specify the target archivable multi-chunk table for chunk unarchive processing.

The following rules apply to specifying this information:

  • Specify in the format schema-name.table-identifier.

    If the user owns this table, the schema name can be omitted. If another HADB user owns this table, schema name must be specified.

  • 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.

  • Tables other than archivable multi-chunk tables cannot be specified.

  • The user can specify only a table for which the user has the UNARCHIVE CHUNK privilege.

  • Specify a table that can be updated (that is not non-updatable). Specifying a non-updatable table results in an error.

  • A viewed table cannot be specified.

(3) Errors that can be caused by the -c option

The following are two possible causes of errors in the adbunarchivechunk command that can be caused by the -c option's specification:

In either case, correct the specification, and then re-execute the adbunarchivechunk command. For details about the -c option, see -c in (2) Explanation of options.

(a) When the specification format of the -c option is invalid

The following table lists the message IDs that are displayed when the specification format of the -c option is invalid, and describes the possible errors. If any of these errors occurs, correct the error, and then re-execute the adbunarchivechunk command.

Table 43‒1: Message IDs that are displayed when the specification format of the -c option 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 specified chunk IDs exceeds 30,000.

-c 1-30001

-c 1-30000

2

The same chunk ID is specified on both sides of a hyphen (-).

-c 3-3,7

-c 3-5,7

3

The value of the chunk ID on the right side of a hyphen (-) is less than the value of the chunk ID on the left side.

-c 10-3

-c 3-10

4

  • KFAA90002-E

  • KFAA96840-I

There is a space between a chunk ID and a comma.

-c 1,3,10

-c 1,3,10

5

There is a space between a chunk ID and a hyphen (-).

-c 1,3-10

-c 1,3-10

6

KFAA90003-E

The length of the specified value exceeds 32 kilobytes.

[Figure]

-c 1-xxxxx

Change from individual specification to range specification (use a hyphen (-), not a comma (,)).

Legend:

∆: Space

(b) When an invalid chunk ID is specified in the -c option

The following table lists the message IDs that are displayed when an invalid chunk ID is specified in the -c option, and describes the possible errors. If an error occurs, correct the error, and then re-execute the adbunarchivechunk command.

Table 43‒2: Message IDs that are displayed when an invalid chunk ID is specified in the -c option, and possible errors

No.

Message ID that is displayed

Possible error

Example of invalid specification

Example of corrected specification and corrective action to take

1

KFAA50284-E

None of the specified chunk IDs is in the table to be processed.

If only chunk IDs 2 and 6 are in the table to be processed
  • -c 3-5

  • -c 4,5

If only chunk IDs 2 and 6 are in the table to be processed
  • -c 2,6

  • -c 2-6

Specify the chunk IDs of archived chunks that are in the table to be processed.

Note:

For details about how to search for the IDs of chunks existing in the table to be processed, see -c in (2) Explanation of options.

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

Use the -r option to specify a range of chunks to be unarchived. 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 are unarchived. However, among the chunks where data in the specified range is stored, chunks that are not archived are not unarchived.

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 43‒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 are unarchived, using the following conditions as an example:

Figure 43‒4: Relationship between the content of the date range specification and the chunks to be unarchived

[Figure]

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

(a) Specifying ranges of dates

Use dates to specify a range of chunks to be unarchived.

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 unarchiving.

    Table 43‒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 re-execute the adbunarchivechunk command.

    Table 43‒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

    • KFAA96840-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

Use times to specify a range of chunks to be unarchived.

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 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 43‒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 re-execute the adbunarchivechunk command.

    Table 43‒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

    • KFAA96840-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

Use time stamps to specify a range of chunks to be unarchived.

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 43‒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 re-execute the adbunarchivechunk command.

    Table 43‒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

    • KFAA96840-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

Use fixed-length character strings to specify a range of chunks to be unarchived.

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 re-execute the adbunarchivechunk command.

    Table 43‒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

    • KFAA96840-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

Use decimal numbers to specify a range of chunks to be unarchived.

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)

Examples of specifying 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 re-execute the adbunarchivechunk command.

    Table 43‒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

    • KFAA96840-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

Use integers to specify a range of chunks to be unarchived.

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 re-execute the adbunarchivechunk command.

    Table 43‒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

    • KFAA96840-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

Use floating point numbers to specify a range of chunks to be unarchived.

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 43‒5: 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 re-execute the adbunarchivechunk command.

    Table 43‒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

    • KFAA96840-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