4 Replies Latest reply on Aug 13, 2018 8:42 AM by lcsw2013

    SQL errors in the logs.

    lcsw2013

      Hi all,

       

      Question: I'm seeing a lot of errors related to an item with the same key already exist or a prinary key couldn't be updated due to duplicates and things of this nature. What's the best way to find the cause and get it to stop.

       

      Here is an exmaple:

      Violation of PRIMARY KEY constraint 'PK__#DownTim__913A95523B22EC15'. Cannot insert duplicate key in object 'dbo.#DownTimeEntitiesToMerge'. The duplicate key value is (Jun 26 2018 3:31PM, 10645, Orion.ADM.NodeInventory).

       

      Thanks,

      leandro

        • Re: SQL errors in the logs.
          lcsw2013

          These errors are annoying and I can't seem to find a way to fix the primary key issues to keep this from happening. I also get an item with the same key already exist error.  Can't figure out if this is bug related activity (Something in the code causing the error), or simply misconfiguration.

           

          Any feedback is appreciated.

          • Re: SQL errors in the logs.
            lcsw2013

            These errors continue but now they don't seem to be impeding on any functionality. Seems as after giving our sql a decent performance boost it's able to keep up with this error and not cause any noise on the tool. I'll call solarwinds and see if they can figure this out.

            • Re: SQL errors in the logs.
              alphabits

              You remember what the fix was here? Having the same issue with my custom poller hourly table not able to summarize, showing the same above error.

              I opened a case with support, but really getting the run around:

               

              2018-08-09 20:25:17,414 [4] ERROR SolarWinds.Data.DatabaseMaintenance.StandardTableHandlerDAL - Failed to execute procedure: dbm_CustomPollerStatistics_DetailToHourly

              System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'PK_CustomPollerStatistics_Hourly'. Cannot insert duplicate key in object 'dbo.CustomPollerStatistics_Hourly'.

               

              I've tried removing the row using database manager, but the next time its run it just throws this error on the next row :\

                • Re: SQL errors in the logs.
                  lcsw2013

                  So in my case, I'm still seeing the errors being logged in my environment. But it doesn't appear to be having any significant effect on functionality. So, it still remains a mystery and I had one support rep tell me it was a "non-issue". I just let it go instead of sweating over it. I would prefer if solarwinds only logged true issues in their logs but apparently they don't. They log non-impacting issues as well. Sorry, I'm sure this isn't the answer you where looking for. But best advice would be to let it be unless of course it is affecting functionality for you. Then support should be able to assist hopefully.