The following must be considered when you execute data storage on a table for which a primary key index (PRIMARY index) or a unique index (index with the UNIQUE specification) has been defined:
If you attempt to load data in the batch index creation mode, the system stores data in the table and outputs the index key information to an index information file. At this point, key values are not checked for any duplication. Key value duplication checking occurs later when the index data is stored. If a duplicated key value is detected, index creation processing is rolled back, but the data has already been stored (already committed and cannot go back). In these cases, you need to use a backup copy to restore the RDAREAs.
Therefore, if you are loading data from an input data file that contains data with duplicated key values, be sure to specify the index update mode. This mode updates an index each time data is stored. A duplicated key value is immediately detected and the corresponding data is not stored in the database.
You can specify the batch index creation mode and index update mode using the -i option of the database load utility (pdload). Note that the default value is the batch index creation mode.