Why do I get an error when upgrading from NetIQ Vulnerability Manager 5.0 to 5.5?
Why is the upgrade unable to drop the VigRoles.RoleScope column?
How do I correct a RoleScope error that occurs during upgrade?
What causes the upgrade to NetIQ Vulnerability Manager 5.x to fail?
NetIQ Vulnerability Manager 5.0 5.5
NetIQ Vulnerability Manager 5.x
NetIQ Vulnerability Manger 5.0
Error upgrading from NetIQ Vulnerability Manager 5.0 to 5.5
ERROR: "[ODBC SQL Server Driver][SQL Server]The objectll'DF_VigRoles_RoleScope_1' is dependent on column 'RoleScope'. [Microsoft][ODBC SQL Server Driver][SQL Server]ALTER TABLE DROP COLUMN RoleScope failed because one or more objects access this column."
The upgrade is trying to drop the VigRoles.RoleScope column. Due to the presence of a default constraint called DF_VigRoles_RoleScope_1 that was not dropped, it cannot drop the VigRoles.RoleScope column.
The upgrade script assumes that the constraint is named DF_VigRoles_RoleScope (Without the "_1").
In most cases the constraint is named DF_VigRoles_RoleScope, but in one particular case it might be named DF_VigRoles_RoleScope_1. There is a step in the version 3.0 to version 4.0 upgrade script that adds the constraint named as DF_VigRoles_RoleScope_1. This will probably be true for all customers that have upgraded from version 3.0 to version 4.0.
To solve the problem:
- Back up the NVM database.
- In MSSQL Query Analyzer, run the following script immediately before running the upgrade:
-- Fix for ENG164140
IF EXISTS (SELECT * FROM DBO.SYSOBJECTS WHERE ID = OBJECT_ID(N'[dbo].[DF_VigRoles_RoleScope_1]'))
IF (OBJECT_ID('dbo.DF_VigRoles_RoleScope_1') IS NOT NULL) AND
(OBJECTPROPERTY(OBJECT_ID('dbo.DF_VigRoles_RoleScope_1'), 'IsDefaultCnst') = 1)
-- Drop constraint that was not taken care of in upgrade script
ALTER TABLE dbo.VigRoles Drop Constraint DF_VigRoles_RoleScope_1