IBM Support

Load fails with SQL3526N Reason Code: "5".

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))";

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"DB2 Tools - db2look","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.8;9.7;9.5;10.1","Edition":"Advanced Enterprise Server;Enterprise Server;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21638391