Hitachi

Hitachi Advanced Database Command Reference


17.11 Notes

  1. If the adbimport command is executed while another command or application program is running, HADB might not be able to allocate the required number of processing real threads. If this happens, HADB waits until the required number of processing real threads can be allocated before executing the adbimport command. If allocation of processing real threads is placed in wait status, see the topic Points to consider about the number of processing real threads to be used during command execution in Points to consider when executing commands concurrently in Preparing Resources in the HADB Setup and Operation Guide and take appropriate action.

  2. Do not perform read or write operations on the input data files (by using other applications) while the adbimport command is being executed.

  3. Use X'0A' (LF) or X'0D0A' (CRLF) for the line break code in files specified in the options of the adbimport command and in import options.

  4. Data import processing continues even if there is a duplicated key value in a unique index (the B-tree index for the primary key or a B-tree index for which UNIQUE was specified in the CREATE INDEX statement). The KFAA61205-W warning message indicating detection of duplicate key values is issued. In such a case, the table and the B-tree index subject to data import processing violate the uniqueness constraint. Locate the duplicate key values and delete the corresponding rows (a B-tree index that violates the uniqueness constraint is in the status called uniqueness constraint violation). Then re-execute the adbidxrebuild command and rebuild the corresponding B-tree index.

  5. Use the adbcancel command to cancel execution of the adbimport command. Alternatively, use a method such as the adbstop --force command or the OS's kill command to forcibly terminate the server process. For details about how to use the adbcancel command to suspend an executing command, see 1.6 When suspending (forcibly terminating) an executing command.

  6. Data import processing is performed by server processes. Therefore, using the Ctrl+C keys to forcibly terminate the adbimport command process will not interrupt data import processing that is being performed by server processes (such processing continues). When the data import processing is completed, the command outputs the KFAA81001-I message to the message log file.

  7. When data is imported to a column store table, information about the column-data compression type and the data storage rate is output in the following messages:

    • KFAA82000-I: The column-data compression type for each column is output. This message is output for each thread that performs data import processing.

    • KFAA82002-I: The data storage rate for each column is output.

    • KFAA82003-I: The data storage rate for the entire table is output.

  8. Work files (temporary work files) are created during data import processing. These temporary work files are deleted automatically when the adbimport command terminates normally (the return code is 0 or 4). If the adbimport command does not terminate normally, these work files might not be deleted.

    Because some of the temporary work files will be needed when the re-execute facility that starts from the processing to create B-tree indexes and text indexes is used, do not delete temporary work files before you use the re-execute facility. If you do delete them, the re-execute facility will not function correctly.

  9. Because temporary work files might cause a shortage of disk space, we recommend that you delete temporary work files from time to time in the following cases:

    • There will be no need to re-execute the adbimport command.

    • There is no need to re-execute the adbidxrebuild command.

    Check the following directories periodically for any remaining temporary work files and delete any that are found:

    • $DBDIR/ADBSYS/ADBUTL

    • Temporary work file storage directories specified in the -w option (or in $DBDIR/ADBWORK when the -w option was omitted)

  10. The following table shows how the adbidxrebuild command inherits index creation processing from the adbimport command.

    Table 17‒24: How the adbidxrebuild command inherits index creation processing from the adbimport command

    No.

    Canceled command#1

    Command to be executed following cancelation

    Whether processing is inherited

    Command name

    Option specification

    --create-temp-file option

    --force option

    1

    adbimport

    adbidxrebuild

    Specified

    Not specified

    Y#2, #3

    2

    Not specified

    Specified

    Y#2, #4, #5

    3

    Not specified

    Not specified

    N

    Legend:

    Y: Index creation processing can be inherited.

    N: Index creation processing cannot be inherited. (The KFAA50201-E message is issued.)

    #1

    To identify the canceled command, output the table summary information by executing the adbdbstatus command. The name of the command that was canceled is output to the Rerun_command column in the output result. For details about the adbdbstatus command, see 13. adbdbstatus (Analyze the Database Status).

    If the adbidxrebuild command is executed and then canceled after cancelation of the adbimport command, adbidxrebuild is displayed in the Rerun_command column. If the --create-temp-file option was specified for the canceled adbidxrebuild command, re-execute the adbidxrebuild command with the --create-temp-file option specified. In this case, the information about the cancelation of the adbimport command is saved in a command status file (file under the $DBDIR/ADBSYS/ADBUTL directory), and therefore indexes are rebuilt for the chunk that was being processed when the adbimport command was canceled.

    #2

    Executing the adbidxrebuild command rebuilds all indexes that were defined for the table to be processed. The -i option of the adbidxrebuild command is ignored even if it is specified.

    #3

    If the KFAA50247-E message is output during re-execution of the adbimport command (no temporary work file exists), specify the --create-temp-file option, and then execute the adbidxrebuild command. In this way, index creation processing can be inherited.

    #4

    After an index is defined in the target table to be processed while the adbimport command is canceled, the KFAA50209-E message might be output (if there are indexes in unfinished status) if the adbimport command is re-executed. In this case, specify the --force option to execute the adbidxrebuild command. In this way, index creation processing can be inherited.

    To identify the indexes in unfinished status, output the index summary information by executing the adbdbstatus command, and check the Unfinished column in the output result. If an index is in unfinished status, unfinished is output to the Unfinished column in the output result. For details about the adbdbstatus command, see 13. adbdbstatus (Analyze the Database Status).

    If the adbimport command has not been canceled, execute the adbidxrebuild command without the --force option specified.

    #5

    If the KFAA50244-E message is issued while the adbimport command is stopped (no command status file exists), execute the adbidxrebuild command with the --force option specified. In this way, index creation processing can be inherited.

  11. When you forcibly execute the adbimport command with the --force option specified, you must also specify the -d option (creation mode) at the same time. Therefore, all data stored in the table is deleted during forcible execution, and input data is stored after the table has been initialized. For details about how to forcibly execute the adbimport command, see --force in (3) Explanation of options in 17.2.1 Explanation of the specification format and options.

  12. If the adbimport command is executed on a newly defined table, data is imported in the creation mode, even if the -d option is omitted. Therefore, if the adbimport command terminates abnormally while data is being imported into the newly defined table, see the handling methods indicated for Specified (creation mode) in the -d option column in Table 17‒17: Whether the re-execute facility that starts from the processing to create B-tree indexes and text indexes is applied, depending on the adbimport command's cancellation timing.

    In the case of a table in which data was stored and then the number of data items was set to zero by an SQL statement, if the -d option is omitted, the adbimport command imports data in addition mode.

  13. Make sure that there is no duplication of absolute paths for the directories and files specified in the adbimport command's options or import options. This applies to the following directories and files:

    • Temporary work file storage directories (specified in the -w option or specified in the directory path file specified in the -w option)

    • Directory path files specifying the storage locations of temporary work files (specified in the -w option)

    • Import option file (specified in the -z option)

    • Column structure information file (specified in the -r option)

    • Input data path file (specified in the command option)

    • Input data files (specified in the input data path file)

    • Logical error data file (specified in the adb_import_errdata_file_name import option)

    Make sure that the absolute paths of these directories and files are unique from those of any file names used by any programs other than the adbimport command. If a duplicate file name is used, data in the file might be lost. Also make sure that symbolic links and relative paths are specified correctly.

  14. Note the following when you execute a retrieval SQL statement and the adbimport command concurrently by using background import:

    • Because the table that is to be retrieved is also subject to import processing, the performance of retrieval SQL statements might deteriorate due to conflicts between input and output.

    • If the sum of the number of threads used by the adbimport command and the number of the threads used by the retrieval SQL statements is greater than the value of the adb_sys_rthd_num operand specified in the server definition, processing will not start until the preceding processing has been completed (the subsequent processing will be placed in wait status).

  15. Do not delete a user who is executing the adbimport command or revoke such a user's IMPORT TABLE privilege while data is being imported. If the executing user is deleted or the user's privileges are revoked by mistake and the adbimport command terminates abnormally, it will not be possible to use the re-execute facility that starts from the processing to create B-tree indexes and text indexes.

    If the executing user is deleted or the user's privileges are revoked by mistake, take either of the following corrective actions: