ZENworks 2017 upgrade fails due to missing zDevice column: PrimaryUserDataReset

  • 7021174
  • 03-Aug-2017
  • 03-Aug-2017

Environment

ZENworks Asset Management 2017 System Update
ZENworks Configuration Management 2017 System Update
ZENworks Endpoint Security Management 2017 System Update
ZENworks Full Disk Encryption 2017 System Update
ZENworks Patch Management 2017 System Update
Sybase Database
Microsoft SQL Server Database

Situation

  • Upgrading from ZENworks 11.4, 11.4.1, or 11.4.2 to ZENworks 2017
  • ZENworks 11.4.3 update was previously launched on a Primary Server
  • ZENworks 11.4.3 update was never completed on any of the Primary Servers
  • PrimaryUserDataReset column is missing from the zDevice table
The following is seen in the ZENworks_Upgrade_<date>_<time>.log.xml:

ERROR:
<Message><MessageID><![CDATA[0000]]></MessageID><MessageString><![CDATA[org.hibernate.exception.SQLGrammarException: [SAP][JDBC Driver][SQL Anywhere]Column 'PrimaryUserDataReset' not found
com.novell.zenworks.datamodel.exceptions.InternalDataModelException: org.hibernate.exception.SQLGrammarException: [SAP][JDBC Driver][SQL Anywhere]Column 'PrimaryUserDataReset' not found
    at com.novell.zenworks.datamodel.database.AbstractDatabaseTypeHelper.newStandardDataModelException(AbstractDatabaseTypeHelper.java:505)
...
Caused by: org.hibernate.exception.SQLGrammarException: [SAP][JDBC Driver][SQL Anywhere]Column 'PrimaryUserDataReset' not found
    at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:122)
...
Caused by: java.sql.SQLException: [SAP][JDBC Driver][SQL Anywhere]Column 'PrimaryUserDataReset' not found
    at sap.jdbc4.sqlanywhere.IConnection.nativePrepareStatement(Native Method)


The following is seen in the pre-global-actions.log for embedded Sybase database:

NOTE: This is not seen in the case of Microsoft SQL Server database. In the case of external SQL Server database, the run_preglobal_update log entry was missing on Linux and Windows primary servers.
Also, this is the only entry in the log for the 11.4.3 schema upgrade. None of the scripts were actually run.

ERROR:
[DEBUG] [03/28/2017 10:44:55.618] [15498] [SystemUpdateAdminImpl2] [40614] [zenworks] [SystemUpdate] [] [UpdateVersion: 11.4.3.23202, ServerVersion: 11.4.3.23202] [] [] [] [SystemUpdate]
[DEBUG] [03/28/2017 10:44:55.658] [15498] [SystemUpdateAdminImpl2] [40614] [zenworks] [SystemUpdate] [] [Checking if we should run PreGlobalActions: true] [] [] [] [SystemUpdate]
[DEBUG] [03/28/2017 10:44:55.697] [15498] [NativeLauncher] [40614] [zenworks] [SystemUpdate] [] [Running command: (env, /opt/novell/zenworks/bin/run_preglobal_update, -Dsystemupdateguid=5011040300fc50000000002016100814, -DstageBehavior=POSTPONE_STAGING, -DstageScheduleFile=5011040300fc50000000002016100814-schedule, -DrebootControl=SuppressRebootWithoutStartServices)] [] [] [] [SystemUpdate]
[DEBUG] [03/28/2017 10:44:55.700] [15498] [PreGlobalHandler] [40614] [zenworks] [SystemUpdate] [] [Successfully Launched external process for Schema Update] [] [] [] [SystemUpdate]

Resolution

  1. Contact Micro Focus Customer care for database scripts to fix this issue
  2. Run the provided database scripts on the ZENworks database
  3. Rerun the ZENworks 2017 upgrade on the Primary Server

Status

Reported to Engineering

Additional Information

The following is seen later in the pre-global-actions.log during the ZENworks 2017 upgrade:

ERROR:
[INFO] [05/08/2017 14:44:33.559] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [Preglobal version 11.4.3.23202 is higher than zone version : 11.4.0] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.560] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [Comparing UpdateVersion : 11.4.1 against the latest version :11.4.3.23202] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.560] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [ShouldRunUpdateScripts : false] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.560] [13616] [PreGlobalAction] [1] [root] [SystemUpdate] [] [Skipping processing of pre global action for the version : v_11_4_1 as current zone version 11.4.0 is newer.] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.561] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [Preglobal version 11.4.3.23202 is higher than zone version : 11.4.0] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.561] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [Comparing UpdateVersion : 11.4.2 against the latest version :11.4.3.23202] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.562] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [ShouldRunUpdateScripts : false] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.562] [13616] [PreGlobalAction] [1] [root] [SystemUpdate] [] [Skipping processing of pre global action for the version : v_11_4_2 as current zone version 11.4.0 is newer.] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.562] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [Preglobal version 11.4.3.23202 is higher than zone version : 11.4.0] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.563] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [Comparing UpdateVersion : 11.4.3 against the latest version :11.4.3.23202] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.563] [13616] [UpdateVersionComplianceUtil] [1] [root] [SystemUpdate] [] [ShouldRunUpdateScripts : false] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.563] [13616] [PreGlobalAction] [1] [root] [SystemUpdate] [] [Skipping processing of pre global action for the version : v_11_4_3 as current zone version 11.4.0 is newer.] [] [] [] [PreGlobalAction]


Additional logging in ZENworks 2017 pre-global-actions.log gives more insight into how this issue can occur:

ERROR:
[INFO] [05/08/2017 14:44:33.689] [13616] [PreGlobalAction] [1] [root] [SystemUpdate] [] [Setting pre-global version to : 12.0.1] [] [] [] [PreGlobalAction]
[DEBUG] [05/08/2017 14:44:33.696] [13616] [PreGlobalActionDAO] [1] [root] [SystemUpdate] [] [Updating zOpaqueData affected : 1 rows.] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.697] [13616] [PreGlobalAction] [1] [root] [SystemUpdate] [] [Updating schema to version : 12.0.1] [] [] [] [PreGlobalAction]
[INFO] [05/08/2017 14:44:33.702] [13616] [SystemUpdateExecutor] [1] [root] [SystemUpdate] [] [Need to perform 7 actions for upgrading to version : v_12_0_1] [] [] [] [PreGlobalAction]
[DEBUG] [05/08/2017 14:44:33.705] [13616] [SystemUpdateExecutor] [1] [root] [SystemUpdate] [] [Executing (ID=>0, Schema => ZCM, Action => EXEC_SQL, Version => v_12_0_1, Entry => /system-updates/v_12_0_1/sql-anywhere/core-addons_update.sql)] [] [] [] [PreGlobalAction]