Skip to main content

Remove a BUPC entry from DES

Issue: Customer has a BUPC listed in DES that is no longer in use but cannot be deleted

Resolution:

Load the DES web interface.
Go to System Setup, System, Backup/Export. Select the BUPC to be deleted and Click Edit under Actions. Make sure it is not export Default and set the Archive to No.
Try to Delete it to confirm that is it considered still in use.

Go to the System Status, Local Queue page. Delete any jobs marked as going to the BUPC you want to remove.

SSH to the DES server.
use !psql to open postgres.

Confirm the BUPC ID numbers by running
select * from fb.bu_pc;
Note the bpc_seq number for the one you want to remove.

Option 1: not deleting the last BUPC:

Then check if there are jobs listed as going to that BUPC.
select job_seq,job_bpc_seq from fb.job where job_bpc_seq='<ID of the BUPC being removed>';
If it gives any rows of results then some jobs are still tied to that BUPC. you can update them with the following
update fb.job set job_bpc_seq ='<Id of the BUPC being kept>' where job_bpc_seq='<ID of the BUPC being removed>';

There may also be messages linked to the old BUPC.
select usm_seq,usm_bpc_seq from fb.user_message where job_bpc_seq='<ID of the BUPC being removed>';
If there are any results for that run the following to update them.
update fb.user_message set usm_bpc_seq='<Id of the BUPC being kept>' where usm_bpc_seq='<ID of the BUPC being removed>';

Then go back to System Setup, System, Backup/Export. Highlight the BUPC to be removed and click Delete.

Option 2: Deleting the last BUPC:
Clear out all the messages linked to that BUPC
delete from fb.user_message_user_message_action where usm_uma_seq in (select usm_seq from fb.user_message where usm_bpc_seq='<ID of the BUPC being removed>');

delete from fb.user_message_prop where id in (select usm_seq from fb.user_message where usm_bpc_seq='<ID of the BUPC being removed>');

delete from fb.user_message where usm_bpc_seq='<ID of the BUPC being removed>';

Go to the System Status, Local Queue and remove all the pending jobs.

Then go back to System Setup, System, Backup/Export. Highlight the BUPC to be removed and click Delete.