3 Replies Latest reply on Oct 11, 2012 5:12 PM by phorensic

    Orion NPM Upgrade Error - Violation of PRIMARY KEY constraint


      Trying to upgrade old version of Orion NPM and APM (now SAM) to newest versions.  There is a matrix of upgrades we must go through.  When upgrading to NPM 10.2.2 we get the following error during the Configuration Wizard step:


      Database configuration failed:
      • Error while executing script- Violation of PRIMARY KEY constraint 'PK_APM_Tag'. Cannot insert duplicate key in object 'dbo.APM_Tag'.
      The statement has been terminated.

      The closest support document I can find that is related to our error is http://knowledgebase.solarwinds.com/kb/questions/3923/Configuration+Wizard+fails+when+upgrading+NPM+10.2.2+to+10.3

      They recommend running this SQL statement:

      IF EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[NetFlowTransactionLog]') AND name = N'PK_NetFlowTransactionLog')

      ALTER TABLE [dbo].[NetFlowTransactionLog] DROP CONSTRAINT [PK_NetFlowTransactionLog]

      If I run that and replace NetFlowTransactionLog with APM_Tag do you think it would let the configuration wizard complete, upgrade the database, create all the necessary services, etc?