My Oracle Support Banner

DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION FAILS WITH ORA-01031 (Doc ID 1486811.1)

Last updated on FEBRUARY 02, 2022

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.3 and later
Information in this document applies to any platform.

Symptoms

Trying to create email notifications from an user into another user schema:

CREATE USER SCHED_SUPER IDENTIFIED BY SCHED_SUPER DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;
CREATE USER SCHED_NORM IDENTIFIED BY SCHED_NORM DEFAULT TABLESPACE USERS TEMPORARY TABLESPACE TEMP;

GRANT CONNECT TO SCHED_SUPER, SCHED_NORM;
GRANT EXECUTE ON DBMS_AQ TO SCHED_SUPER, SCHED_NORM;
GRANT MANAGE SCHEDULER, CREATE PROCEDURE, CREATE ANY JOB TO SCHED_SUPER;
GRANT SELECT ANY DICTIONARY TO SCHED_SUPER;
GRANT SELECT_CATALOG_ROLE TO SCHED_SUPER;
GRANT CREATE JOB TO SCHED_NORM;


connect SCHED_SUPER/SCHED_SUPER

Receive error:
"BEGIN
  DBMS_SCHEDULER.add_job_email_notification (
  job_name => 'SCHED_NORM.TEST_JOB1',
  recipients => '&recepient',
  EVENTS => 'JOB_STARTED');
END;
/
BEGIN
*
ERROR at line 1:
ORA-01031: insufficient privileges
ORA-06512: at "SYS.DBMS_ISCHED", line 7812
ORA-06512: at "SYS.DBMS_SCHEDULER", line 4063
ORA-06512: at line 2

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.