Close popover
Tarini Prasad Dash (TariniDash)
Cognizant Technology Solutions India Ltd.
Cognizant Technology Solutions India Ltd.
TariniDash Member since 2011 27 posts
Cognizant Technology Solutions India Ltd.
Posted: June 4, 2015
Last activity: July 17, 2017

Delete safely rulesets through SQL script

Customer has three regions and they are full of junk rule and data. How can we delete rulesets in bulk safely through SQL script?

Pega provided Ruleset delete wizard is not working properly to delete a ruleset. It's stuck and shows the screen calculating ...rule count. I tried deleting version wise but that will take months to delete all the rulesets as there are 100s of rulesets. Any idea or suggestion.?

I am thinking to do it as below. Can somebody sugest this is a safe way to do it?

Back up


Create Table pr4_base_bck as select * from pr4_base where pyRuleSet = ‘RulesetName’

Create Table pr4_fieldvalue_bck as select * from pr4_fieldvalue where pyRuleSet = ‘RulesetName’

Create Table pr4_rule_bck where as select * from pr4_rule where pyRuleSet = 'RulesetName'

Create Table pr4_rule_file_bck as select * from pr4_rule_file where pyRuleSet = 'RulesetName'

Create Table pr4_rule_flow_bck as select * from pr4_rule_flow where pyRuleSet = 'RulesetName'

Create Table pr4_rule_property_bck as select * from pr4_rule_property where pyRuleSet = 'RulesetName'

Create Table pr4_rule_sysgen_bck as select * from pr4_rule_sysgen where pyRuleSet = 'RulesetName'



delete from pr4_base where pyRuleSet = ‘RulesetName’

delete from pr4_fieldvalue where pyRuleSet = ‘RulesetName’

delete from pr4_rule where pyRuleSet = 'RulesetName'

delete from pr4_rule_file where pyRuleSet = 'RulesetName'

delete from pr4_rule_flow where pyRuleSet = 'RulesetName'

delete from pr4_rule_property where pyRuleSet = 'RulesetName'

delete from pr4_rule_sysgen where pyRuleSet = 'RulesetName'

***Updated by moderator: Marissa 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.

System Administration Data Integration
Moderation Team has archived post,
Close popover This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.