Hitachi

Hitachi Advanced Database Command Reference


14.3.1 Exporting all data from a table

This example exports table data under the following conditions:

[Figure]

This example uses the following procedure to execute the adbexport command.

Procedure
  1. Create an output data path file.

  2. Create an export option file.

  3. Execute the adbexport command.

Using examples, the following subsections explain each of these steps.

Organization of this subsection

(1) Creating an output data path file

This example creates an output data path file and specifies in it paths for all the output data files.

Example specification of an output data path file
/mnt/diska/wwwww/exp1.csv
/mnt/diskb/xxxxx/exp2.csv
/mnt/diskc/yyyyy/exp3.csv
/mnt/diskd/zzzzz/exp4.csv

(2) Creating an export option file

This example creates an export option file and specifies export options in it.

Example specification of an export option file
set adb_export_rthd_num = 3           ...1
set adb_export_scan_buff_size = 64    ...2
Explanation:
  1. Specifies the number of processing real threads to be used for executing the adbexport command.

  2. Specifies the size of the buffer to be used for retaining table data retrieval results.

(3) Executing the adbexport command

adbexport -u ADBUSER01                             ...1
          -p '#HelloHADB_01'                       ...2
          -z /home/adbmanager/exp_file/env01.txt   ...3
          -n TABLE01                               ...4
          /home/adbmanager/exp_file/expf01.txt     ...5
Explanation:
  1. Specifies the authorization identifier of the HADB user who executes the adbexport command.

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

  3. Specifies the absolute path name of the export option file created in (2) Creating an export option file.

  4. Specifies the table that is to be the target of export processing.

  5. Specifies the absolute path name of the output data path file created in (1) Creating an output data path file.