autorep -M failed with error "CAUAJM_E_40200 GET_MACH_RUNS failed"
search cancel

autorep -M failed with error "CAUAJM_E_40200 GET_MACH_RUNS failed"


Article ID: 248886


Updated On:


CA Workload Automation AE


Autosys command 'autorep -M' returns a database query failure.

# autorep -M ALL

CAUAJM_E_40200 GET_MACH_RUNS failed.

CAUAJM_E_18416 Event Server: <AUTOSYSDB>  Failed Query: <BEGIN :RetVal := ujo_get_machine_pkg.ujo_get_machine ('ALL', :B_mach_name, :B_parent_name, :B_administrator, :B_agent_name, :B_character_code, :B_description, :B_encryption_type, :B_factor, :B_heartbeat_attempts, :B_heartbeat_freq, :B_key_to_agent, :B_mstatus, :B_max_load, :B_node_name, :B_opsys, :B_port, :B_provision, :B_que_name, :B_type,  :B_machine_method, :B_user, :Done); END;>

CAUAJM_E_18402 ORA-06550: line 1, column 18:

PLS-00306: wrong number or types of arguments in call to 'UJO_GET_MACHINE'

ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

CAUAJM_I_18403 Processing OCI function ODEFIN(34)

CAUAJM_E_18400 An error has occurred while interfacing with ORACLE.

CAUAJM_E_18401 Function <doExecute> invoked from <nextRow> failed <972>

CAUAJM_E_10331 Error loading machine details from the database


Release : 12.0 and higher

Component :


This is due to a code mismatch between the expected function UJO_GET_MACHINE from the package vs the package stored in the database.


The package ujo_get_machine_pkg can be retrieved from the database using the following sql query: 

select text from all_source where name='UJO_GET_MACHINE_PKG' 

There would be differences in the package UJO_GET_MACHINE_PKG in comparison with the one shipped along with the product current version (file $AUTOSYS/dbobj/ORA/procedures.sql).

To fix the issue,

Run the RefreshAEDB Script for Oracle in Interactive Mode
This procedure will recreate all the stored procedures while refreshing the Autosys database.