REPLICATION_OVERRIDE
This global variable controls whether generated columns are maintained by Db2® for i. When the non-default value of Y is used, Db2 for i will not generate values for generated columns on an INSERT, UPDATE, or MERGE statement. Additionally, when the non-default value of Y is used, no temporal history for a system-period temporal table is generated.
The global variable does not affect the generation of new values for generated columns that are not explicitly specified for an INSERT, UPDATE, or DELETE. Db2 always generates values for these columns.
This built-in global variable is intended for use by applications that replicate data.
- It is updateable.
- The type is CHAR(1).
- The schema is QSYS2.
- The scope of this global variable is session.
- The default value is N.
- N
- The user cannot specify values for row-begin, row-end, transaction-start-ID, and generated expression columns on INSERT, UPDATE, and MERGE statements. Values for identity, row change timestamp, and ROWID columns can be specified when using the OVERRIDING SYSTEM VALUE clause on the INSERT, UPDATE, and MERGE statements.
- Y
- The user must specify values for all columns, including identity, row change timestamp, ROWID, row-begin, row-end, transaction-start-ID, and generated expression columns on INSERT, UPDATE, and MERGE statements.
The READ and WRITE privileges on this global variable are granted to PUBLIC.
To change the value of this global variable, the caller must be authorized to the QIBM_DB_GENCOL_OVERRIDE function usage identifier.
Example
SET QSYS2.REPLICATION_OVERRIDE = 'Y';
INSERT INTO APPLIB.ORDERS (SELECT * FROM STAGE.ORDERS);