Jobs remain in a terminating status

Document ID : KB000028724
Last Modified Date : 14/02/2018
Show Technical Document Details

Problem:

There are software containers that will not delete and remain in a terminating status.

 

Solution:

Backup the mdb database in SQL, then stop caf and and execute the following SQL script against the mdb in Microsoft SQL Management Studio:

 

declare @var_objectid varchar(50)

declare job_delete cursor for

 

select objectid

from usd_job_cont with (nolock)

where state=8 and objectid in(select jobcont from usd_jcview with (nolock))

    and

    objectid in(select jcchild from usd_link_jc with (nolock))

    and

    objectid in(select jcont from usd_link_jc_act with (nolock))

 

 

open job_delete

fetch job_delete into @var_objectid

 

While (@@fetch_status=0)

begin

Delete usd_jcview where jobcont=@var_objectid

Delete usd_link_jc where jcchild=@var_objectid

Delete usd_link_jc_act where jcont=@var_objectid

Delete usd_cc where objectid=@var_objectid

Delete usd_job_cont where objectid=@var_objectid

 

fetch job_delete into @var_objectid

end

 

close job_delete

 

deallocate job_delete

 

 

 

Important Note: Take a backup of the MDB before attempting any update/delete operation on the MDB.