Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Public synonym (or similar) for message queue?

105368Dec 16 2002 — edited Dec 17 2002
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 14 2003
Added on Dec 16 2002
1 comment
723 views