Duplicate row errors in DMS Scripts

IGNORE_DUPS Vs UPDATE_DUPS
Often we get the Duplicate row errors in the DMS Scripts based on the target environment in which import script is executed. Since DMS scripts can run in any target environment we need to handle this error in the DMS Script.

The best know method is IGNORE_DUPS statement in the DMS script
SET IGNORE_DUPS ;
IMPORT {record * } ;

The biggest disadvantage of this statement is it can only be run 'Bootstrap mode' which all the developers may not have access.

Is there way to avoid handle this error wihout running the DMS in the bootstrap mode ?

SET UPDATE_DUPS;
IMPORT { Record * };

Above statment can be used, it is not an exact replacement for the IGNORE_DUPS but it helps to slove problems in most of the cases.
UPDATE_DUPS - If the key values of the table exists in the target environment then it updates it with new values and insert the new rows in the .dat file.

 

1 comments:

  1. Anonymous said,

    Thanks for Sharing this ..

    on January 10, 2010 at 6:51 AM