Delete Excess Notes From Incidents

Version 4

    Verified Product Versions

    Service Desk 2017.x


    Excessive notes exist on an item within Service Desk.



    This is often caused by a looping emails caused by a variety of reasons.



    In order to address this issue, SQL statements must be run against the database to purge out the excess records.


    Verify the records desired:

    SELECT * FROM im_incident_note

    INNER JOIN pm_process ON pm_process.pm_guid = im_incident_note.im_incident_guid

    WHERE pm_extended_id = 'I:X'


    Remove the records no longer desired:

    DELETE FROM im_incident_note

    WHERE im_incident_guid = (

         SELECT pm_process.pm_guid FROM pm_process

         WHERE pm_process.pm_extended_id = 'I:X')

         AND im_serial_number > 1


    In both of the examples above, X represents the incident number in the user interface to be edited.

    For the DELETE statement, im_serial_number may be edited to preserve any number of notes desired.



    As with all scripts, please test in a development environment first to ensure it works as you desire.  Always perform a full backup before executing changes in production.