Question
Pai G
IN
Last activity: 14 Aug 2017 4:21 EDT
How do we purge the DB tables for Pega 7.2.2?
Hi,
We are using Pega PRPC 7.2.2 with Apache Tomcat 8.5.11 and MS SQL Server 2014. We are running some performance tests in our environment with some test users and test data. I wanted to know what are tables that we need to purge when we complete the performance tests as we do not need the test data in our DB. Also, what is method/command to purge the data from the DB?
Regards,
Manju
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
IN
Hi Manjunath,
Do you mind taking a look into these Help topics and let us know if it helps your case?
Table trimming, purging, and archiving
Sample scripts for archiving and purging
Regards,
Pai G
IN
Thanks. Is the table PR_DATA_IH_FACT the only one that need to be purged? Are all the transactions written only to this database?
Also how to see if there is any data loss when the DB is unavailable?
Pai G
IN
Any update on this?
Pai G
IN
hi,
Any update on this?
Pai G
IN
Hi,
Any help on this will be highly appreciated. Can anyone let me know if anyone has an MS SQL query to purge the DB ?
Pegasystems Inc.
US
I think the best way to do this would have been to create a DB backup before you performed the testing and then restore back to it.
I don't think some SQL can be provided to you to perform this purge, as it will depend on how your application has been developed. You could empty out the work tables (what these are depend on your application configuration), but beyond that I'm unsure what out of the box tables (if any) you'd want to empty.
-
Venkateshwar Reddy Moogala Yong Sheng Loo
Pegasystems Inc.
US
It is unclear which tables would be effected as your testing could encompass just about anything. Nick's approach is best and by far the best practice. Take a backup at the point you want to restore to (after creating test users or before, for instance) and then restore to that point.
Anything beyond this solution would require consulting Pega Solutions.
Pai G
IN
Thanks Nick and Paul for your responses. Considering the production environment, how can we control the DB growth? We don't want all the data to be removed by restoring old backups. We might still need the meta data for the apps but some old transaction data (say 6 months old) might not be needed in production DB and we will have to archive the same if needed for future reference and then purge the DB. In this way our DB will be healthier and the performance also will be better. I just wanted to understand on what is the best way to manage the DB in this way.
Pegasystems Inc.
US
For production, you'll likely want to review the links provided by Lochan in her original response (and I'm sure related Support Community posts exist):
Table trimming, purging, and archiving
Sample scripts for archiving and purging
What you want to purge vs. archive is all dependent on your business needs.