Question & Answer
Question
Why does the load command fail with SQL3526N The modifier clause "IDENTITYOVERRIDE" is inconsistent with the current load command. Reason code: "5"
Cause
The identityoverride modifier is used for loading user-supplied values into a table with a GENERATED ALWAYS identity column. Use the db2look option to see if the column was created with GENERATED ALWAYS in it. An example of a db2look command would be:
db2look -d <dbname> -a -e -l -x -f -o db2look_<dbname>.ddl
Where dbname is at put the name of the database in question. Once done review the ddl file for the problem column, lile:
cat db2look_sample.ddl | grep col1
""COL1" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY
Answer
Make sure that your column is defined as GENERATED ALWAYS and *not* as GENERATED DEFAULT. An example with GENERATED ALWAYS in the create statement would be:
db2 "CREATE TABLE test(col1 BIGINT NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1 MINVALUE 1 MAXVALUE 100))";
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21638391