Environment
Novell ZENworks Configuration Management 11.4 Database
Microsoft SQL Database Server
Situation
While performing the 11 SP4 Upgrade, the following error is encountered in the install wizard:
Error
ZENworks detects that there are user-generated statistics in the ZENworks database.
Since ZENworks changes a few columns from Not null to Null or vice-versa, this causes the upgrade to fail.
To continue with the process, clear the generated statistics.
Error
ZENworks detects that there are user-generated statistics in the ZENworks database.
Since ZENworks changes a few columns from Not null to Null or vice-versa, this causes the upgrade to fail.
To continue with the process, clear the generated statistics.
Resolution
1. Backup the complete database.
2. Run the following query and save the queries that are generated from it:
select 'DROP STATISTICS '+object_name(object_id)+'.'+name from sys.stats where user_created=1
3. Run the queries that were generated from the query in step 2.
4. Run the upgrade.
2. Run the following query and save the queries that are generated from it:
select 'DROP STATISTICS '+object_name(object_id)+'.'+name from sys.stats where user_created=1
3. Run the queries that were generated from the query in step 2.
4. Run the upgrade.
Cause
Statistics generated prevent changes to columns and indexes and will fail.