This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

"Database configuration failed" after NPM 12.2 to 12.4 upgrade

Configuration Wizard fails with the following message after updating NPM 12.2 to 12.4 with an offline installer:

Database configuration failed:

  •  Error while executing script- Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

The statement has been terminated.

The statement has been terminated.

Screen Shot 2019-03-24 at 12.11.07 AM.png

About to submit a support case, yet wanted to check if there is a known fix. Seeing these two related posts on the forums:

Thanks for any hints.

  • Have not - will check it out - thank you!

  • Doesn't look like this KB applies to my case:

    • See no duplicate "viewkey" entries (out of 122 total) - pasted into a Google Sheet, checked for duplicates.
    • See no two primary pollers in any of the places the article suggest checking.
  • Can you go to path: C:\ProgramData\Solarwinds\Logs\Orion\ConfigurationWizard.log and paste here what the most recent log says?

  • Most recent are these - are they relevant? (The file is almost 6MB, spanning about 10 minutes.) Looks like the relevant entries are earlier in the log.

    2019-03-23 23:32:09,810 [1] DEBUG Iis8Configurator - Detecting if IIS8 is installed

    2019-03-23 23:32:09,935 [1] ERROR ConfigurationProgressScene - Thread ConfigurationProgressScene.DoConfigInThread finished due to error

    2019-03-23 23:34:15,537 [1] INFO  MainForm - Form closing: SceneType is Configuration finish.

    2019-03-23 23:34:15,584 [1] INFO  OipClient - Tracking event: ConfigurationWizard - Completed - MainForm: Total Time in Configuration Wizard: 0 hours 13 minutes 54 seconds. - True - 834219

    2019-03-23 23:34:15,631 [1] INFO  MainForm - Form closed.

    2019-03-23 23:34:15,740 [1] DEBUG CwMetricMonitor - Inserting CW metrics into database.

    2019-03-23 23:34:15,803 [1] DEBUG SqlHelper - SQL: INSERT INTO [dbo].[ConfigWizardMetric]

        ([SessionId]

        ,[Started]

        ,[Duration]

        ,[InstallationType]

        ,[EvalType]

        ,[TerminationMode])

    VALUES

        (@sessionId

        ,@started

        ,@duration

        ,@installationType

        ,@evalType

        ,@terminationMode) (sessionId=3b8cf826-c0ed-418c-a516-3a5d9407d07c, started=3/24/2019 6:20:49 AM, duration=638, installationType=FULL, evalType=Advanced, terminationMode=2)

    2019-03-23 23:34:15,865 [1] DEBUG SqlHelper - SQL: INSERT INTO [dbo].[ConfigWizardMessage]

        ([MessageId]

        ,[SessionId]

        ,[CwMessageType]

        ,[Message])

    VALUES

        (@messageId

        ,@sessionId

        ,@cwMessageType

        ,@message) (messageId=1, sessionId=3b8cf826-c0ed-418c-a516-3a5d9407d07c, cwMessageType=1, message= •  Error while executing script- Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    The statement has been terminated.

    The statement has been terminated.

    )

    2019-03-23 23:34:15,928 [1] INFO  CwMetricMonitor - Saving metrics into DB passed - truncating temp files:

    C:\Users\gerua001\AppData\Local\Temp\SolarWinds\OIP\ConfigWizardMetric.csv

    C:\Users\gerua001\AppData\Local\Temp\SolarWinds\OIP\ConfigWizardMessage.csv

    2019-03-23 23:34:15,979 [1] DEBUG CwMetricMonitor - Publishing of metrics disabled by OIP OptIn registry key.

    2019-03-23 23:34:16,041 [1] INFO  ProgramStarter - Configuration Wizard finished.

    2019-03-23 23:34:16,105 [1] INFO  OipClient - Tracking event: ConfigurationWizard - Finish - Configuration Wizard finished. - True - 0

    2019-03-23 23:34:16,152 [1] DEBUG OipClient - { FinishEventsTransmission entered

    2019-03-23 23:34:16,183 [1] INFO  OipClient - All uploads finished successfully.

    2019-03-23 23:34:16,214 [1] DEBUG OipClient - } FinishEventsTransmission exited

    2019-03-23 23:34:18,571 [1] DEBUG OipClient - { FinishEventsTransmission entered

    2019-03-23 23:34:18,633 [1] INFO  OipClient - All uploads finished successfully.

    2019-03-23 23:34:18,696 [1] DEBUG OipClient - } FinishEventsTransmission exited

    2019-03-23 23:34:18,852 [1] INFO  ProgramStarter - Switching Terminal Server Session to Execute mode.

    2019-03-23 23:34:18,915 [1] DEBUG ProgramStarter - RunProgram FileName: 'change', Arguments: 'user /execute', WindowStyle: 'Hidden'.

    2019-03-23 23:34:19,010 [1] DEBUG ProgramStarter - RunProgram started Process ID: '12928'.

    2019-03-23 23:34:19,118 [1] DEBUG OipClient - { FinishEventsTransmission entered

    2019-03-23 23:34:19,172 [1] INFO  OipClient - All uploads finished successfully.

    2019-03-23 23:34:19,235 [1] DEBUG OipClient - } FinishEventsTransmission exited

    2019-03-23 23:34:19,375 [1] DEBUG OipClient - { FinishEventsTransmission entered

    2019-03-23 23:34:19,439 [1] INFO  OipClient - All uploads finished successfully.

    2019-03-23 23:34:19,502 [1] DEBUG OipClient - } FinishEventsTransmission exited

    Below are entries with the first "Subquery returned more than"... occurrence - which happened on line 147205 of the log (here, line 30).

    IF (dbo.GetVimDbVersion() < 9)

    BEGIN

        -------------------------------------

        -- Renaming the old "Top XX VMs by Overallocated CPU" to "Top XX VMs by Overallocated vCPUs"

        UPDATE dbo.Resources

            SET ResourceName = 'Top XX VMs by Overallocated vCPUs'

            WHERE ResourceName = 'Top XX VMs by Overallocated CPU'

                AND (ResourceFile = '~/Orion/VIM/resources/VManSprawl/TopXXVMCpuOverallocated.ascx' OR ResourceFile = '/Orion/VIM/resources/VManSprawl/TopXXVMCpuOverallocated.ascx')

        UPDATE dbo.Resources

            SET ResourceTitle = N'Top XX VMs by Overallocated vCPUs'

            WHERE ResourceTitle = N'Top XX VMs by Overallocated CPU'

                AND (ResourceFile = '~/Orion/VIM/resources/VManSprawl/TopXXVMCpuOverallocated.ascx' OR ResourceFile = '/Orion/VIM/resources/VManSprawl/TopXXVMCpuOverallocated.ascx')

        -------------------------------------

        -- Renaming the old "Top XX VMs by Underallocated CPU" to "Top XX VMs by Underallocated vCPUs"

        UPDATE dbo.Resources

            SET ResourceName = 'Top XX VMs by Underallocated vCPUs'

            WHERE ResourceName = 'Top XX VMs by Underallocated CPU'

                AND (ResourceFile = '~/Orion/VIM/resources/VManSprawl/TopXXVMCpuUnderallocated.ascx' OR ResourceFile = '/Orion/VIM/resources/VManSprawl/TopXXVMCpuUnderallocated.ascx')

        UPDATE dbo.Resources

            SET ResourceTitle = N'Top XX VMs by Underallocated vCPUs'

            WHERE ResourceTitle = N'Top XX VMs by Underallocated CPU'

                AND (ResourceFile = '~/Orion/VIM/resources/VManSprawl/TopXXVMCpuUnderallocated.ascx' OR ResourceFile = '/Orion/VIM/resources/VManSprawl/TopXXVMCpuUnderallocated.ascx')

    END

    2019-03-23 23:32:08,999 [11] ERROR ConfigurationProgressScene - Error while executing script- Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    The statement has been terminated.

    The statement has been terminated.

    SolarWinds.ConfigurationWizard.Common.ConfigurationException: Error while executing script- Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    The statement has been terminated.

    The statement has been terminated.

       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.Common.ModuleHelper.ConfigureDatabase(IOrionConfigHost host, ConfigurationProgressDelegate progress, ConfigurationLogDelegate logger, String dbStructureFile, String dbConfigFile, String initialWebConfigFile)

       at SolarWinds.ConfigurationWizard.Plugin.VIM.VIMPlugin.ConfigureDatabase(IOrionConfigHost host, ConfigurationProgressDelegate progress, ConfigurationLogDelegate log)

       at SolarWinds.ConfigurationWizard.Plugin.VIM.VIMPlugin.DoConfigure(IOrionConfigHost host, IComponentInfo component, ConfigurationProgressDelegate progress, ConfigurationLogDelegate log)

       at SolarWinds.ConfigurationWizard.Plugin.Common.OrionConfigPlugin.SolarWinds.ConfigurationWizard.Common.IOrionConfigPlugin.DoConfig(IOrionConfigHost host, IComponentInfo component, ConfigurationProgressDelegate progress, ConfigurationLogDelegate log)

       at SolarWinds.ConfigurationWizard.Host.Presentation.CommonConfiguration.ConfigurationProgressScene.DoConfigForComponents(ICollection`1 ids, ComponentType componentType)

    2019-03-23 23:32:09,073 [1] TRACE ConfigurationProgressScene - Updating progress bars (input: 1 4 6 63) (output: 1 4 25 252)

    2019-03-23 23:32:09,122 [1] INFO  OipClient - Tracking event: ConfigurationWizard - ConfigurationProgressScene - UpdateFailureText: •  Error while executing script- Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.

    The statement has been terminated.

    The statement has been terminated.

    - False - 0

  • I would look into this in the database and see if there are duplicate view ID's

    1. UPDATE dbo.Resources 
    2.         SET ResourceTitle = N'Top XX VMs by Underallocated vCPUs' 
    3.         WHERE ResourceTitle = N'Top XX VMs by Underallocated CPU' 
    4.             AND (ResourceFile = '~/Orion/VIM/resources/VManSprawl/TopXXVMCpuUnderallocated.ascx' OR ResourceFile = '/Orion/VIM/resources/VManSprawl/TopXXVMCpuUnderallocated.ascx') 
    5. END 
  • Same issue going from 12.3 to 2019.4...any advice on how to move past this error?

  •  

    Hello ,

    How you resolved this issue as i am getting same error.please help.

  • I believe 's posts about duplicate view IDs and how to find / remove them resolved this for me - but can't remember now, and can't find that KB article he linked to...