/build/static/layout/Breadcrumb_cap_w.png

KACE How to use SQL to delete all tickets from submitter postmaster@domain.xx

After a mail loop I have more than 10k tickets from postmaster@domain.xx.

I would like to to be able to delete them in a easy way, and not use GUI to delete 150 tickets at the time.

 


1 Comment   [ + ] Show comment
  • The SQL database is read access only. You may be able to talk support into doing it for you but you will not be able to do it that way. - mramsdell 9 years ago

Answers (1)

Answer Summary:
Posted by: chucksteel 9 years ago
Red Belt
1

I had this same issue and handled it with a ticket rule. First you need to find the USERID for the postmaster@domain.xx account (KACE should have created a user for that email address) and you'll need to place it in the queries below where I have <userid for postmaster@domain.xx>.

Use the rule wizard to create a blank rule (just leave the defaults for the wizard). Delete the contents of the select query and change it to the following:

DELETE FROM HD_TICKET_CHANGE WHERE USER_ID = <userid for postmaster@domain.xx>

So if your userid is 1235 the query would be

DELETE FROM HD_TICKET_CHANGE WHERE USER_ID = 1235

Clear the other checkboxes for the rule, save it and run it.

That statement will clear the ticket comments from postmaster. To delete tickets with postmaster as the submitter:

DELETE FROM HD_TICKET WHERE OWNER_ID = <userid for postmaster@domain.xx>

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ