dbms_alert.register fails 12.1.0.2
We have an issue where execution of one of our packages fails with an ora-00022.
As part of its processing the package calls DBMS_ALERT.REGISTER
Stripped down to the absolute minimum that failing test is
SQL> exec dbms_alert.register('t');
BEGIN dbms_alert.register('t'); END;
*
ERROR at line 1:
ORA-00022: invalid session ID; access denied
ORA-06512: at "SYS.DBMS_SESSION", line 240
ORA-06512: at "SYS.DBMS_ALERT", line 79
ORA-06512: at "SYS.DBMS_ALERT", line 103
ORA-06512: at line 1
Process ID: 2008
Session ID: 75 Serial number: 4122
Executing this on a different database of the same version using the same user account succeeds.