How to remove all the Transactions associated with a Printer.

Prev Next

Problem:

How to remove all the Transactions associated with a Printer and resource usages.


Cause:

Resource usages are not removed along with transactions. They need to be purged manually.

Solution:

This can be done using SQL Query Analyzer, by running the commands listed below:

----------------------------------

use pharos

select * from resource_usages

update resource_usages

set num_jobs = '0'
where ref_id = 'ID OF THE PRINTER'

update resource_usages

set num_units = '0'
where ref_id = 'ID OF THE PRINTER'

update resource_usages

set num_sheets = '0'
where ref_id = 'ID OF THE PRINTER'

----------------------------------

As an alternative to ref_id, you can use ref_type.

(where ref_type = 'P') - this will remove all resource usage records for all the printers.