Nonstop Database, HiRDB Version 9 Command Reference

[Contents][Index][Back][Next]

8.4.4 Handling of a reloading error during table reorganization

If reloading results in an error during table reorganization, eliminate the cause of the error and then re-execute table reorganization (-k rorg).

Organization of this subsection
(1) Processing resulting in an error during table reorganization and the restart location for re-execution
(2) Whether or not commands and SQL statements can be executed on a table that is in reload-not-completed data status
(3) Reload-not-completed data status release timing
(4) Notes

(1) Processing resulting in an error during table reorganization and the restart location for re-execution

If table reorganization results in an error, the table is placed in under-reorganization status. If table reorganization is re-executed while the table's status is under-reorganization, processing is restarted with the process that resulted in the error. To determine whether or not the corresponding RDAREA was being reorganized, execute pddbst's logical analysis in units of RDAREAs or analysis in units of tables and then check Status in the analysis results.

(a) When reorganizing a LOB column structure base table only or together with a LOB column (-j specified)

In the event of an error during table reorganization, Table 8-7 Restart location when table reorganization is re-executed due to an error (when only LOB column structure base table or both LOB column structure base table and LOB column are reorganized (-j specified)) describes the location where table reorganization is restarted. Reorganization of a LOB column structure base table only or together with a LOB column is based on the assumption that the -j option is specified and a single unload data file is used.

Specification of options for execution of pdrorg:
pdrorg -k rorg [-j]

Specification of a control information file for execution of pdrorg:
unload statement

Table 8-7 Restart location when table reorganization is re-executed due to an error (when only LOB column structure base table or both LOB column structure base table and LOB column are reorganized (-j specified))

No. Processing during table reorganization Output message immediately before error# Table status Restart location
LOB column structure base table LOB column LOB attribute
1 Unloading Starting unloading 712, 732 -- -- -- No. 1
2 Completing unloading 714, 734 rc=8 -- -- -- No. 1
rc=0 N and R N and R N and R For falsification prevented table:
No. 3
R R R For table other than falsification prevented table:
No. 1 (in units of tables or RDAREAs)
No. 3 (in units of schemas)
3 Reloading Starting data deletion Not output N and R N and R N and R For falsification prevented table:
No. 3
R R R For table other than falsification prevented table:
No. 1 (in units of tables or RDAREAs)
No. 3 (in units of schemas)
4 Completing data deletion 721 N and R N and R N and R No. 5
5 Starting reloading 712, 732 N and R N and R N and R No. 5
6 Completing reloading 714, 734 rc=8 N and R N and R N and R No. 5
rc=0 R R R When index has been defined and -i c is specified:
No. 7
Other than the above:
No. 1
7 Batch index creation Starting index unloading (during restart only) 725 R R R No. 7
8 Starting batch index creation 715 R R R No. 7
9 Completing batch index creation 716 R R R When there is an index that has not been created:
No. 7
-- -- -- Other than the above:
No. 1

Legend:
N: Reload-not-completed data status
R: Reorganizing
rc: Return code
--: Normal status (before or after reorganization)

#: Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.
(b) When reorganizing a LOB column structure base table together with a LOB column (lobunld statement specified)

In the event of an error during table reorganization, Table 8-8 Restart location when table reorganization is re-executed due to an error (when only LOB column structure base table or both LOB column structure base table and LOB column are reorganized (lobunld statement specified)) describes the location where table reorganization is restarted. Reorganization of a LOB column structure base table only or together with a LOB column is based on the assumption that the lobunld statement is specified and an unload data file and LOB data unload data file are used.

Specification of options for execution of pdrorg:
pdrorg -k rorg

Specification of a control information file for execution of pdrorg:
unload and lobunld statements

Table 8-8 Restart location when table reorganization is re-executed due to an error (when only LOB column structure base table or both LOB column structure base table and LOB column are reorganized (lobunld statement specified))

No. Processing during table reorganization Output message immediately before error# Table status Restart location
LOB column structure base table LOB column LOB attribute
1 Unloading LOB column structure base table Starting unloading 712, 732 -- -- -- No. 1
2 Completing unloading 714, 734 rc=8 -- -- -- No. 1
rc=0 N and R N and R N and R For falsification prevented table:
No. 3
R R R For table other than falsification prevented table:
No. 1
3 Reloading to LOB column structure base table Starting data deletion Not output N and R N and R N and R For falsification prevented table:
No. 3
R R R For table other than falsification prevented table:
No. 1
4 Completing data deletion 721 N and R N and R N and R No. 5
5 Starting reloading 712, 732 N and R N and R N and R No. 5
6 Completing reloading 714, 734 rc=8 N and R N and R N and R No. 5
rc=0 R R R When index has been defined and -i c is specified:
No. 7
Other than the above:
No. 1
7 Batch index creation Starting index unloading (during restart only) 725 R R R No. 7
8 Starting batch index creation 715 R R R No. 7
9 Completing batch index creation 716 R R R When there is an index that has not been created:
No. 7
Other than the above:
No. 10
10 Unloading LOB column Starting unloading 712, 732 R R R No. 10
11 Completing unloading 714, 734 rc=8 R R R No. 10
rc=0 R N and R R For falsification prevented table:
No. 12
R R R For table other than falsification prevented table:
No. 10
12 Reloading LOB column Starting data deletion Not output R N and R R For falsification prevented table:
No. 12
R R R For table other than falsification prevented table:
No. 10
13 Completing data deletion 721 R N and R R No. 14
14 Starting reloading 712, 732 R N and R R No. 14
15 Completing reloading 714, 734 rc=8 R N and R R No. 14
rc=0 -- -- -- No. 1

Legend:
N: Reload-not-completed data status
R: Reorganizing
rc: Return code
--: Normal status (before or after reorganization)

#: Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.
(c) When reorganizing a LOB column only

In the event of an error during table reorganization, Table 8-9 Restart location when table reorganization is re-executed due to an error (when LOB column only is reorganized) describes the location where table reorganization is restarted.

Specification of options for execution of pdrorg:
pdrorg -k rorg

Specification of a control information file for execution of pdrorg:
lobunld statement

Table 8-9 Restart location when table reorganization is re-executed due to an error (when LOB column only is reorganized)

No. Processing during table reorganization Output message immediately before error# Table status Restart location
LOB column structure base table LOB column LOB attribute
1 Unloading LOB column Starting unloading 712, 732 -- -- -- No. 1
2 Completing unloading 714, 734 rc=8 -- -- -- No. 1
rc=0 -- N and R -- For falsification prevented table:
No. 3
-- R -- For table other than falsification prevented table:
No. 1
3 Reloading LOB column Starting data deletion Not output -- N and R -- For falsification prevented table:
No. 3
-- R -- For table other than falsification prevented table:
No. 1
4 Completing data deletion 721 -- N and R -- No. 5
5 Starting reloading 712, 732 -- N and R -- No. 5
6 Completing reloading 714, 734 rc=8 -- N and R -- No. 5
rc=0 -- -- -- No. 1

Legend:
N: Reload-not-completed data status
R: Reorganizing
rc: Return code
--: Normal status (before or after reorganization)

#: Messages are abbreviated. For example, 712 means KFPL00712-I and 732 means KFPL00732-I.
(d) When reorganizing in units of schemas

In the event of an error during table reorganization, Table 8-10 Restart location when table reorganization is re-executed due to an error (reorganization in units of schemas) describes the location where table reorganization is restarted.

Specification of options for execution of pdrorg:
pdrorg -k rorg -t all

Table 8-10 Restart location when table reorganization is re-executed due to an error (reorganization in units of schemas)

No. Processing during table reorganization Timing Restart location
1 Unloading When an error occurred during unloading No. 1
2 Reloading When an error occurred after the KFPL00722-I message was issued No. 2
(e) When reorganizing for each server (-g omitted) (applicable to a HiRDB parallel server configuration only)

Specification of options for execution of pdrorg:
pdrorg -k rorg

Specification of a control information file for execution of pdrorg:
unload statement only, lobunld statement only, or both unload and lobunld statements

For a HiRDB parallel server configuration, if reloading results in an error during reorganization of a table that is split among multiple servers, reorganization is restarted at the location indicated in (a) through (c) for each server where the unload and lobunld statements are specified in the control information file.

(2) Whether or not commands and SQL statements can be executed on a table that is in reload-not-completed data status

If reloading results in an error during table reorganization or reorganization is incomplete for a reason such as an error during reorganization of a falsification prevented table, the target RDAREA is placed in reload-not-completed data status. In such a case, execution of some commands and SQL statements is restricted.

Table 8-11 Whether utilities can be executed on a table in reload-not-completed data status describes whether or not utilities can be executed on a table that is in reload-not-completed data status, Table 8-12 Whether operation commands can be executed on a table in reload-not-completed data status describes whether or not operation commands can be executed on such a table, and Table 8-13 Whether SQL statements can be executed on a table in reload-not-completed data status describes whether or not SQL statements can be executed on such a table.

Table 8-11 Whether utilities can be executed on a table in reload-not-completed data status

Utility name Function Table status
B: -- B: RN B: -- B: -- B: RN B: RN B: -- B: N
A: -- A: -- A: RN A: -- A: RN A: -- A: RN A: N
L: -- L: -- L: -- L: RN L: -- L: RN L: RN L: N
pdload Data loading on LOB column structure base table -d specified Y Y Y Y Y Y Y Y
-d omitted Y N N N N N N N
Data loading on LOB column Y N N N N N N N
Concurrent data loading on LOB column structure base table and LOB column -d specified Y Y Y Y Y Y Y Y
-d omitted Y N N N N N N N
pdrorg Table reorganization (-k rorg) -j specified unload statement Y C C C C C C C
-j omitted unload statement Y C C C C C C C
lobunld statement Y C C C C C C C
unload statement and lobunld statement Y C C C C C C C
Unloading table (-k unld) Y Y Y Y Y Y Y Y
Table reloading (-k reld) -j specified unload statement Y Y Y Y Y Y Y Y
-j omitted unload statement Y Y Y Y Y Y Y Y
lobunld statement Y Y Y Y Y Y Y Y
unload statement and lobunld statement Y Y Y Y Y Y Y Y
Batch index creation (-k ixmk) B-tree index Y N N N N N N N
Plug-in index Y N N N N N N N
Index re-creation (-k ixrc) B-tree index Y N N N N N N N
Plug-in index Y N N N N N N N
Index reorganization (-k ixor) Y N N N N N N N
pdrbal Y N N N N N N N
Other utility Y Y Y Y Y Y Y Y

Legend:
B: RDAREA storing LOB column structure base table
A: RDAREA containing LOB attributes
L: RDAREA containing LOB columns
RN: Reload-not-completed data status
--: Normal status (before or after reorganization)
Y: Can be executed.
C: Can be re-executed if no change is made to the options and control information files. If changes are made to the options or control information files, re-re-execution results in an error.
N: Cannot be executed.

Table 8-12 Whether operation commands can be executed on a table in reload-not-completed data status

Operation command name Condition Table status
B: -- B: RN B: -- B: -- B: RN B: RN B: -- B: RN
A: -- A: -- A: RN A: -- A: RN A: -- A: RN A: RN
L: -- L: -- L: -- L: RN L: -- L: RN L: RN L: RN
pdrels RDAREA containing falsification prevented table B Y N Y Y N N Y N
A Y Y N Y N Y N N
L Y Y Y N Y N N N
Other RDAREA Y Y Y Y Y Y Y Y
Other operation command Y Y Y Y Y Y Y Y

Legend:
B: RDAREA containing LOB column structure base table
A: RDAREA containing LOB attributes
L: RDAREA containing LOB columns
RN: Reload-not-completed data status
--: Normal status (before or after reorganization)
Y: Can be executed.
N: Cannot be executed.

Table 8-13 Whether SQL statements can be executed on a table in reload-not-completed data status

SQL Table status
B: -- B: RN B: -- B: -- B: RN B: RN B: -- B: RN
A: -- A: -- A: RN A: -- A: RN A: -- A: RN A: RN
L: -- L: -- L: -- L:RN L: -- L:RN L:RN L:RN
SELECT statement Y Y C C C C C C
UPDATE statement Y Y C C C C C C
INSERT statement Y Y C C C C C C
DELETE statement Y Y C C C C C C
Other SQL statement Y Y Y Y Y Y Y Y

Legend:
B: RDAREA storing LOB column structure base table
A: RDAREA storing LOB attributes
L: RDAREA containing LOB columns
RN: Reload-not-completed data status
--: Normal status (before or after reorganization)
Y: Can be executed.
C: If a LOB column or a column of an abstract data type with the LOB attribute is to be manipulated, the SQL statement cannot be executed if the RDAREA storing the target LOB column or LOB attribute is in reload-not-completed data status.

(3) Reload-not-completed data status release timing

The reload-not-completed data status is released at the following times:

(4) Notes

  1. Table reorganization (-k rorg) is not restarted in the following cases; execute table reloading (-k reld) or recover the table from its backup:
    • In the no-log mode (-l n specified)
    • When changes were made to the options and control information file (except for changes to the -b option or to the option statement's tblstatus operand)
    • Before re-execution, the following processing was executed on the target table (in this case, start from unload processing instead of restarting the processing):
      - Execution of pdload with -d specified
      - Recovery of RDAREA from a backup created prior to the table reorganization
      - Reloading on the table (-k reld)
      - Re-initialization of RDAREA by pdmod
      - Execution of the PURGE TABLE statement
  2. Do not execute pdrorg from any other user until the current table reorganization is completed (do not concurrently perform re-execution of table reorganization, normal table reorganization, or reloading on the table).
  3. If indexes are defined for a table and table reorganization is re-executed in the index update mode (-i s), the index information file may remain. In such a case, delete the index information file after table reorganization has been completed.
  4. If you are re-executing table reorganization in units of schemas, shut down the RDAREA storing the table in the schema with the pdhold command (to protect UAPs from accessing the table being reorganized and being placed in wait status and to protect the tables from being updated by UAPs). Additionally, do not execute CREATE TABLE or DROP TABLE on the corresponding schema until table reorganization for that schema is completed.
  5. Table reorganization cannot be restarted if the -r option is specified, a non-partitioning key index is specified in the -b option, and the restart location falls on the unloading of LOB column structure base table or unloading of LOB column. In such a case, delete the -b option and then re-execute or execute table reloading (-k reld).
  6. If batch index creation terminates abnormally while the table for which the indexes are defined is being reorganized (-k rorg) and you execute -k ixmk (batch index creation) and complete the reorganization processing, the reload-not-completed data status will not be released. If that happens, you must release the reload-not-completed data status by specifying clear in the tblstatus operand in the option statement for table reorganization (-k rorg) and then executing pdrorg.