Identity Columns

With identity column support, DB2® can automatically generate unique values for new rows in a table, including primary keys, for DB2® data types INT, BIGINT, SMALLINT, and DECIMAL. In order to maintain a unique sequence of key values for a given table, DB2® generates identity column values upon Insert. For example, inserting a record with a NULL key (defined as an identity column) will yield a new row with the next unique and sequential key.

The Connector for DB2® supports the use of DB2's identity columns with the following limitation:

When an activity's key field is mapped to a DB2® Identity column, and the activity or Create event uses a NULL value for its key field, the activity or event will complete successfully. However, the key field value generated by DB2® is not returned to the source document or Advanced RealTime Virtual Fields key field. To obtain the newly generated key field values for subsequent operations or for Open, Update, and Delete events, the key documents must be replicated from the DB2® table or view or initialized again in HCL Enterprise Integrator (HEI) or Domino® Enterprise Connection Services (DECS). A stored procedure can also be used to return the new identity column value as an output parameter.