Start of change

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.

This global variable has the following characteristics:
  • 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.
The global variable can be set to the following values.
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.
The recording of temporal history for a system-period temporal table is enabled. Update and delete operations on a system-period temporal table will be recorded in the history table.
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 recording of temporal history for a system-period temporal table is disabled. Update and delete operations on a system-period temporal table will not be recorded in the history table.

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

Allow inserting rows from a staging table into the primary table, maintaining the values of all generated columns. The user performing this operation must have QIBM_DB_GENCOL_OVERRIDE function usage authority.
SET QSYS2.REPLICATION_OVERRIDE = 'Y';

INSERT INTO APPLIB.ORDERS (SELECT * FROM STAGE.ORDERS);
     
End of change