Support Article
Error occurs while upgrading Pega Sales Automation
SA-56076
Summary
Database constraint validation error occurs during an upgrade from Sales Automation 7.13 to Sales Automation 7.31.
Error Messages
Batch failure. The batch was submitted, but at least one exception occurred on an individual member of the batch.
com.ibm.db2.jcc.am.SqlIntegrityConstraintViolationException: Error for batch element #1: Assignment of a NULL value to a NOT NULL column "TBSPACEID=2, TABLEID=271, COLNO=20" is not allowed.. SQLCODE=-407, SQLSTATE=23502, DRIVER=4.18.60
Steps to Reproduce
Import Pega Sales Automation 7.31 to Pega 7.3.1 with Sales Automation 7.13.
Root Cause
The column referenced is a custom column which was added to the framework table. After the column populated, it was set to NOT NULL. Since the column is customized, the Upgrade does not specify a value for this column when new rows are inserted to the table. As a result, the error occurred.
Resolution
Perform the following local-change:
- Set the column to allow NULL values
- Rerun the upgrade to insert new rows
- Run the routine to populate the custom column for new rows with column value as NULL
- Set the column to NOT NULL
Published November 29, 2018 - Updated December 2, 2021
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.