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-6 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-6 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 reorganizationOutput message immediately before error*Table statusRestart location
LOB column structure base tableLOB columnLOB attribute
1UnloadingStarting unloading712, 732[Figure][Figure][Figure]No. 1
2Completing unloading714, 734rc=8[Figure][Figure][Figure]No. 1
rc=0N and RN and RN and RFor falsification prevented table:
No. 3
RRRFor table other than falsification prevented table:
No. 1 (in units of tables or RDAREAs)
No. 3 (in units of schemas)
3ReloadingStarting data deletionNot outputN and RN and RN and RFor falsification prevented table:
No. 3
RRRFor table other than falsification prevented table:
No. 1 (in units of tables or RDAREAs)
No. 3 (in units of schemas)
4Completing data deletion721N and RN and RN and RNo. 5
5Starting reloading712, 732N and RN and RN and RNo. 5
6Completing reloading714, 734rc=8N and RN and RN and RNo. 5
rc=0RRRWhen index has been defined and -i c is specified:
No. 7
Other than the above:
No. 1
7Batch index creationStarting index unloading (during restart only)725RRRNo. 7
8Starting batch index creation715RRRNo. 7
9Completing batch index creation716RRRWhen there is an index that has not been created:
No. 7
[Figure][Figure][Figure]Other than the above:
No. 1
Legend:
N: Reload-not-completed data status
R: Reorganizing
[Figure]: 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-7 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-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 (lobunld statement specified))

No.Processing during table reorganizationOutput message immediately before error*Table statusRestart location
LOB column structure base tableLOB columnLOB attribute
1Unloading LOB column structure base tableStarting unloading712, 732[Figure][Figure][Figure]No. 1
2Completing unloading714, 734rc=8[Figure][Figure][Figure]No. 1
rc=0N and RN and RN and RFor falsification prevented table:
No. 3
RRRFor table other than falsification prevented table:
No. 1
3Reloading to LOB column structure base tableStarting data deletionNot outputN and RN and RN and RFor falsification prevented table:
No. 3
RRRFor table other than falsification prevented table:
No. 1
4Completing data deletion721N and RN and RN and RNo. 5
5Starting reloading712, 732N and RN and RN and RNo. 5
6Completing reloading714, 734rc=8N and RN and RN and RNo. 5
rc=0RRRWhen index has been defined and -i c is specified:
No. 7
Other than the above:
No. 1
7Batch index creationStarting index unloading (during restart only)725RRRNo. 7
8Starting batch index creation715RRRNo. 7
9Completing batch index creation716RRRWhen there is an index that has not been created:
No. 7
Other than the above:
No. 10
10Unloading LOB columnStarting unloading712, 732RRRNo. 10
11Completing unloading714, 734rc=8RRRNo. 10
rc=0RN and RRFor falsification prevented table:
No. 12
RRRFor table other than falsification prevented table:
No. 10
12Reloading LOB columnStarting data deletionNot outputRN and RRFor falsification prevented table:
No. 12
RRRFor table other than falsification prevented table:
No. 10
13Completing data deletion721RN and RRNo. 14
14Starting reloading712, 732RN and RRNo. 14
15Completing reloading714, 734rc=8RN and RRNo. 14
rc=0[Figure][Figure][Figure]No. 1
Legend:
N: Reload-not-completed data status
R: Reorganizing
[Figure]: 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-8 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-8 Restart location when table reorganization is re-executed due to an error (when LOB column only is reorganized)

No.Processing during table reorganizationOutput message immediately before error*Table statusRestart location
LOB column structure base tableLOB columnLOB attribute
1Unloading LOB columnStarting unloading712, 732[Figure][Figure][Figure]No. 1
2Completing unloading714, 734rc=8[Figure][Figure][Figure]No. 1
rc=0[Figure]N and R[Figure]For falsification prevented table:
No. 3
[Figure]R[Figure]For table other than falsification prevented table:
No. 1
3Reloading LOB columnStarting data deletionNot output[Figure]N and R[Figure]For falsification prevented table:
No. 3
[Figure]R[Figure]For table other than falsification prevented table:
No. 1
4Completing data deletion721[Figure]N and R[Figure]No. 5
5Starting reloading712, 732[Figure]N and R[Figure]No. 5
6Completing reloading714, 734rc=8[Figure]N and R[Figure]No. 5
rc=0[Figure][Figure][Figure]No. 1
Legend:
N: Reload-not-completed data status
R: Reorganizing
[Figure]: 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-9 describes the location where table reorganization is restarted.

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

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

No.Processing during table reorganizationTimingRestart location
1UnloadingWhen an error occurred during unloadingNo. 1
2ReloadingWhen an error occurred after the KFPL00722-I message was issuedNo. 2
(e) When reorganizing for each server (-g omitted) (applicable to HiRDB/Parallel Server 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, 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-10 describes whether or not utilities can be executed on a table that is in reload-not-completed data status, Table 8-11 describes whether or not operation commands can be executed on such a table, and Table 8-12 describes whether or not SQL statements can be executed on such a table.

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

Utility nameFunctionTable status
B: [Figure]B: RNB: [Figure]B: [Figure]B: RNB: RNB: [Figure]B: N
A: [Figure]A: [Figure]A: RNA: [Figure]A: RNA: [Figure]A: RNA: N
L: [Figure]L: [Figure]L: [Figure]L: RNL: [Figure]L: RNL: RNL: N
pdloadData loading on LOB column structure base table-d specifiedYYYYYYYY
-d omittedYNNNNNNN
Data loading on LOB columnYNNNNNNN
Concurrent data loading on LOB column structure base table and LOB column-d specifiedYYYYYYYY
-d omittedYNNNNNNN
pdrorgTable reorganization (-k rorg)-j specifiedunload statementYCCCCCCC
-j omittedunload statementYCCCCCCC
lobunld statementYCCCCCCC
unload statement and lobunld statementYCCCCCCC
Unloading table (-k unld)YYYYYYYY
Table reloading (-k reld)-j specifiedunload statementYYYYYYYY
-j omittedunload statementYYYYYYYY
lobunld statementYYYYYYYY
unload statement and lobunld statementYYYYYYYY
Batch index creation (-k ixmk)B-TREE indexYNNNNNNN
Plug-in indexYNNNNNNN
Index re-creation (-k ixrc)B-TREE indexYNNNNNNN
Plug-in indexYNNNNNNN
Index reorganization (-k ixor)YNNNNNNN
pdrbalYNNNNNNN
Other utilityYYYYYYYY
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
[Figure]: 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-11 Whether or not operation commands can be executed on a table in reload-not-completed data status

Operation command nameConditionTable status
B: [Figure]B: RNB: [Figure]B: [Figure]B: RNB: RNB: [Figure]B: RN
A: [Figure]A: [Figure]A: RNA: [Figure]A: RNA: [Figure]A: RNA: RN
L: [Figure]L: [Figure]L: [Figure]L: RNL: [Figure]L: RNL: RNL: RN
pdrelsRDAREA containing falsification prevented tableBYNYYNNYN
AYYNYNYNN
LYYYNYNNN
Other RDAREAYYYYYYYY
Other operation commandYYYYYYYY
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
[Figure]: Normal status (before or after reorganization)
Y: Can be executed.
N: Cannot be executed.

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

SQLTable status
B: [Figure]B: RNB: [Figure]B: [Figure]B: RNB: RNB: [Figure]B: RN
A: [Figure]A: [Figure]A: RNA: [Figure]A: RNA: [Figure]A: RNA: RN
L: [Figure]L: [Figure]L: [Figure]L:RNL: [Figure]L:RNL:RNL:RN
SELECT statementYYCCCCCC
UPDATE statementYYCCCCCC
INSERT statementYYCCCCCC
DELETE statementYYCCCCCC
Other SQL statementYYYYYYYY
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
[Figure]: 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 a data dictionary table was reorganized
    • 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).