Problem with scheduler program with execute privilege given to a role
4547Apr 22 2010 — edited Apr 26 2010Hello,
I am trying to create an event based job and I also need to pass event messages into my event-based job.
Here is brieftly my setup...
I have a COM_OWNER account that have:
1- queue needed for advanced queuing (MY_QUEUE)
2- A scheduler program (MY_SCHED_PROGRAM) that wake up to an events raised by my application.
ENQUEUE and DEQUEUE privileges has been given to a role (COM_UTIL).
EXECUTE privilege has been given on the scheduler program (MY_SCHED_PROGRAM) to a role(COM_UTIL).
CREATE JOB privilege has been given to role CML_UTIL.
The role COM_UTIL was given to user1.
If user1 run the following job:
dbms_scheduler.create_job (
job_name => 'MY_FIRST_JOB',
program_name => 'COM_OWNER.MY_SCHED_PROGRAM',
start_date => sysdate,
event_condition => 'tab.user_data.nom_evenement = ''TRV_TRANSACTIONNEL'' and tab.user_data.trv_id = '||to_char(p_trv_id),
queue_spec => 'COM_OWNER.MY_QUEUE',
enabled => true,
auto_drop => false,
comments => 'My first event based job');
He received the following error:
1- ORA-27373: This error orccured, if the DEQUEUE privilege is given to COM_UTIL role. If the DEQUEUE privilege is given directly to user1, everything work fine.
2- ORA-27476: This error orccured, if the EXECUTE privilege on COM_OWNER.MY_SCHED_PROGRAM is given to COM_UTIL role. If the EXECUTE privilege is given directly to user1, everything work fine.
I was thinking that a scheduler program EXECUTE privilege could be given to an Oracle Role. It seems not to be the case.
The other thing weird, is that ENQUEUE privilege is given to the role and it is working. But the DEQUEUE privilege needed to be given directly to user and not to a role.
Is it a bug?
Thanks for your help.