ServiceDesk

 View Only
  • 1.  Deleting Tickets In Symantec Service desk 7.1 sp2

    Posted Oct 23, 2012 08:23 AM

    Hi guys,

    I have a small problem we have inbound email monitoring on and now we have few tickets created which shouldn't be there. Is ther any way we can delete them of the database. Any SQL query.



  • 2.  RE: Deleting Tickets In Symantec Service desk 7.1 sp2

    Posted Oct 23, 2012 10:35 AM

    The following SQL will completely wipe the DB of processes and tasks in Workflow... SD would require a little bit more

    DELETE FROM TaskAssignment

    DELETE FROM Task

    DELETE FROM ReportProcess

    You'd have to append some WHERE clauses to narrow down the tickets/processes you're trying to delete.



  • 3.  RE: Deleting Tickets In Symantec Service desk 7.1 sp2

    Posted Oct 23, 2012 02:42 PM

    i tried it but not satisfied with results.

    i want to keep all the users contacts grouping to previous tickets just delete the email tickets.

     



  • 4.  RE: Deleting Tickets In Symantec Service desk 7.1 sp2

    Posted Nov 05, 2012 10:41 AM

    Not sure if this is what you're looking for or not but this is the script we use to delete orphaned tickets but have used it elsewhere. You will need to enter the ticket number manually for each one:

     

     

    -- The following SQL script changes orphan tickets to Closed.
    
    -- Before using, it is recommended to back up the Ensemble database before proceeding.
    
    
    USE ProcessManager
    
    --Note: Change the 'ReportProcessID' value to the processid (ticket number) you wish to close 
    --For example, 'IM-001527'
    
    UPDATE [ProcessManager].[dbo].[ReportProcess]
       SET [Result] = 'Closed'
     WHERE ReportProcessID = 'IM-001527'
    
    UPDATE [ProcessManager].[dbo].[ServiceDeskIncidentManagement]
       SET [close_code] = 'Closed Orphan'
     WHERE Process_ID = 'IM-001527'
    
     UPDATE [ProcessManager].[dbo].[Task]
       SET [IsCompleted] = '1'
     WHERE WFTaskNumberPrefix = 'IM-001527'

    Is there a reason that the tickets simply can't stay there and just be closed?



  • 5.  RE: Deleting Tickets In Symantec Service desk 7.1 sp2

    Posted Nov 05, 2012 10:47 AM

    Thanks for the reply jpellet2, but the script you gave just closes the ticket not delet it from the SQL database.



  • 6.  RE: Deleting Tickets In Symantec Service desk 7.1 sp2

    Broadcom Employee
    Posted Nov 07, 2012 10:00 AM

    If the tickets you are trying to remove are still defined as EM processes & not IM processes you can use the following script below. This script was actually designed to remove a large number of EM tickets

     

    DECLARE @Process_ID nvarchar(50),
    @Session_ID nvarchar(36)
     
    SET @Process_ID = 'XX-######'  --Specific Process ID to be deleted.
    SET @Session_ID = (SELECT SessionID FROM ReportProcess WHERE ReportProcessID = @Process_ID)

     

    DELETE FROM ReportProcess WHERE SessionID = @Session_ID
    DELETE FROM ReportProcessStatusHistory WHERE SessionID = @Session_ID
    DELETE FROM Task WHERE SessionID = @Session_ID
    DELETE FROM [Messages] WHERE MessageID = @Session_ID
     
    Now if the e-mail has been converted into an actual IM ticket there will be some additional tables that will need to be cleaned up.
     
    I had a similiar script for IM, but I'd have to try and find it again if necessary.