1 Reply Latest reply on Jun 26, 2019 9:08 PM by Terese Ungren

    Cannot delete User because the record is associated with other data that cannot be deleted.

      Share This:

      Anybody ever run into this one when trying to clean up the Users table? They don't have any associated Assets, which is usually the only thing I run into that prevents their record from being deleted.

       

      CannotDeleteUser.JPG

        • 1. Re: Cannot delete User because the record is associated with other data that cannot be deleted.
          Terese Ungren

          I was able to get this resolved today with the help from BMC Techs.  I executed a statement and then was able to delete the user or technician.  Ill use John Doe (username jdoe) for my example.

           

          1. Log into the Trackit Server "Mudkip"

          2. Log into the Trackit DB in SQL Server Management Studio

          3. Backup the database

          4. Execute one of the following statements

               a. FOR TECHICIAN: UPDATE WorkOrderClockState SET ActivatedById=NULL WHERE ActivatedById IN (SELECT ID FROM STAF WHERE LOGIN='jdoe')
              b. FOR USER: UPDATE AssetTagCaptureLog SET USERID = NULL WHERE USERID IN ( SELECT USERID FROM TIUSER WHERE FULLNAME IN ('John Doe' ))

          4. Delete the USER or TECHNICIAN

          ***You can also try this statement to delete a user: DELETE FROM TIUSER WHERE FullName='John Doe'

          1 of 1 people found this helpful