Network Management

Configuration Wizard Fails Due to duplicate "FortinetFortiManager Orchestrator" key in ViewsByDeviceType Table after upgrading to SolarWinds Platform 2024.4

After upgrading to SolarWinds Platform 2024.4 may result in a violation of the PRIMARY KEY constraint 'PK_DeviceTypeViews' due to "FortinetFortiManager Orchestrator" key during the Configuration Wizard process.

First published date

10/28/2024 4:51 PM

Last published date

1/21/2026 5:12 PM

Overview

When upgrading to SolarWinds Platform 2024.4, you may encounter the following error when running the Configuration Wizard:

 

Database configuration failed:
Error while executing script - Violation of PRIMARY KEY constraint 'PK_DeviceTypeViews'. Cannot insert duplicate key in object 'dbo.ViewsByDeviceType'. The duplicate key value is (FortinetFortiManager Orchestrator).

Product section

Network Performance Monitor

Cause

This issue occurs due to a duplicate view key for "FortinetFortiManager Orchestrator" ('SdWan Orchestrator Summary') in the Views table and applies to SolarWinds Platform 2024.4 only.

Resolution

To resolve this issue, please upgrade to SolarWinds Platform 2024.4.1 and above.  If an upgrade is not possible, execute the following SQL script manually via SQL Server Management Studio:

  1. Open SQL Server Management Studio and connect to your SQL Server with an admin account.
  2. Expand Databases on the left, right-click the SolarWinds database and click New Query. A query window appears on the right.
  3. Paste the below query 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.

BEGIN
    IF NOT EXISTS(SELECT * FROM [dbo].[ViewsByDeviceType] WITH(NOLOCK) WHERE DeviceType = 'FortinetFortiManager Orchestrator')
   BEGIN
      INSERT INTO [dbo].[ViewsByDeviceType](DeviceType, ObjectType, ViewID)
      SELECT TOP 1 'FortinetFortiManager Orchestrator' AS DeviceType, 'N' AS ObjectType, v.ViewID
      FROM [dbo].[Views] v
      LEFT JOIN [dbo].[ViewsByDeviceType] vt ON vt.DeviceType = 'FortinetFortiManager Orchestrator'
      WHERE v.ViewKey = 'SdWan Orchestrator Summary' AND vt.ViewID IS NULL
      ORDER BY v.ViewID
   END
END
  • Explanation: This script checks whether the DeviceType 'FortinetFortiManager Orchestrator' already exists in the ViewsByDeviceType table. If it does not exist, it inserts a new record with this DeviceType and retrieves the corresponding ViewID.

After executing the script, run the Configuration Wizard again.