Environment
Novell ZENworks Configuration Management 11.2 Installation - Server
Novell ZENworks Configuration Management 10.3
Microsoft SQL Server 2008 R2
Novell ZENworks Configuration Management 10.3
Microsoft SQL Server 2008 R2
Situation
Upgrading from ZCM 10.3 to ZCM 11.2
The upgrade fails during Pre-global Actions
From the ZENworks_Upgrade_<date>_<time>.log.xml:
Exception while upgrading database schema.
com.novell.zenworks.systemupdate.exceptions.SystemUpdateException: Unable to update database schema
Caused by: com.novell.zenworks.datamodel.exceptions.InternalDataModelException: Error executing SQL: CREATE PROCEDURE ZCM_PurgeHistory
From the pre-global-actions.log:
[PreGlobalAction]Error executing inventory_update.sql, will retry (1). Error: [Error executing SQL: CREATE PROCEDURE ZCM_PurgeHistory
Caused by: java.sql.SQLException: Must declare the scalar variable "@v_retaindate".
The upgrade fails during Pre-global Actions
From the ZENworks_Upgrade_<date>_<time>.log.xml:
Exception while upgrading database schema.
com.novell.zenworks.systemupdate.exceptions.SystemUpdateException: Unable to update database schema
Caused by: com.novell.zenworks.datamodel.exceptions.InternalDataModelException: Error executing SQL: CREATE PROCEDURE ZCM_PurgeHistory
From the pre-global-actions.log:
[PreGlobalAction]Error executing inventory_update.sql, will retry (1). Error: [Error executing SQL: CREATE PROCEDURE ZCM_PurgeHistory
Caused by: java.sql.SQLException: Must declare the scalar variable "@v_retaindate".
Resolution
Verify if the SQL Server instance or database has case-sensitive collation
Run the following on the ZCM database:
Server instance:
SELECT SERVERPROPERTY('COLLATION');
Database:
SELECT DATABASEPROPERTYEX('<database-name>', 'Collation') SQLCollation;
If either of these have case-sensitive collation, follow the SQL Server documentation to change the collation to a case-insensitive one.
Run the following on the ZCM database:
Server instance:
SELECT SERVERPROPERTY('COLLATION');
Database:
SELECT DATABASEPROPERTYEX('<database-name>', 'Collation') SQLCollation;
If either of these have case-sensitive collation, follow the SQL Server documentation to change the collation to a case-insensitive one.
Cause
In one case, the server instance had the collation of "SQL_Latin1_General_CP850_BIN2". This is a case-sensitive collation.
A variable name in one of the Pre-global Action scripts is declared with a capital letter and then used as all lower-case.
A variable name in one of the Pre-global Action scripts is declared with a capital letter and then used as all lower-case.
Additional Information
The need for a case-insensitive instance for the ZCM database is covered in "Database Requirements", part of "System Requirements" in https://www.novell.com/documentation/zenworks11/zen11_installation/data/bookinfo.html