I have a QUEUE_OWNER schema that has some queues. When I connect the application to that data source everything works fine and the app can read the from the queues.
I want to create a _USER schema that has access to the queues so I can connect the app to it and not directly to the _OWNER schema.
This is what I tried:
BEGIN
FOR Q IN (SELECT * FROM ALL_QUEUES WHERE owner = 'AQ_OWNER') LOOP
DBMS_OUTPUT.PUT_LINE('queue = ' ||Q.NAME);
DBMS_AQADM.GRANT_QUEUE_PRIVILEGE('ALL','AQ_OWNER.'||Q.NAME ,'AQ_USER',FALSE);
END LOOP;
END;
but when I put a message in the queue nothing happens in the app.
How about a little help of your DBA?
This is what my user
SCOTTsees inall_queues:However, I'd like to see some other data.
SYSalmighty sees it all:Still connected as
SYS, I'll create a view which show data only for owner I choose (there's nothing much to choose in my XE database so I'll useSYSTEM-owned values). Then grantselectprivilege toSCOTT:Back to
SCOTT: to make my life simpler, I'll create a synonym first:Finally:
Basically, you'd do the same; it's just that your view would contain data for
owner = 'QUEUE_OWNER'. See if it helps.