Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, ravi.

Asked: July 13, 2016 - 9:21 am UTC

Last updated: July 13, 2016 - 2:30 pm UTC

Version: 11g

Viewed 1000+ times

You Asked

Hi,

I have a situation where I was asked to use message queue technique, can you please suggest me whether it is possible/feasible or not.

There are two data bases D1 & D2, upon changing the status of a particular field in D1 some data need to be transferred to D2 from D1. Is it possible to so. If yes, please give me some guidance / Brief idea how this can be achieved.

Best regards
Ravi

and Chris said...

You can use Advanced Queuing to do this for you:

https://docs.oracle.com/database/121/ADQUE/aq_intro.htm#ADQUE0100
http://www.oracle.com/technetwork/database/features/data-integration/oracle-aq-tech-wp11-2-191324.pdf

In outline, you need to:

- Create a queue in both databases
- In the source (local) database, add the target (remote) database as a subscriber
- Create a callback procedure on the target to dequeue the messages
- Register this procedure on the target

You can find a worked example of this at:

https://fcosfc.wordpress.com/2011/07/14/propagation-of-oracle-aq-messages-between-databases/

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

PL/SQL demos

Check out more PL/SQL tutorials on our LiveSQL tool.

PL/SQL docs

PL/SQL reference manual from the Oracle documentation library