10.2 system update can fail to upgrade SQL database schema

  • 7003575
  • 18-Jun-2009
  • 27-Apr-2012

Environment

Novell ZENworks 10 Configuration Management with Support Pack 2 - 10.2 System Update

Situation

The system update installing 10.2 can fail to upgrade the SQL database schema with an error in the loader-messages.log like:
"...
[DEBUG] [6/10/09 9:28:10 PM] [] [Loader.SystemUpdateModule] [FINER: Error executing discovery_schema_update.sql] [FINER: Error executing discovery_schema_update.sql] [com.novell.zenworks.datamodel.exceptions.InternalDataModelException: Error executing SQL: alter table NC_NetworkDeviceBase
...
Caused by: java.sql.SQLException: The index 'idx_NC_NDB_PrimaryIPAddr' is dependent on column 'PrimaryIPAddress'.
..."

Resolution

The solution is to manually drop related indexes in the SQL database and reschedule the deployment of the system update.

Please contact Novell Technical Services, If you get such an error and need help to manually administer the SQL database.

Additional Information

The error on top appeared in an environment where ZENworks Configuration Management is configured to run with an Microsoft SQL 2005 database.

 This was missed in general testing of the system update as in the release testing setup the SQL schema changes went through without the need to drop those indexes.

 The following indexes can be dropped in the table NC_NetworkDeviceBase to fix this issue:
- idx_NC_NDB_DNSName
- idx_NC_NDB_PrimaryIPAddr
- idx_NC_NDB_PrimaryMACAddr

They get automatically recreated by the system update.

Future system updates should take care that the index for a specific table column gets always dropped before trying to change the definition of that column.