Public synonym (or similar) for message queue?
105368Dec 16 2002 — edited Dec 17 2002I have problems enqueueing (and dequeueing) from a queue in a different schema than the enqueuer's/dequeuer's.
If i only write the queue name
DBMS_AQ.ENQUEUE( queue_name => TheQueue,
and so on... );
I get the exception
ORA-25205: The Queue MyUser.TheQueue does not exist.
If I also supply the schema name
DBMS_AQ.ENQUEUE( queue_name => TheSchema.TheQueue),
and so on... );
it all works fine.
For flexibility, I would like to omit the schema name. I tried creating a public synonym for the queue.
CREATE PUBLIC SYNONYM TheQueue FOR TheQueue;
This does not give an error, but when executing
DBMS_AQ.ENQUEUE( queue_name => TheQueue,
and so on... );
I get an execption
SP2-0749: Cannot resolve circular path of synonym TheQueue
I get the same exception when I do
DESC synonymName
as the owner or another user.
The procedure which executes the enqueue is executed as definer (not current_user).
Does anyone have an idea how to be able to skip the schema name for the queue when enqueueing/dequeueing?
Thanks,
Lena