Unique Constraint Errors

Unique constraint errors are a part of life as a PeopleSoft developer. The most common way to troubleshoot them is to set up a SQL trace to determine the point of failure. Then its a matter of determining the bind variables that were passed to the insert statement and to figure out which key values are being duplicated ...

However, there's an alternative approach that works really well when you are dealing with a complex process. Once you've identified the table the error is occurring on, try dropping the unique index on that table (usually called PS_<TABLENAME>) and then letting the process insert the duplicate rows.

You can then use SQL to group by the key fields to find the duplicated rows causing the unique constraint error. This can often be a lot faster than trying to track down bind variables being passed to the insert statement at the relevant point in a large log file!

No Comments
Back to top