Skip to main content

Bulk Clearing DES Exports

Issue: DES has lot of duplicated exports in the Local Queue.

Resolution:
This process will remove ALL export jobs from the Local Queue. Disks, Zip, ISO. IT is quick to do but may not always be the best option.

Connect to the DES server and open PSQL .

These first commands are basically a check on what will be cleared. First is the messages in the system, second is the actual jobs. Run each separately.
select count() usm_uma_seq from fb.user_message_user_message_action where usm_uma_seq in (select usm_seq from fb.user_message where usm_type like '%UserMsgExport%');

select count() job_type from fb.job where job_type like 'exp-data%';

The next set of commands will delete all the Home page messages for the exports, then remove the jobs themselves. Run each of these commands on its own in order

delete from fb.user_message_user_message_action where usm_uma_seq in (select usm_seq from fb.user_message where usm_type like '%UserMsgExport%');

delete from fb.user_message_prop where id in (select usm_seq from fb.user_message where usm_type like '%UserMsgExport%');

update fb.job set job_usm_seq = null where job_type like 'exp-data%';

update fb.user_message set usm_job_seq = null where usm_type like '%UserMsgExport%';

delete from fb.user_message where usm_type like '%UserMsgExport%';

delete from fb.job where job_type like 'exp-data%';

After running the above, go back to the Local Queue to confirm that there are no exports in the queue.