Network Management

Configuration Wizard fails with an "The object 'PK_NCM_FlashFiles' is dependent on column 'FlashFileName'." error after upgrading to SolarWinds Platform 2024.1 - 2024.2

In SolarWinds Platform 2024.1 - 2024.2, the Configuration Wizard fails with an error message of "Error while executing script- The object 'PK_NCM_FlashFiles' is dependent on column 'FlashFileName'."

First published date

10/19/2024 3:02 PM

Last published date

11/21/2024 3:22 PM

Overview

When running the Configuration Wizard, it fails with the following error message:


ERROR TaskAdapter - Error running task Orion.ConfigureDatabase SolarWinds Platform Database
SolarWinds.ConfigurationWizard.Common.ConfigurationException: Error while executing script- The object 'PK_NCM_FlashFiles' is dependent on column 'FlashFileName'.
ALTER TABLE ALTER COLUMN FlashFileName failed because one or more objects access this column.
at SolarWinds.ConfigurationWizard.Plugin.Common.DBConfigProcessor.ExecuteSqlBatch(IDbConnection connection, String sqlQuery, ConfigurationLogDelegate configLog)
at SolarWinds.ConfigurationWizard.Plugin.Common.DBConfigProcessor.Process(IDbConnection connection, ConfigurationProgressDelegate progress, String scriptFile, ConfigurationLogDelegate logger)
at SolarWinds.ConfigurationWizard.Plugin.Orion.ConfigureDatabase.RunSync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken)
at SolarWinds.ConfigurationWizard.Common.TaskEngine.ConfigurationWizardTaskBaseSynchronous.RunAsync(IConfigurationWizardTaskProgressReporter progressReporter, CancellationToken cancellationToken)
at SolarWinds.ConfigurationWizard.Host.TaskEngine.TaskAdapter.<RunAsync>d__47.MoveNext()


Failing SQL command:

IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'NCM_Cisco_FlashFiles' AND TABLE_SCHEMA='dbo' AND COLUMN_NAME = 'FlashFileName' AND IS_NULLABLE <> 'YES')
BEGIN
ALTER TABLE [dbo].[NCM_Cisco_FlashFiles] ALTER COLUMN [FlashFileName] [nvarchar](255) NULL
END

Product section

Network Performance Monitor

Cause

This issue occurs due to a stored procedure for "Wireless_Nodes_DeleteOrphans" fails due to deadlocks.

Resolution

To resolve this issue, please upgrade to SolarWinds Platform 2024.4 and above.  If an upgrade is not possible, please the following steps below:

Note: Please make sure your database has a recent backup before performing manual changes using the steps below.

To workaround this issue, drop the PK_NCM_FlashFiles, update the table, re-add the PK_NCM_FlashFiles, and then run the Configuration Wizard.
This can be done manually through SQL Server Management Studio or by executing the below query using the Database Manager.

To run the query in Database Manager:

  1. Connect to the SolarWinds Platform server.
  2. Open Database Manager from the SolarWinds Platform folder of the Start menu.
  3. Click Add Orion Server. The SQL Server instance is displayed on the left.
  4. Expand the SQL Server instance, right-click the SolarWinds database in bold, and click New Query.
  5. Paste the below query in the window on the right, and click Execute query.
    -- Scripts are not supported under any SolarWinds support program or service.
    -- Scripts are provided AS IS without warranty of any kind. SolarWinds further
    -- disclaims all warranties including, without limitation, any implied warranties
    -- of merchantability or of fitness for a particular purpose. The risk arising
    -- out of the use or performance of the scripts and documentation stays with you.
    -- In no event shall SolarWinds or anyone else involved in the creation,
    -- production, or delivery of the scripts be liable for any damages whatsoever
    -- (including, without limitation, damages for loss of business profits, business
    -- interruption, loss of business information, or other pecuniary loss) arising
    -- out of the use of or inability to use the scripts or documentation.
    
    IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'NCM_Cisco_FlashFiles' AND TABLE_SCHEMA='dbo' AND COLUMN_NAME = 'FlashFileName' AND IS_NULLABLE <> 'YES')
    BEGIN
    ALTER TABLE [dbo].[NCM_Cisco_FlashFiles] DROP CONSTRAINT [PK_NCM_FlashFiles]
    
    ALTER TABLE [dbo].[NCM_Cisco_FlashFiles] ALTER COLUMN [FlashFileName] [nvarchar](255) NULL
    
    ALTER TABLE [dbo].[NCM_Cisco_FlashFiles]
    ADD CONSTRAINT [PK_NCM_FlashFiles] PRIMARY KEY CLUSTERED ([EntityID] ASC)
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, 
    ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    END
  6. How to run the Orion Configuration Wizard in the Orion Platform.

 

To run the query in SQL Server Management Studio:

  1. Connect to the Orion database with SQL Server Management Studio
  2. Open a new query window.
  3. Paste the below query in the window on the right, and click Execute.
    -- Scripts are not supported under any SolarWinds support program or service.
    -- Scripts are provided AS IS without warranty of any kind. SolarWinds further
    -- disclaims all warranties including, without limitation, any implied warranties
    -- of merchantability or of fitness for a particular purpose. The risk arising
    -- out of the use or performance of the scripts and documentation stays with you.
    -- In no event shall SolarWinds or anyone else involved in the creation,
    -- production, or delivery of the scripts be liable for any damages whatsoever
    -- (including, without limitation, damages for loss of business profits, business
    -- interruption, loss of business information, or other pecuniary loss) arising
    -- out of the use of or inability to use the scripts or documentation.
    
    IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'NCM_Cisco_FlashFiles' AND TABLE_SCHEMA='dbo' AND COLUMN_NAME = 'FlashFileName' AND IS_NULLABLE <> 'YES')
    BEGIN
    ALTER TABLE [dbo].[NCM_Cisco_FlashFiles] DROP CONSTRAINT [PK_NCM_FlashFiles]
    
    ALTER TABLE [dbo].[NCM_Cisco_FlashFiles] ALTER COLUMN [FlashFileName] [nvarchar](255) NULL
    
    ALTER TABLE [dbo].[NCM_Cisco_FlashFiles]
    ADD CONSTRAINT [PK_NCM_FlashFiles] PRIMARY KEY CLUSTERED ([EntityID] ASC)
    WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, 
    ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    END
    GO
  4. How to run the Orion Configuration Wizard in the Orion Platform.