Support Article
Migrate of upgraded 7.1 rules schema to new database failing
SA-6782
Summary
Admin has successfully migrated the rules tables to another database schema and upgraded the rules schema to 7.1.7. Attempting to migrate the updated rules back to new rules schema and it is failing.
Error Messages
Error Received :
[java] WARNING: Failed to execute SQL in file udb00820.sql
[java] Feb 16, 2015 7:28:06 AM com.pega.pegarules.install.SQLLoader writeMessage
[java] WARNING: Statement: CREATE TRIGGER rules.trpr_base_uc_del
[java] com.ibm.db2.jcc.am.SqlSyntaxErrorException: DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=RULES.PR_SYS_UPDATESCACHE, DRIVER=4.17.29
[java] at com.ibm.db2.jcc.am.hd.a(hd.java:747)
[java] at com.ibm.db2.jcc.am.hd.a(hd.java:66)
[java] at com.ibm.db2.jcc.am.hd.a(hd.java:135)
[java] at com.ibm.db2.jcc.am.wo.c(wo.java:2771)
[java] at com.ibm.db2.jcc.am.wo.d(wo.java:2759)
[java] at com.ibm.db2.jcc.am.wo.b(wo.java:2126)
[java] at com.ibm.db2.jcc.t4.ab.i(ab.java:226)
[java] at com.ibm.db2.jcc.t4.ab.c(ab.java:48)
[java] at com.ibm.db2.jcc.t4.o.b(o.java:38)
[java] at com.ibm.db2.jcc.t4.tb.h(tb.java:124)
[java] at com.ibm.db2.jcc.am.wo.jb(wo.java:2121)
[java] at com.ibm.db2.jcc.am.wo.a(wo.java:3294)
[java] at com.ibm.db2.jcc.am.wo.e(wo.java:1091)
[java] at com.ibm.db2.jcc.am.wo.execute(wo.java:1070)
[java] at com.pega.pegarules.install.SQLLoader.main(SQLLoader.java:298)
[java] Feb 16, 2015 7:28:06 AM com.pega.pegarules.install.SQLLoader writeMessage
[java] INFO:
[java] Encountered a SQL Exception, clean schema before running again.
BUILD FAILED
/media/software/114716_Pega717/scripts/migrateSystem.xml:636: Java returned: 1
Steps to Reproduce
Admin running migrate script to move the updated rules from one database to the target database.
Root Cause
For this second pass of the migrate script to migrate the updated rules to a new schema and to create the rules objects, the target data schema property needs to be set correctly. Since it was not set, the data schema was assumed to be the same as the rules schema and the database triggers creation SQL pointed to pr_sys_updatescache table in the rules schema when this table is actually in the data schema.
Resolution
This issue is resolved by making the following change to the PRPC operating environment:
Set the migrateSystem properties per the Pega 7.1.7 Upgrade Guide -> Upgrading from a Single to Split-Schema Configuration -> Upgrading with two databases -> Migrate and generate rules schema objects
pega.source.rules.schema=Updated Rules Schema
pega.target.rules.schema=Rules Schema
pega.target.data.schema=Data Schema
pega.move.admin.table=false
pega.clone.generate.xml=true
pega.clone.create.ddl=true
pega.clone.apply.ddl=true
pega.bulkmover.unload.db=true
pega.bulkmover.load.db=true
pega.rules.objects.generate=true
pega.rules.objects.apply=true
Published January 31, 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.