SmarterTools Portal Language
 
HomeKnowledge BaseSmarterTicketHow To - Delete all tickets and history from database
Information
Article ID186
Created On10/27/2005
Modified9/12/2008
Share With Others
How To - Delete all tickets and history from database

Applies to: SmarterTicket 2.x

The following procedure will delete all tickets and historical data in your SmarterTicket database, while leaving configuration settings (agents, departments, etc).  

Use the following scripts with caution.  SmarterTools is not responsible for any lost data, and will not support running scripts directory on the SmarterTicket database.  Make a backup of the database before executing these queries.

delete from SmarterTicket_ActionLog;
delete from SmarterTicket_AgentLog;
delete from SmarterTicket_Attachment;
delete from SmarterTicket_MicroStats;
delete from SmarterTicket_Reply;
delete from SmarterTicket_TicketLog;
delete from SmarterTicket_TicketNote;
delete from SmarterTicket_TicketRead;
delete from SmarterTicket_TicketResolution;delete from SmarterTicket_Ticket;

If you wish to clear the KB also, run the queries below:

delete from SmarterTicket_KBArticle;
delete from SmarterTicket_KBCategory;
delete from SmarterTicket_KBSearch;

If you wish to clear predefined responses, run the following: 

delete from SmarterTicket_PredefinedResponse;

Then, delete the files in the Attachments folder of the web site.

To finish everything up, compact your database if you're using SQL.