4 Replies Latest reply on Oct 30, 2014 9:26 AM by bmagurn

    Primary Key Constraint violation when resolving call in 7.5

    chrisjgill Apprentice

      We experienced the following issue in Service Desk 7.5 when resolving an incident:

       

      Violation of Primary Key Constraint "PK_tps_user_1B09D325" cannot insert duplicate key in object dbo.tps.user

      The duplicate key value is (3635da9c-1cca-43e2-8e77-b91c36cc5497)

      The statement has been terminated.

       

      Prior to this happening, the user who experienced the error had performed some administration tasks on an anaylst record.

       

      The above could be un-related but worth mentioning.

       

      Has anyone seen this error before?

        • 1. Re: Primary Key Constraint violation when resolving call in 7.5
          Jamie Cannon ITSMMVPGroup

          Was an Analyst or End User record deleted by chance?  It's possible that the issue is that in the database an Analyst record (or End User) has been flagged as "is_Deleted" on the tps_user table.  If this is the case, try setting that back to 0 and see if you get the same error.  It's trying to insert an identical GUID into the tps.user table.  i'd do a search on that guid to see what you return in the database.

           

          Select * from tps_user where tps_guid = '3635da9c-1cca-43e2-8e77-b91c36cc5497'

           

          It'd be worth seeing what you get.

          1 of 1 people found this helpful
          • 2. Re: Primary Key Constraint violation when resolving call in 7.5
            chrisjgill Apprentice

            HI Jamie

             

            I ran that query against the DB but it returned 0 results - I will check with the user who raised the issue.

             

            Thanks

            Chris

            • 3. Re: Primary Key Constraint violation when resolving call in 7.5
              bmagurn Apprentice

              I had this issue. 

              It happened when an incident had been unresolved and then users attempted to resolve the incident again.

              I contacted support and the issue was that the process from unresolve was not linked back to "open", instead it was linked to in progress, or something like that.

              Apparently b/c of that, there wasn't a new GUID generated for the unresolved incidnet, and the second resolve was throwing the duplicate key error.

               

              Changing the process to link the unresolve all the way back to open fixed the issue for any newly created or resolved incidents.  But it did not fix any existing incidents that had been unresolved.

              I would up giving a few trusted analyst the ability to close incidents and that was the workaround for existing incidents, close them rather than resolving them a second time.

              • 4. Re: Primary Key Constraint violation when resolving call in 7.5
                bmagurn Apprentice

                actually my issue was referencing a different object: dbo.im_incident_resolution. 

                so it probably has nothing to do with this issue.