Specifying a primary key with SQ_IXLIST (Db2 for i source)

It is possible to add a definition of a primary key to a specific table, even if the source system does not provide the unique index definition.  A special table on the source system (SQDR.SQ_IXLIST) is used to define the columns that comprise the primary key.  

Alternatively, you may also add the primary key definition to the destination after the baseline has been completed, but using the SQ_IXLIST mechanism ensures that it will be automatically recreated any time a new baseline is required.

Note that SQDR.SQ_IXLIST resides on the source system, not the staging database.  This feature is currently only available for Db2 for i sources.

Layout:

Example:

INSERT INTO SQDR.SQ_IXLIST ("TABLE_SCHEM","TABLE_NAME","COLUMN_NAME","KEY_SEQ") VALUES('QAUSER','APPS','ID',10)

The DML may be issued using iSeries Navigator SQL scripting, 5250/STRSQL command, or another ad-hoc SQL tool.  The user must use a sufficiently privileged credential (such as “SQDR”) to modify the table.

If the subscription is defined to “Use Unique constraints”, then a primary key constraint is added to the destination table.