My Oracle Support Banner

Unable To Dequeue/Enqueue From/To Aqs In Other Users' Schema Ora-25205 (Doc ID 292478.1)

Last updated on JANUARY 17, 2020

Applies to:

Oracle Database - Enterprise Edition - Version and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Information in this document applies to any platform.


Trying to use synonym for queue for enqueue/dequeue fails with error ORA-25205.
Following steps can exhibit the error :

Create queue <TEST_QUEUE> in the <USER1> schema.
User <USER1> can enqueue to and dequeue from <TEST_QUEUE> successfully.

Grant enqueue and dequeue on this <TEST_QUEUE> to <USER2>.
(Or grant system previliges : enqueue_any and dequeue_any)

Connect as <USER2> and create synonym <SYNONYM_FOR_TEST_QUEUE> for <USER1>.<TEST_QUEUE>.
(Or create public synonym)

Then, connect as <USER2> and tried to enqueue to or dequeue from <SYNONYM_FOR_TEST_QUEUE>.
For eample :


It fails with error :

ORA-25205: the QUEUE <USER2>.<SYNONYM_FOR_TEST_QUEUE> does not exist
ORA-06512: at "SYS.DBMS_AQ", line 221
ORA-06512: at line 24


Created synonym for queue and trying to use it for enqueue/dequeue


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.