When delete_job is run via jil we can no longer see the job in WCC or via autorep but the job is still in the ujo_job table in the database? Is this expected?

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

 

Issue:

We have observed that when we delete job from Workload Automation AE it's not not getting deleted from ujo_job table in the database.  We can no longer see it from WCC or autorep but it is still in the database.  Is this expected? 

Example:

SQL> select job_name from aedbadmin.ujo_job where job_name like '%ZZ694CC_test_R113Agent_parm_value_7%'; 

JOB_NAME 

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

ZZ694CC_test_R113Agent_parm_value_7 

SQL> 

 

[root]# autorep -j ZZ694CC_test_R113Agent_parm_value_7 

CAUAJM_E_50027 Invalid Job Name: ZZ694CC_test_R113Agent_parm_value_7 

 

Environment:

Workload Automation AE 11.3.6

Linux

Oracle

 

Resolution:

In Workload Automation AE 11.3.x versions when one deletes a job the is_active flag in the ujo_job table is changed from 1 to 0.  The job is later deleted from the database via the archive_jobs command which by default runs as part of DBMaint each day. 

 

Per the reference guide: 

The archive_jobs command deletes obsolete job versions from the database.

Job versions are considered obsolete when all of the following conditions apply: 

The job is inactive. 

The job is no longer referenced. 

All event data that is related to the job has been deleted. 

All job run data that is related to the job has been deleted. 

 

This means the job must not be referenced by any other job, it must not have ANY events or alarms or job_runs in the database and the job def must have been flagged for deletion for N number of days. 

N, is similar to archive_events usage.  When the data is older than N days then it is deleted. 

 

Example: 

A job is created, never run and then immediately deleted via jil. 

The job will remain in the database for 7 days before being deleted (by default). 

 

Example: 

A job is created, run once and then deleted via jil. 

It will remain in the database for 7 days before trying to be deleted (by default). 

But if one had adjusted the archive_events to keep event data for 30 days, then the archive_jobs would NOT delete the job until first all the events are purged. So 30 days must past, then the events are deleted, then the job could be deleted.

 

Additional Information: 

https://docops.ca.com/ca-wla-ae-wcc/11-4-2/en/scheduling/ae-scheduling/working-with-jobs/delete-obsolete-job-versions