Grant permission to queues to another schema in oracle

偶尔善良 提交于 2019-12-24 05:54:38

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!