Not able to delete few jobs from CLI or WCC. Getting error Potential corruption error
search cancel

Not able to delete few jobs from CLI or WCC. Getting error Potential corruption error

book

Article ID: 242629

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

We see this error message when running job_depends :

CAUAJM_E_10257 Potential corruption of job data for joid <570,057>
CAUAJM_E_10310 Failed to get job for joid <570,057>.

When trying to delete the job, we see:

______________________________________________________________________________

CAUAJM_I_50200 Attempting to Delete Job: <JOB_NAME>
CAUAJM_E_10257 Potential corruption of job data for joid <570,057>
CAUAJM_E_50178 Could not get row for joid = 570,057
CAUAJM_E_50201 Delete was not performed!
______________________________________________________________________________

CAUAJM_E_50198 Exit Code = 1
______________________________________________________________________________

How do we determine which job is corrupted and how to fix it?

Environment

Autosys 12.x

CA Workload Automation AE (AutoSys)

Cause

Corrupt data in the database

Resolution

You can run the following database query to find the job name:

Oracle:
select job_name, joid from aedbadmin.ujo_job where joid like 570057;

MS SQL:
select job_name, joid from ujo_job where joid like 570057;



Once you have identified the job, proceed with the steps below to eliminate the potential corruption :

  1. 1. Verify to make sure the job is not in Running status by :
    $ autorep –d –J jobname

  2.  In case the job is running, wait until the job has completed.

  3. Then take a backup of the job definition by :
    $ autorep -q -J <jobname< > <jobname>.jil

  4. Then recreate the job properly to fix the potential corruption by :
    $ jil
    jil>>1> delete_job: <jobname>
    jil>>2> exit 

  5. Use the backup of the job definition to recreate the job by :
    $ jil < jobname.jil > <jobname>.re

  6. In case the deletion of the job failed, you can proceed with the following steps to get the job deleted properly:
    Oracle:
    update aedbadmin.ujo_job set is_active = 0 where joid =  570057;
    update aedbadmin.ujo_job set is_currver = 0 where joid = 570057;
    commit;

    MS SQL:
    update aedbadmin.ujo_job set is_active = 0 where joid =  570057;
    update aedbadmin.ujo_job set is_currver = 0 where joid = 570057;