Effects of running LOAD
The effects of running LOAD can be different, depending on your situation. Running the LOAD utility can have effects on index version numbers, control intervals, and table spaces that are defined with the NOT LOGGED attribute.
The effect of LOAD on MAXASSIGNEDVAL for identity columns
The last assigned value for an identity column is tracked in the MAXASSIGNEDVAL column in SYSIBM.SYSSEQUENCES. This value is used to determine the next value of the identity column. When you load tables that have identity columns, by default the LOAD utility updates the value in MAXASSIGNEDVAL as needed.
If the value of the identify column is generated by Db2, LOAD updates MAXASSIGNEDVAL with the last assigned value. If you provide the value of the identity column for the LOAD operation and the column is defined as GENERATED BY DEFAULT or OVERRIDE(IDENTITY) is specified, the utility updates MAXASSIGNEDVAL based upon the values of the input data. If you do not want LOAD to update MAXASSIGNEDVAL, specify UPDMAXASSIGNEDVAL NO in the LOAD statement.
The effect of LOAD on index version numbers
Db2 stores the range of used index version numbers in the OLDEST_VERSION and CURRENT_VERSION columns of the following catalog tables:
- SYSIBM.SYSINDEXES
- SYSIBM.SYSINDEXPART
The OLDEST_VERSION column contains the oldest used version number, and the CURRENT_VERSION column contains the current version number.
When you run LOAD with the REPLACE option, the utility updates this range of used version numbers for indexes that are defined with the COPY NO attribute. LOAD REPLACE sets the OLDEST_VERSION column to the current version number, which indicates that only one version is active; Db2 can then reuse all of the other version numbers.
Recycling of version numbers is required when all of the version numbers are being used. All version numbers are being used when one of the following situations is true:
- The value in the CURRENT_VERSION column is less than the value in the OLDEST_VERSION column.
- The value in the CURRENT_VERSION column is 15, and the value in the OLDEST_VERSION column is 0 or 1.
You can also run REBUILD INDEX, REORG INDEX, or REORG TABLESPACE to recycle version numbers for indexes that are defined with the COPY NO attribute. To recycle version numbers for indexes that are defined with the COPY YES attribute or for table spaces, run MODIFY RECOVERY.
The effect of LOAD on table space version numbers
When you run LOAD REPLACE or LOAD RESUME NO, the table space is reset to a single version. Db2 sets the OLDEST_VERSION column value to the CURRENT_VERSION column value in SYSIBM.SYSTABLESPACE. For each table that is in version 0 format, a system pages is inserted in the table space.
For LOAD REPLACE or LOAD RESUME NO, if a system page is missing for a table in the table space, the utility adds a system page for the current version of the table.
For LOAD RESUME YES, if a system page is missing for a table that is in version 0 format, the utility adds a system page for version 0 of the table.
The effect of LOAD REPLACE on the control interval
When you run a LOAD job with the REPLACE option but without the REUSE option and the data set that contains the data is Db2-managed, Db2 deletes this data set before the LOAD and redefines a new data set with a control interval that matches the page size.
The effect of LOAD on table spaces defined with NOT LOGGED attribute
The following table shows the effect of LOAD table spaces defined with the NOT LOGGED attribute
LOAD REORG LOG keyword | Table space logging attribute | Table space type | What is logged | Table space status after utility completes |
---|---|---|---|---|
LOG YES | NOT LOGGED | Non-LOB | LOG YES changes to LOG NO | No pending status or ICOPY-pending1 |
LOG YES | NOT LOGGED | LOB | control information | No pending status |
LOG NO | NOT LOGGED | Non-LOB | nothing | No pending status or ICOPY-pending1 |
LOG NO | NOT LOGGED | LOB | nothing | No pending status |
Note:
|