问题
Hi I have a oracle queue in one schema namely aqs
sample queue
BEGIN DBMS_AQADM.CREATE_QUEUE(
Queue_name => 'AQS.MOb_MSG',
Queue_table => 'AQS.MOb_QT',
Queue_type => 0,
Max_retries => 5,
Retry_delay => 0,
dependency_tracking => FALSE,
comment => 'SAMPLE');
END;
I have the corresponding Queue table created.It works fine.
Now i do want to provide the select grant for the queue using another schema named "mob".How do i provide grant to another schema for a queue?Do i need to provide the select access for the queue or queue table.
I tried using grant select on AQS.MOb_MSG to mob , it is not working! saying object does not exists.
回答1:
EXECUTE DBMS_AQADM.grant_queue_privilege (
privilege => 'ALL', or (enqueue) or (dequeue)
queue_name => 'AQS.MOb_MSG',
grantee => 'grantee_user',
grant_option => FALSE/TRUE);
If you want grant direct access to queue table. You have to do this.grant select on MOb_QT to xxxx
来源:https://stackoverflow.com/questions/40657781/grant-permission-to-queues-to-another-schema-in-oracle