How To
Summary
Users might see one of the following errors to load data into system-period temporal tables.
SQL2437N The data movement command failed because the utility was unable to
resolve how implicitly hidden columns should be processed. No data was moved.
SQL3550W The field value in row "x" is not NULL, but the target column has
been defined as GENERATED ALWAYS.
SQL20535N The data change operation "LOAD" is not supported for the target
object "<table_name>" because of an implicit or explicit period specification
involving "SYSTEM_TIME". Reason code: "1".
SQL3016N An unexpected keyword "includeimplicitlyhidden" was found in the
filetmod parameter for the filetype.
Objective
Environment
Steps
- The data is exported with data in sys* columns in system-period temporal tables.
- The sys* columns are defined as implicit hidden.
- Set DB2_DMU_DEFAULT in case the input file type is IXF format because includeimplicitlyhidden file type modifier is not supported in IXF.
db2set -im DB2_DMU_DEFAULT=IMPLICITLYHIDDENINCLUDE
- Connect to the database, then set CURRENT TEMPORAL SYSTEM_TIME to NULL
db2 connect to <db_name> db2 set current temporal system_time null
- LOAD the data with periodoverride transactionidoverride file type modifiers.
db2 "load from <input_file> of ixf modified by periodoverride transactionidoverride insert into <table_name>"
- (Optional) Disconnect from the database, and remove DB2_DMU_DEFAULT to reset the configuration changes.
db2 connect reset db2set -im DB2_DMU_DEFAULT=
- Creating a system-period temporal table
The LOAD, IMPORT, and EXPORT commands can use the includeimplicitlyhidden modifier to work with implicitly hidden columns. - Utilities and tools
When loading data into system-period temporal tables, you use file type modifiers to either ignore any data in the external file that might be applied to the database manager generated columns, or to load user-supplied values to those generated columns. - Restrictions for system-period temporal tables
IMPORT and LOAD operations into system-period temporal tables are blocked if the CURRENT TEMPORAL SYSTEM_TIME special register is set to a non-null value.
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
17 July 2022
UID
ibm16604311