Upgrade Data Schema 8.7 to 24.1.2

Dear Members

I am facing issue while Upgrading Data Schema, below are the steps:-

Step1: I have updated setupDatabse.properties file with valid values.

Note: Before performing above step all the Step I have followed and it has been successfully completed.

Step2: After setting up all the required values saved the file and run the process from Batch with the below command :-

CMD > “upgrade.bat –dataOnly true”

This will run the batch process after few minute m getting the issue after few minutes like below :-

Exception in thread “main” com.pega.pegarules.install.SQLLoaderException: Error executing SQL statements
[java] at com.pega.pegarules.install.SQLLoader.load(SQLLoader.java:81)
[java] at com.pega.pegarules.install.SQLLoader.main(SQLLoader.java:66)
[java] Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: There is already an object named ‘p_contactorgrel’ in the database.

My queries is why this happen and what is the cause and how to fix.

Your valuable response is highly appriciated.

Thanks

Kasiviswanath

This error happens because P_CONTACTORGREL already exists in your database, and the upgrade script is trying to create it again, so SQL Server stops with a duplicate object error. In Pega Foundation for Insurance, P_CONTACTORGREL is one of the sample/customer data tables that must be removed before the upgrade, because the new import recreates these tables with the expected structure and data. The fix is to take a backup, drop P_CONTACTORGREL and the other sample tables listed in the upgrade guide from the required schemas, and then rerun upgrade.bat --dataOnly true. If your project is using any of those tables for real business data, back up that data first and restore it after the upgrade completes. This is why the issue happens, and clearing the existing table before rerunning the upgrade is the correct solution.