Scheduler: CAUAJM_E_10111 Trouble getting the next EvtNum for server:
search cancel

Scheduler: CAUAJM_E_10111 Trouble getting the next EvtNum for server:

book

Article ID: 254603

calendar_today

Updated On:

Products

Autosys Workload Automation

Issue/Introduction

Is there any solution to get the scheduler started in this situation? 
We are receiving the below log entries. 
The application server starts up fine.


From debug logs
1) stop the scheduler 
2) config.<instance>   set this value uncommented  
ISDBGACTIV=LIGHT,HEAVY,DBQUERY,GBE 

        *** To break out type control-c (^c) ***

AutoSys Scheduler Log [11/16/2022 13:05:27]
Time                       Message
-------------------------- ------------------------------------------------------------------------------
[11/17/2022 08:45:44.3648] 5407 139681888057216 L:1 CmPool.cpp 214 Database connection sucessful
[11/17/2022 08:45:44.3650] 5407 139681888057216 L:2 epmain.cpp 1067 EPX
[11/17/2022 08:45:44.3651] 5407 139681888057216 L:2 epmain.cpp 1070 call EpInit...
[11/17/2022 08:45:44.3652] 5407 139681888057216 L:128 epx.cpp 2243 DBQ db_loadup_intcodes
[11/17/2022 08:45:44.3749] 5407 139681888057216 L:128 epx.cpp 2243 DBQ db_loadup_intcodes  ret[1] elapsed [9528]
[11/17/2022 08:45:44.3750] 5407 139681888057216 L:128 epx.cpp 2217 DBQ dbints_send_sql select oid from ujo_next_oid where field = 'evt_num'
[11/17/2022 08:45:44.3751] 5407 139681888057216 L:128 shared_base_api.cpp 212 DBQ dbints_send_sql_imp <select oid from ujo_next_oid where field = 'evt_num'>
[11/17/2022 08:45:44.3752] 5407 139681888057216 L:128 shared_base_api.cpp 217 DBQ dbints_send_sql_imp  TRY[1]
[11/17/2022 08:45:44.3759] 5407 139681888057216 L:128 shared_base_api.cpp 221 DBQ dbints_send_sql_imp  ret[2] elapsed [613]
[11/17/2022 08:45:44.3761] 5407 139681888057216 L:128 epx.cpp 2217 DBQ dbints_send_sql  ret[0] elapsed [940]
[11/17/2022 08:45:44.3762] 5407 139681888057216 CAUAJM_E_10111 Trouble getting the next EvtNum for server: <config>.<instance>
[11/17/2022 08:45:44.3763] 5407 139681888057216 CAUAJM_E_10107 We Cannot Proceed!!! Might have to switch this server off.
[11/17/2022 08:45:44.3764] 5407 139681888057216 CAUAJM_E_10105 Could not get EvtNum.  Exiting!

Previous to this we ran the RefreshAEDB.pl script to upgrade the existing DB from 11.3.6SPCUM1 (11.3.6.8.1) to 12.0.01.00 so that we can install CA WAAE r12 and noticed that the DB Refresh was not complete.

Environment

Autosys R12.x

Cause

When running the RefreshAEDB.pl the script copies the data from ujo_next_oid to ujo_next_oid_temp and then drops ujo_next_oid to recreate it.
During this process, an error accord, and the data was lost.
This caused the ujo_next_oid to end up being blank.

Resolution

There are several possible solutions listed below in the order it is suggested by support:

Option 1)
If the DB refresh process did not work I would strongly suggest that your restore the 11.3.6SP8CUM1 database and run the script again so make sure it finishes correctly.
Trying to troubleshoot and fix a database upgrade that failed after the fact usually is not worth the trouble as there is no way to know exactly all the issues you might run into.


Option 2)
( This will create a clean blank database. ALL DATA will be LOST)

drop tablespaces, users, and roles using the below queries and reinstall again.

 1) drop user autosys cascade;
 2) drop user aedbadmin cascade;
 3) drop tablespace AEDB_DATA including contents and datafiles;
 4) drop tablespace AEDB_INDEX including contents and datafiles; 


Option 3)
(This creates the default data for the table)
( THIS SHOULD BE  A LAST RESORT AS THERE IS HIGH PROBABILITY OF OTHER PROBLEMS THIS WILL NOT SOLVE!!)

set scan off;
set head off;
SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''audit_info_num'',' || nvl(max(audit_info_num + 1),100) || ');' FROM ujo_audit_info;

SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''eoid'',' || NVL(TO_NUMBER(MAX(SUBSTR(eoid, 5, 8))) + 1, 10000000) || ');' 
FROM ujo_proc_event where substr(eoid,4,1) = 'z';

SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''joid'',' || nvl(max(joid + 1),100) || ');' FROM ujo_job;

SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''evt_num'',' || nvl(max(orig_evt_num + 1),100) || ');' FROM ujo_proc_event;

SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''evt_proc_num'',' || nvl(max(evt_num + 1),100) || ');' FROM ujo_proc_event;

SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''ext_evt_num'',' || nvl(max(evt_num + 1),100) || ');' FROM ujo_ext_event;

SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''roid'',' || nvl(max(roid + 1),100) || ');' FROM ujo_virt_resource;

SELECT 'INSERT INTO ujo_next_oid (field, oid) VALUES (''str_oid'',' || nvl(max(str_oid + 1),100) || ');' FROM ujo_strings;
exit;

Additional Information

In the create and refresh scripts we try to change the ujo_next_oid table to a partitioned table.
During this process, we drop the ujo_next_oid table after copying contents to a temporary table called ujo_next_oid_temp
then once the new table partitioned table is created we try and copy the temp table information back.