Upgrade to AnalyticsPlus 5400 Fails for Users with Missing zsoid Values

Upgrade to AnalyticsPlus 5400 Fails for Users with Missing zsoid Values

Issue

Upgrading from builds between 5301 and 5360 to build 5400 fails because the zsoid field for some users is null.

Error Trace

java.sql.SQLException: This column [ZSOID] has some null values, hence it cannot be modified as not-null.

Cause

The issue arises because the zsoid field for some users has null values corresponding to their zuid. The Cloud team wrote the provided migration (solution) before 2019. The problem appears to affect customers who were previously on build version 4350. This specific build is no longer available for installation to test the scenario. 

Solution

The migration script needs to be executed to automatically generate the 'zsoid' values for users with missing data (null values) based on their corresponding 'zuid'.
We strongly recommend not attempting to use the upgrade failed AnalyticsPlus folder/instance.  Instead, consider restoring your application from a backup or snapshot created before the upgrade attempt.
  1. Download the patch file from the following link. 
    Build 5301:
    https://workdrive.zohoexternal.com/external/1ec3d1122ba55d2312235c30bcd53814080be62a281b6ce85ec41bcb16ed595d
    Build 5310:
    https://workdrive.zohoexternal.com/external/14ed95d7b5dc1ef694b6ca4563288d91fe89e75184b848fb4fa26bdfa7aa4c6d
    Build 5320:
    https://workdrive.zohoexternal.com/external/6a5ea294de2a3428ce12e095dd5ec8cdd2c0304c3b63b1dd4a614227ae686d57
    Build 5330:
    https://workdrive.zohoexternal.com/external/61c0a4c3681e19b85dc94fd2eda213fcfe66dafbfacb630d30f6d3ffb664016f
    Build 5340:
    https://workdrive.zohoexternal.com/external/19d396b8803e4bb3d81adbf0ba25ef28c712faa8488e7720250ca51aa3bd75ef
    Build 5350: 
    https://workdrive.zohoexternal.com/external/c01be9562b80bf46f675a3feba8c4fb924745165811959eb8aac582ebb71d6b8
    Build 5360:
    https://workdrive.zohoexternal.com/external/82b2cebc9daa8f19f47472d5d19abc06362f8edd025f2ec83c52dbf2159aecb9
  2. Create a new folder inside the <AnalyticPlus home> directory and name the folder "fixes" (If not already available).

  3. Move the downloaded patch file to the <AnalyticsPlus Home>/fixes folder.

  4. Restart the AnalyticsPlus service. 

Ensure that zsoid's are populated by executing the below query in DB Query tool (Settings >> Troubleshoot >> DB Query tool). Once the zsoid are populated, stop the service and proceed with upgrade.
Select zsoid from ZDBUserPlan;

                  New to ADSelfService Plus?

                    • Related Articles

                    • Upgrade issue in build 3200

                      Upgrade issue in build 3200 The below cases were identified in local system and couple of customer's system during 3200 upgrade. Issue 1: PGSQL migration fails: Since this upgrade will upgrade pgsql version, pgsql has its own upgrade prior to ...
                    • Data import via localdb fails with timeout error

                      Issue: SQL query timeouts after upgrade to version 4000. Analysis:  The timeout error pops up before generating the data preview. Log traces: [14:34:01:353]|[12-04-2018]|[SYSERR]|[INFO]|[128]:  ...
                    • Failed to upgrade to build 5300/5301

                      Issue: Upgrade fails while attempting to upgrade to the build 5300/5301. Cause: Upgrade fails due to a necessary system property required for logging slow queries is missing. This issue will arise while attempting to upgrade to the ...
                    • Upgrade failure

                      Issue: Upgrade fails with error - "Error occurred :: Irrevertable exception occurred" Analysis: Tried to start database manually, but it fails to start. Antivirus has been disabled/uninstalled. Log Traces: Aug 10, 2016 4:02:37 PM ...
                    • AnalyticsPlus Startup issue

                      Issue: Unable to start the services when there is a formula column created with static data Cause: When a formula column holds static data static data (like 123 or 1*24)  then those data types are stored as INT4 or INT8 or float8 because which the ...