Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Exception while upgrading from PRPC 6.2 SP2 to Pega 7.1.7



You are upgrading Pega platform from PRPC 6.2 SP2 version to PEGA 7.1.7.
In development environment you successfully completed the upgrade to PEGA 7.1.7 split –schema setup.
In order to update test environment you imported the previously upgraded PEGA_RULES schema and upgraded only the PEGA_DATA one with dataOnly directive set to true.

Following are the steps performed:

1. Creation of PEGA_71_RULES schema, on our test environment database, by import of the PEGA_RULES schema dump from previously upgraded development environment.
2. Creation of PEGA_71_DATA schema, on test environment database, by importing PEGA 6.2 schema from production environment (which contains both rules and data).
3. Creation of PEGA_UPG_ORCL user.
4. Configuration of file.
5. Execution of the command: “nohup –dataOnly true”.

The procedure fails with the following exception. 

/home/oracle/upgrade_pega_7_1_7_20150423/Pega717/scripts/setupDatabase.xml:2192: Java returned: 1

[java] 2015-04-23 15:50:52,448 [ sytelol01] [ STANDARD] [ ] ( external.util.Application) ERROR - A problem occurred.
[java] Problem #1, SQLState 23000, Error code 1: java.sql.BatchUpdateException: ORA-00001: unique constraint (PEGA_71_RULES.PR_DATA_RESTORE_PK) violated

Error Messages

[java] Problem #1, SQLState 23000, Error code 1: java.sql.BatchUpdateException: ORA-00001: unique constraint (PEGA_71_RULES.PR_DATA_RESTORE_PK) violated

Steps to Reproduce

1 Take a database dump from a PRPC 6.2 SP2 Pega environment.
2 Upgrade the environment from PRPC 6.2 SP2 to Pega 7.1.7 split schema mode.
3 Setup a new PEGA_RULES schema that is a copy of the PEGA_RULES schema created in the previous step.
4 Setup a new PEGA_DATA schema that is the import of the database dump previously taken in step 1.
5 Execute the upgrade script with -dataOnly switch set to true.

Root Cause

The pc_data_uniqueid table (in Data schema) values are out of sync with the pr_data_restore table (in Rules schema). They are out of sync following the import of the PEGA_RULES schema dump from an existing 7.1.7 system (step 1) and the creation of PEGA_71_DATA schema, by import of the PEGA 6.2 schema (step 2). The imported 7.1.7 rules schema will have pr_data_restore containing HOTFIXORDER-nn values whereas the pc_data_uniqueid table from 6.2 will not have a corresponding existing entry for the HOTFIXORDER-nn (as it is new in 7.1.7) so will consequently start again at 1.


Use the procedure below to resolve the immediate issue with the Test system upgrade.
In the lower environment (DEV) you are promoting the updated rules schema from  run this query to get the current pylastreservedid value from the pc_data_uniqueid table.
    select pylastreservedid from pc_data_uniqueid where pzinskey like '%HOTFIXORDER-%';
This query will return a number, for this example assume it returns the value 4.
In the higher environment you copied the upgraded rules schema to (Test) then update the pylastreservedid value in pc_data_uniqueid table to match what is in the lower environment (DEV) like this
    update pc_data_uniqueid set pylastreservedid=4 where pzinskey like '%HOTFIXORDER%';

Continue on with upgrading the data schema by rerunning the command:  upgrade.bat --dataOnly true.

Alternatively, if performing the operation from the beginning, do not include the pr_data_products and pr_data_restore table data in the rules schema move. 

Published May 12, 2015 - Updated October 8, 2020

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us