When running an awrun command, specifying which Agent to run the Job or Process Flow on by using a -o option will result in a No role access error.
Below is an example run without the -o option and an run with the -o option.
[ams@testingl ~]$ awrun -m TEST_JOB -u user -z password -q BATCH <--- Successful
JOBID: 2427
[ams@testing ~]$ awrun -m TEST_JOB -u user -z password -o TESTAGENT -q BATCH <--- Unsuccessful
Error: ERROR -999 ORA-20025: No role access to "Agent as "TESTAGENT" rtype=N edit=N my_dba=N my useq=*-5-6 user_seq_to_check: -6.2 user_seq_to_check: -9-11 all user_seq: 1: 2: 3: 4: awop: "
ORA-06512: at "AMS.AW5", line 118
ORA-06512: at "AMS.AWAPI2", line 4422
ORA-06512: at "AMS.AWAPI2", line 488
ORA-06512: at "AMS.AWAPI2", line 2997
ORA-06512: at "AMS.AWAPI2", line 3589
ORA-06512: at "AMS.AWAPI2", line 4094
ORA-06512: at "AMS.AWOP_API", line 732
ORA-06512: at "AMS.AW5", line 109
ORA-06512: at "AMS.AW5", line 56
ORA-06512: at line 1
ORA-06512: at "AMS.AWDYN", line 19
ORA-06512: at line 1
There was a package level PL/SQL variable not set for this specific use case such that the role checking could not find the user, thus causing a role access error.
A fix will be included in a future version of Applications Manager
Workaround:
Do not use the -o option.
If an Agent needs to be specified, specify it within the Job or Process Flow definition.