11.4.17 Archiving chunks (when using an archivable multi-chunk table)
To archive chunks in an archivable multi-chunk table (to place chunks in archived state), execute the adbarchivechunk command. The following shows the procedure.
Procedure:
-
Identify the chunks that you want to place in archived state.
Identify the chunks that you want to place in archived state by using the value in the archive range column. If you execute the adbarchivechunk command with the -r and -t options specified, you can identify the IDs of chunks that are included in the value range in the archive range column.
Specification example
This example identifies the chunks whose date information in the archive range column includes a date between January 1, 2015 and January 31, 2015.
adbarchivechunk -u ADBUSER01 -p '#HelloHADB_01' -r '2015/01/01-2015/01/31' -t SALESLIST
If you execute the adbarchivechunk command with the -r and -t options specified, the KFAA80245-I message is output. In the KFAA80245-I message, you can identify the IDs of the chunks that are included in the date range specified for the -r option.
-
Place the chunks in archived state.
Execute the adbarchivechunk command to place the chunks in archived state. When executing the preceding command, specify the chunk IDs determined in step 1 for the -c option.
Specification example
This example places the chunk whose chunk ID is 5 in archived state.
adbarchivechunk -u ADBUSER01 -p '#HelloHADB_01' -z /home/adbmanager/archive_file/archive_opt_file.txt -c 5 SALESLIST
- Note
-
When you execute the adbarchivechunk command, you can specify the -r option, instead of the -c option. In this case, specify the value range in the archive range column for this option to specify the chunks to be placed in archived state.
To check the compression ratio of an archived chunk and the size of archive files, execute the adbdbstatus command with the -c archivechunk and -n options specified to output the archived chunk summary information. For the -n option, specify the name of the archivable multi-chunk table in which archived chunks are contained. Then, check the following information:
-
Archive_file_size (Total size of all archive files corresponding to an archived chunk)
-
Compression_ratio (Compression ratio of an archived chunk)
- Note
-
For details about the adbarchivechunk command, see adbarchivechunk (Archive Chunk) in the manual HADB Command Reference.
For details about the adbdbstatus command, see adbdbstatus (Analyze the Database Status) in the manual HADB Command Reference.