Question


TCS
IN
Last activity: 11 Jul 2017 10:38 EDT
Schema name changes
we have installed PRPC in tomcat server with spilt schema DB as PEGARULES and PEGADATA. Now we want to modify the schema names as PEGARULES1 and PEGADATA1 for DB consolidations.
Identified the configurations in the context.xml where we can modify these two names. Can you please let us know will it work or is there any dependency for these two schema names ?
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


Pegasystems Inc.
US
I am confused by what you are going to use if not a db tool to restore the database.
Here is an example scenario for an Oracle database. Export pegarules schema using Oracle datapump. Create new schema pegarules1 and then use datapump to import pegarules schema to pegarules1. If you do this in 7.1.7 you will need to make changes to the database triggers as Oracle datapump will remap the signature lines of the triggers, stored procedures, etc. but will not change anything within the body. Within the body you will have schema qualified references which will still point to pegarules schema instead of pegarules1.


Pegasystems Inc.
US
What version of Pega are you on?


TCS
IN
It is PRPC 7.1.7 and PRPC 7.1.9


Pegasystems Inc.
US
In 7.1.7 there are still database triggers in use which would have schema qualified table references in the trigger body. Did you use a database tool to rename the schemas from pegarules to pegarules1? Or is this just that you have 2 new data and rules schemas that you installed/updated and you just want to know if there is anything other than the defaultSchema references in the context.xml that needs to be updated?


TCS
IN
We are planning to create a new schema and restore the database, not from DB tool. Then will remove old schemas and update the context.xml to get reflected.
So want to know is there any other references needs to be updated apart from context.xml. Is there any tool to check the references ?
Accepted Solution


Pegasystems Inc.
US
I am confused by what you are going to use if not a db tool to restore the database.
Here is an example scenario for an Oracle database. Export pegarules schema using Oracle datapump. Create new schema pegarules1 and then use datapump to import pegarules schema to pegarules1. If you do this in 7.1.7 you will need to make changes to the database triggers as Oracle datapump will remap the signature lines of the triggers, stored procedures, etc. but will not change anything within the body. Within the body you will have schema qualified references which will still point to pegarules schema instead of pegarules1.


TCS
IN
Yes. Oracle remap only signature lines only. We have identified all the invalid objects and corrected the schema names manually. Now the application is up and running as usual.
Thanks Celeste for the help.


TCS
IN
The following are the default configurations in the prconfig.xml file, what is the importance of these two, do we need to change the value here ?
<env name="database/databases/PegaRULES/dataSource" value="java:comp/env/jdbc/PegaRULES"/>
<env name="database/databases/PegaDATA/dataSource" value="java:comp/env/jdbc/PegaRULES"/>


Pegasystems Inc.
US
In context.xml you will have entries like this to specify the schema names. This is what you want to update.
<Environment name="prconfig/database/databases/PegaRULES/defaultSchema" value="RULES" type="java.lang.String"/>
<Environment name="prconfig/database/databases/PegaDATA/defaultSchema" value="DATA" type="java.lang.String"/>


TCS
IN
We have created new schemas by importing exisitng in to the existing DB.
Old DB: Admin, PEGARules, PEGAData
New DB: Admin, PEGARules, PEGAData, Admin_DEV, PEGARules_DEV, PEGAData_DEV
We have not modified any connection details in the application server but when we restarted the application server observing the following error:
com.pega.pegarules.pub.database.DatabaseException: Database-General Problem writing an instance to the database 4098 42000 ORA-04098: trigger 'PEGADATA_DEV.TRPR_DATAADM' is invalid and failed re-validation
Application is not getting started and showing as "PegaRULES server not available". Why it is accessing the other schama objects without configrations?


Pegasystems Inc.
US
What is in this trigger body that is causing it to fail? Is it pointing to a table in the old schema perhaps? The signature and body need to match and the user running the system needs to have the appropriate privileges on everything in the new rules and data schemas.
ORA-04098: trigger 'PEGADATA_DEV.TRPR_DATAADM' is invalid and failed re-validation