2016-11-17 63 views
1

您好我有一個模式的預言隊列即AQS權限授予隊列到另一個模式在Oracle

樣本隊列

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; 

我有相應的隊列表created.It工作正常。

現在我想爲使用另一個名爲「mob」的模式提供隊列的select grant。如何向隊列的另一個模式提供授權?是否需要爲隊列或隊列表提供select訪問權限。

我嘗試使用授予選擇AQS.MOb_MSG暴徒,它不工作!說對象不存在。

回答

4
EXECUTE DBMS_AQADM.grant_queue_privilege ( 
    privilege  =>  'ALL', or (enqueue) or (dequeue) 
    queue_name =>  'AQS.MOb_MSG', 
    grantee  =>  'grantee_user', 
    grant_option =>  FALSE/TRUE); 

如果您希望授予對隊列表的直接訪問權限。你必須這樣做。 grant select on MOb_QT to xxxx