How to archive incidents in Helpdesk

Article:HOWTO53151  |  Created: 2011-05-17  |  Updated: 2011-08-04  |  Article URL
Article Type
How To

Helpdesk has no built-in functionality to archive incidents. (Neither does its successor, ServiceDesk 7.x.) As a workaround, incidents can be moved out of the Helpdesk database and then accessed by custom reports. This effectively archives them, removing them from the normal Helpdesk environment.

Warning: The following instructions are provided "AS IS" as a workaround to Helpdesk having no out of box method to archive incidents. There are limitations to this workaround. Therefore, this workaround is not guaranteed to necessarily meet customer's needs for an incident archival process. Furthermore, as this is provided "AS IS", Symantec Technical Support is unable to assist customers in implementing, modifying or troubleshooting this workaround or any of the below procedures. This workaround should be used at the customer's sole risk.


This workaround imposes several limitations. These include:

  • Copying the incident records from the workitem table to the new workitem_archived table is a one way process. It's possible that selected archived incident records can be moved back, but this may result in issues. This article's scope does not include instructions on how to do this and on documenting potential issues if this fails to work. Note: Potential issues can arise because of the complexity of altering the Helpdesk database by inserting records into live production tables. If the associations involved are not clearly understood, an incident may be "unarchived" back into a production state but no longer show the correct number of comments, be assigned correctly to a worker or contact, or have business rules apply to it correctly. If this occurs, Symantec Technical Support is unable to assist the customer in correcting any issues with "unarchived" incidents.
  • Helpdesk has no ability to access archived incidents in any of its user interfaces, queries or reports. Therefore, the only way to see archived incident records is by using a custom report such as the included two sample ones. This means that these records cannot be viewed or edited or otherwise modified in any way by Helpdesk as its not aware of the custom workitem_archived table. 
  • If large comments were truncated, these will not be able to be viewed in their entirety very easily by custom reports. Reports show a table view, which limits the horizontal size of the column being displayed. To see a whole comment for an archived incident (which may be pages and pages long), copy the data from the custom report's table view into a Word or Excel file.

How to Archive Incidents in Helpdesk (a customization workaround)

Warning: Performing this workaround on a production Helpdesk server will result in permanent data loss due to how incidents are archived. Before beginning, therefore, it is strongly recommended to test this workaround in a test environment to ensure that it will work as expected.

  1. Backup the Helpdesk database. By default, this is "Altiris_Incidents". Backups are performed in SQL Server Management Studio. Note: These instructions here do not include detailed instructions on how to backup (or restore) the Helpdesk database. Refer to the DBA or Microsoft for further instructions on backing up databases.
  2. In SQL Server Management Studio, run the following SQL query. This will copy the incident table, "workitem", to a new custom table for archival.

    USE Altiris_Incidents -- If the name of the Helpdesk database is other than "Altiris_Incidents", change this reference to the different name.
    SELECT *
    INTO workitem_archived -- The name of the new incident archival table.
    FROM workitem
    -- This query can be modified to only archive, i.e., copy, certain incidents based on criteria. For example, if incidents are to be deleted as part
    -- of this archival process, these only can be copied instead of the entire incident list.
  3. Verify that the incident records were copied by running the following SQL query. Note: If Helpdesk is being used while these instructions are performed, the state of the workitem table may change, resulting in new incident records being made that are not in the new table.

    USE Altiris_Incidents -- If the name of the Helpdesk database is other than "Altiris_Incidents", change this reference to the different name.
    SELECT COUNT(*) AS 'Original Incident Record Count'
    FROM workitem -- The current incident record number.
    SELECT COUNT(*) AS 'Archived Incident Record Count'
    FROM workitem_archived -- The copied incident record number. These two counts should be the same. If not, a user has created one or more new incidents.
    -- Note: Variations of this script can be used by modifying the SELECT statement to only include specific incidents by using a WHERE clause.
    -- Refer to the DBA or Microsoft for further instructions on how to modify SQL scripts.
  4. Incidents can now be deleted, or if large comments exist, their comments truncated and the incidents otherwise left in Helpdesk.

    a. If incidents are to be deleted, use the Helpdesk console's Incidents > Delete Incidents function to perform this.
    b. If incident comments are to be truncated, follow the instructions from KB TECH145515:

    Slow performance, timeouts, out of memory errors or high CPU/w3wp.exe/IIS usage occurs when using Helpdesk

  5. Included as file attachments to this article are two custom reports. These directly access the new workitem_archived table and enable viewing of all archived incidents or specific ones. These can be imported by going into the Altiris Console's Reports section, right click on a folder to add the reports to, and then choose Import. Use these, or your own custom reports referring to the workitem_archived table, to view the archived incidents. Note: Records in the custom reports will not be able to be drilled down into or opened as they are not part of the workitem table.
  6. The archival process is now complete.

Related Article

Can Helpdesk 6.0 archive old incidents?


Article URL

Terms of use for this information are found in Legal Notices