AutoSys Job Deletion Fails with ORA-00904 and B.SEQ_NUM Invalid Identifier
search cancel

AutoSys Job Deletion Fails with ORA-00904 and B.SEQ_NUM Invalid Identifier

book

Article ID: 435543

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Users may encounter the following error when attempting to run autorep -j [job_name] -q or delete a job in AutoSys Workload Automation:

CAUAJM_E_18402 ORA-00904: "B"."SEQ_NUM": invalid identifier

Additionally, attempting to change the job status to inactive (is_active=0) via SQL as per existing KB autorep -j jobname -q gives "CAUAJM_E_18402 ORA-00904: "B"."SEQ_NUM": invalid identifier" message does not allow the job to be redefined or deleted through standard JIL commands.

Environment

Autosys 12.x , 24.x 
Oracle

Cause

This issue occurs due to an inconsistency in the ujo_job table metadata. Specifically, a database state can occur where the job is marked as inactive (is_active = 0), but the current version flag (is_currver) remains set to 1. This mismatch prevents the application server from correctly identifying the job version to be processed or deleted.

Common triggers include:

  • Concurrent JIL Executions: Multiple automated processes (e.g., CI/CD pipelines) attempting to update the same job simultaneously.
  • Transient Network Interruptions: A brief drop in connectivity between the AutoSys Application Server and the database during a JIL transaction.

Resolution

To resolve this inconsistency and allow the job to be redefined, the is_currver flag must be manually updated in the database.

Step 1: Identify the Inconsistent Record

Run the following query to verify the state of the affected job:

Review this command before running it.

SELECT joid, job_name, is_active, is_currver FROM aedbadmin.ujo_job WHERE job_name = 'YOUR_JOB_NAME';


Confirm if is_currver is set to 1 while is_active is 0 (or if multiple rows exist with is_currver=1).

Step 2: Correct the Flag

Update the current version flag so the job is no longer recognized as the active definition.

This command will make changes to your system. Review it carefully before running.

UPDATE aedbadmin.ujo_job SET is_currver = 0 WHERE job_name = 'YOUR_JOB_NAME';COMMIT;



Step 3: Verify and Redefine

  1. Run autorep -j YOUR_JOB_NAME. It should no longer return a definition.
  2. Re-insert the job using JIL:
    insert_job: YOUR_JOB_NAME ...