Support Article
Upgrading rules schema from Pega 7.1.7 to Pega 7.1.8 failed
SA-19971
Summary
An error occurred when the rules schema was updated from Pega 7.1.7 to Pega 7.1.8.
Error Messages
ERROR :
[java] 793 (SQLLoader) WARNING - Failed to execute SQL in file oracledate00610.sql
[java]
[java] java.sql.SQLException: ORA-01442: column to be modified to NOT NULL is already NOT NULL
.
.
.
BUILD FAILED
/smartpaas-backup/vol1/PRPC718/scripts/setupDatabase.xml:317: The following error occurred while executing this line:
/smartpaas-backup/vol1/PRPC718/scripts/setupDatabase.xml:1975: Java returned: 1
Last Update
Steps to Reproduce
1. Design setupDatabase.properties file related to rules upgrade in single schema.
2. Run the upgrade.sh file for the rules schema.
Root Cause
The rules schema of Pega 7.1.7 has PZINSKEY primary key defined as NOT NULL column in the table pr_log_reportstats. Due to the bug in the upgrade step, the DDL script generated contains the SQL statement to modify the field to NOT NULL. This script throws an error during upgrade.
Resolution
1. Edit the DDL script (PRPC_DISTRIBUTION/schema/generated/oracledate/update/oracledate.sql ) manually, and comment the faulty DDL statement.
/* ALTER TABLE RULES.pr_log_reportstats MODIFY pzInsKey NOT NULL */
2. Run the DDL and UDF scripts manually from PRPC_DISTRIBUTION/schema/generated/oracledate/update/oracledate.sql and PRPC_DISTRIBUTION/schema/generated/oracledate/update/udfstatements sql files.
3. Set the properties given below to true in setupDatabase.properties file, in order to bypass the DDL and UDF generation into the schema.
bypass.pega.schema=true
bypass.udf.generation=true
4. Run upgrade.sh script.
Published March 5, 2016 - Updated October 8, 2020
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.