Pega upgrade "Optimize Schema" displays 75+ tables for PegaDATA and when running for PegaRULES there are none displayed, Why?
Pega system is upgraded to Pega 7.1.7 split schema using the single database process from the Upgrade Guide. Admin is trying to run the "Optimize Schema" tool to clean-up the unused tables from the PegaData and PegaRules schemas. When running for PegaData there are 75+ tables displayed and when running for PegaRULES there are none displayed, Why?
***Updated by moderator: Lochan to close post*** This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
This is because the rules schemas database triggers are not created correctly. During the upgrade to a split schema after the rules schema is upgraded you need to generate the rules objects such as the database triggers. When you do this step you need to set the pega.target.rules.schema to the upgraded rules schema and you also need to set the pega.target.data.schema to the old combined data/rules schema which is going to be the data schema in the split schema configuration. There is a documentation bug in the upgrade guide in the "Generate rules schema objects" section in the upgrading from one database process where it doesn't tell you to set the pega.target.data.schema. If you don't set it then the triggers which are supposed to update the data schemas pr_sys_updatescache table but instead update the dummy rules schema version of this table.
1. From the 7.1 Upgrade guide, run the Upgrading from a Single to Split-Schema Configuration -> Upgrading with one database -> Generate rules schema objects step again as specified in the upgrade guide except also set the pega.target.data.schema property in the migrateSystem.properties file.
2. Clear the extract marker from PegaTemp and restart the system.
if you are following the "Upgrading with two databases" process the upgrade guide correctly tells you the migrateSystem.properties to set in order to migrate the updated rules back to your new schema and create the rules objects as is needed.