Pega 7 Data Schema Upgrade for Additional Database Schemas
We are planing to update from Pega 7.1.5 version to Pega 7.3.1 version. I am looking for following information -
We shall go for In-Place Update process for Data schema using following script -
./update.sh --dataOnly true
My Question is - There are few additional database schema, some of the existing Custom classes are mapped to tables reside in these schema. But, there are NO Pega specific tables (e.g. table name with PC_* or PR_*) present in these schema. Do I need to update these schema using update.sh script? My understanding is - we do not need to update these database schema. Please confirm.
1. Current Configuration -
OS - Red Hat Linux Server v6.5
Application Server - Oracle Weblogic Server 12c
Datbase Server - Oracle 12c R1 Enterprise DB Server (18.104.22.168)
Database - Split Schema.
2. I do not have any update.sh script for reference, so that I can check from the script.
You cannot upgrade customer specific 'Custom Schema' using upgrade.sh script. In the "setupDatabase.properties" (Config file which needs to updated before running upgrade script) file we have two placeholders i.e. "rules.schema.name" and "data.schema.name" where you have to mention Pega rule and data schema name(s) (Provided Pega is setup as split-schema), there is no placeholder to mention any other custom schema name. So when we run the command "./update.sh --dataOnly true", It only updates the schema which is provided in "data.schema.name" placeholder.
To update the custom schema, you can follow the below steps post-upgrade.
- compare upgraded OOTB table with one of the custom table.
- If you find any new column present in the OOTB table, write and execute an Alter SQL script to update the tables.
We did an upgrade earlier from Pega 6.3 to 7.1.8. In Pega 7.1.8 two new columns (PXCOMMITDATETIME & PXSAVEDATETIME) were added in every data tables. We wrote a custom script like below to update all custom tables.
alter table XXXXX add (PXCOMMITDATETIME DATE,PXSAVEDATETIME DATE);
Thanks a ton for your response. It is really helpful. I have few further questions -
1. I am looking for information - what exactly changes are done in Database tables when we execute the "./update.sh --dataOnly true" command?
If my PegaData schema contains N number of Pega specific OOTB tables [e.g. table name starts with PC_* or PR_*] and M number of external tables[mapped to different classes], then the above mention script/command will impact all (N+M) tables, or it will only impact N number of Pega specific OOTB tables?
2. After upgrading the PegaData schema, if I update "setupDatabase.properties" configuration file to set the property -
data.schema.name=<Custom Schema name>
and then execute the "./update.sh --dataOnly true" command, will it execute properly and update all the external tables of custom schema?
Note - My custom schema does not contain any Pega specific OOTB tables.
The script does not touch custom tables. To validate this, set "bypass.pega.schema=true" in the "setupDatabase.properties" file and execute the script. This will generate the DDL script but will NOT execute it. Then open the generated file, take a note of the tables getting updated then run it manually.
After that perform the same changes for the custom tables manually.