Upgrade.sh fails with Database-TableWithNoColumns error
Using Oracle, when upgrading from Pega 6 to Pega 7 using the command line upgrade scripts, the upgrade fails with the below error. The table PEGASCHEMA.pr4_base has columns.
Caused by: com.pega.pegarules.pub.PRRuntimeException: Error determining the mode of PRPC install from database.
at com.pega.pegarules.data.internal.PRDataProviderImpl.isMultiTenantEnvironment(PRDataProviderImpl.java:1135) [...]
Caused by: com.pega.pegarules.pub.database.NonexistentTableException: Database-TableWithNoColumns PEGASCHEMA.pr4_base PegaRULES
Steps to Reproduce
1) Run upgrade.sh.
The root cause of this problem is in a third-party product integrated with PRPC. If you are running RULE or DATA upgrade part of Update documentation using deployment user with DBA type privileges as specified in the installation/upgrade guide, the process fails if synonyms exist on RULE tables such as pr4_base in schemas other than the one that is being upgraded. E.g
When upgrading v71rulesupdate schema and have a prpc63sp1 schema on the same Oracle server, create a synonym pr4_base for prpc63sp1.pr4_base. Then try and run update/upgrade.
Without the synonym, the same user is able to upgrade to 7.1.6 without issue. This is an Oracle bug regarding how its JDBC drivers handle synonyms.
This issue is resolved through the following local change: Instead of upgrading to a split schema you can upgrade to a single schema and then split the schemas after upgrade.
1. Upgrade from 6.x to 7.1.x Single Schema (v71update) per upgrade guide.
2. Run the migrateSystem script to migrate your updated rules objects from v71update (combined data and rules) to new v71rules schema. The source and targer user running the migration should be the deployment user (as outlined in Installation Guide) who has privileges to both schemas. The source and target connection properties (driver, url, etc.) should be filled in appropriately. The remaining migrateSystem.properties should be set this way:
3. After the upgrade please follow the instructions in the upgrade guide to cleanup the unused rules tables from your v71update schema.