Network Management

Configuration Wizard failing with an executing script Column error "Column already has a DEFAULT bound to it"

This article explains how to fix Configuration Wizard when it is failing with an executing script Column error.

First published date

11/1/2018 10:08 PM

Last published date

3/15/2023 4:07 PM

Overview

  • This article provides more details and steps to fix an issue that occurs when running the Setup Wizard and fails with the following error:
image.png
Database configuration failed: Error while executing script Column already has a DEFAULT bound to it.

 
  • The following errors may be observed in the ConfigurationWizard.log:
[4] ERROR DBConfigProcessor - Error while executing script - Column already has a DEFAULT bound to it.
Could not create constraint or index. See previous errors..
 Error details: System.Data.SqlClient.SqlException (0x80131904): Column already has a DEFAULT bound to it.
Could not create constraint or index. See previous errors.
Error Number:1781,State:1,Class:16
 Failing Sql command:
ALTER TABLE [dbo].[Accounts] ADD  CONSTRAINT [DF_Accounts_ToolsetIntegration]  DEFAULT ('Y') FOR [ToolsetIntegration]
 

Product section

Network Performance Monitor

Cause

  • Configuration Wizard is trying to create an existing constraint.
  • A constraint for Toolset Integration already exists.

Resolution

1. Check the constraint name that the Configuration Wizard is trying to add to the database:
  • Go to ConfigurationWizard.log in C:\ProgramData\Solarwinds\Logs\Orion
  • Search for the following:
Failing Sql command:
ALTER TABLE [dbo].[Accounts] ADD  CONSTRAINT [DF_Accounts_ToolsetIntegration]  DEFAULT ('Y') FOR [ToolsetIntegration]
  • Get Constraint name.
  • In this case, the constraint is DF_Accounts_ToolsetIntegration
2. In the SQL Server Management Studio, run the following query below to discard the constraint:
Note: Make sure you have a backup of your database. In the query below you may change the constraint name according to what was found in the ConfigurationWizard.log
Additional Note: Look at the constraint in SQL Server Management Studio before running this query and adjust the constraint name as necessary. You may see a slightly different constraint name such as DF_Accounts_ToolsetIntegration_57
-- 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 1 from sys.objects where name = 'DF_Accounts_ToolsetIntegration')
ALTER TABLE [dbo].[Accounts] DROP CONSTRAINT [DF_Accounts_ToolsetIntegration]
 

3. Alternatively, you can manually delete this constraint in the SQL Server Management Studio:
  • Open the SQL Server Management Studio (SQL Server)
  • Go to the SolarWinds database > Expand Tables > dbo.Accounts > Right-click on  the constraint > Delete.
image.png
(Screenshot collected from MS SQL Server Management Studio on 10/10/2022)