Hitachi

Hitachi Advanced Database Command Reference


33.5.2 Identifying the cause of the error and taking corrective action

The chunk status and corrective action to take depend on whether the KFAA80242-I message (Purge-chunk processing start) has been issued.

The following table describes the chunk status and corrective action to take depending on when the adbmergechunk command was canceled.

Table 33‒5: Chunk status and corrective action to take depending on when the adbmergechunk command was canceled

When canceled#1

Chunk status

Corrective action to take

While merging chunks

Status of merge-source chunks

Same as before the adbmergechunk command was executed

Status of merge-target chunk

Nonexistent (same as before the adbmergechunk command was executed)

See (1) If the adbmergechunk command was canceled while the command was merging chunks.

While deleting merge-source chunks#2

Status of merge-source chunks

Delete-pending status.

  • If the ID of a delete-pending chunk is specified in the adbexport command or for #GETDATA in the adbsql subcommand, the count of output results will be 0. If the ID of a deletion-pending chunk is specified for #GETCOUNT in the adbsql subcommand, the number of data items to be collected is zero. Therefore, the count of output results will be 0.

  • The adbmergechunk command cannot be executed on a table that has a delete-pending chunk.

  • A background import can be performed on a table that has a delete-pending chunk. Note, however, that a background import cannot be performed when the number of chunks has reached the maximum value.

Status of merge-target chunk

Merge processing has been completed.

See (2) If the adbmergechunk command was canceled while the command was deleting merge-source chunks.

#1

You can determine when the command was canceled by the messages that are issued, as shown in the following:

[Figure]

#2

If the KFAA80243-I message (Purge-chunk processing ended) with return code 0 or 4 has been issued, merge chunk processing has been completed. In this case, no action is needed.

Organization of this subsection

(1) If the adbmergechunk command was canceled while the command was merging chunks

This subsection explains the action to take if the KFAA80242-I message (Purge-chunk processing start) has not been issued.

Procedure
  1. Check the messages that have been issued and identify the cause of the error.

  2. Take appropriate action to eliminate the cause of the error.

  3. Re-execute the adbmergechunk command.

(2) If the adbmergechunk command was canceled while the command was deleting merge-source chunks

If the KFAA80242-I message (Purge-chunk processing start) has been issued, you must delete the delete-pending chunk when the command was canceled. The following describes the corrective action to take.

Procedure
  1. Check the messages that have been issued and identify the cause of the error.

  2. Take appropriate action to eliminate the cause of the error.

  3. As needed, check the delete-pending chunks.

    This operation is not required. Perform this operation only when you want to check the delete-pending chunks. For details about how to check the delete-pending chunks, see the following Note.

  4. Use the PURGE CHUNK statement to simultaneously delete all of delete-pending chunks.

PURGE CHUNK statement specification example
PURGE CHUNK "schema-name"."table-identifier"
        WHERE CHUNKID=ANY(
                          SELECT "CHUNK_ID"
                            FROM "MASTER"."STATUS_CHUNKS"
                              WHERE "TABLE_SCHEMA" = 'schema-name'
                                AND "TABLE_NAME" = 'table-identifier'
                                AND "CHUNK_STATUS" = 'Pending Delete')

For the schema name, specify the schema name of the owner of the table on which the adbmergechunk command was executed. For the table identifier, specify the table identifier of the table.

Note

You can check the deletion-pending chunks on the usage information for DB areas, tables, and indexes, which is obtained by using the adbdbstatus command.

Example of the adbdbstatus command

adbdbstatus -d used -c table -n name-of-table-for-which-adbmergechunk-command-was-canceled

Specify name-of-table-for-which-adbmergechunk-command-was-canceled, in the format schema-name.table-identifier.

Execute the command, and then check lines beginning with line 2 in the output results (usage information for DB areas, tables, and indexes). (The column titles occupy line 1 in the output results.)

  • If there is a row in which the value of the Chunk_status column (the 18th column) is Pending_delete, the merge-source chunks have not been deleted. Delete-pending chunks remain.

    Example:

    [Figure]

  • If Pending_delete is not output for the Chunk_status column (the 18th column), merge chunk processing has been completed. (The merge-source chunks have been deleted.)

    Example:

    [Figure]