Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> FW: HOW TO, AQ between 2 dbs

FW: HOW TO, AQ between 2 dbs

From: Leonard, George <GLeonard_at_wesbank.co.za>
Date: Fri, 18 Feb 2005 19:18:33 +0200
Message-ID: <1831A554E8800049B6B970790D2513C03AE74E@fnbkrkmx01.fnb.co.za>

   

below is the code as i got it at the moment,  

i am pretty sure it is correct, but then it is friday night this side,  

as far as i can see it has a roblem with the destination, guessing something to do with the Schedule_Propagation and the dblink ...  

thanks.  

George      

begin
  dbms_aqadm.grant_system_privilege('ENQUEUE_ANY', 'aqfinexc', FALSE);   dbms_aqadm.grant_system_privilege('DEQUEUE_ANY', 'aqfinexc', FALSE); end;
/

-- dspif1
connect system/manager_at_lab1
drop user aqpdes cascade;
create user aqpdes identified by aqpdes; GRANT CONNECT, RESOURCE, aq_administrator_role TO aqpdes; GRANT EXECUTE ON dbms_aq TO aqpdes;
GRANT EXECUTE ON dbms_aqadm TO aqpdes;
alter user aqpdes quota unlimited on users; begin
  dbms_aqadm.grant_system_privilege('ENQUEUE_ANY', 'aqpdes', FALSE);   dbms_aqadm.grant_system_privilege('DEQUEUE_ANY', 'aqpdes', FALSE); end;
/

connect aqfinexc/aqfinexc_at_lab
-- message that will be send to fin system CREATE type aqfinexc.fin_msg_typ as object(  seq_num number,
 name VARCHAR2(30),
 amt number
);
/

-- look at maybe trying to rename the queue table to something else, more relevant to the system begin
  DBMS_AQADM.CREATE_QUEUE_TABLE(queue_table => 'aqfinexc.objmsgs80_qtab',

                                queue_payload_type => 'aqfinexc.fin_msg_typ',
                                multiple_consumers => TRUE);
  DBMS_AQADM.CREATE_QUEUE(queue_name  => 'FIN_MSG_QUEUE',
                          queue_table  => 'aqfinexc.objmsgs80_qtab');
  DBMS_AQADM.START_QUEUE(queue_name => 'FIN_MSG_QUEUE'); end;
/
 

connect aqpdes/aqpdes_at_lab1
-- message that will be send to fin system CREATE type aqpdes.fin_msg_typ as object(  seq_num number,
 name VARCHAR2(30),
 amt number
);
/

-- look at maybe trying to rename the queue table to something else, more relevant to the system begin
  DBMS_AQADM.CREATE_QUEUE_TABLE(queue_table => 'aqpdes.objmsgs80_qtab',

                                queue_payload_type => 'aqpdes.fin_msg_typ',
                                multiple_consumers => TRUE);
  DBMS_AQADM.CREATE_QUEUE(queue_name  => 'FIN_MSG_QUEUE',
                          queue_table  => 'aqpdes.objmsgs80_qtab');
  DBMS_AQADM.START_QUEUE(queue_name => 'FIN_MSG_QUEUE'); end;
/

connect aqfinexc/aqfinexc_at_lab
-- ADDED: Create loopback database link
create database link aqpdes connect to aqpdes identified by aqpdes USING 'LAB1.WESBANK.CO.ZA';
/* when we need to do some cleaning

begin
 DBMS_AQADM.UNSCHEDULE_PROPAGATION (
    Queue_Name => 'fin_msg_queue',
    Destination => 'aqfinexc.aqpdes');
end;
/

*/

From: oracle-l-bounce_at_freelists.org on behalf of Leonard, George Sent: Fri 2005/02/18 05:56 PM
To: oracle-l_at_freelists.org
Subject: HOW TO, AQ between 2 dbs

Hi all

hope someone can save me some time, (busy trying examples and jsut running into walls, sorry late on Friday guess brain is weekend mode already)

busy trying a POC atm regarding AQ.

DB=>A, user aqfinexc need to send msg to DB=>B, user aqpdes

as message is added to A's Queue i want to have it pushed over to B and will be colelcted that side by a dequeue process listening, got a example to do this.

does anyone have a script to set soemthing like this up already.

i got AQ working locally but now got to get it working from A=>B (from Asktom.oracle.com)

thanks.

George


The views expressed in this email are, unless otherwise stated, those of the author and not those of the FirstRand Banking Group an Authorised Financial Service Provider or its management. The information in this e-mail is confidential and is intended solely for the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted in reliance on this, is prohibited and may be unlawful. Whilst all reasonable steps are taken to ensure the accuracy and integrity of information and data transmitted electronically and to preserve the confidentiality thereof, no liability or responsibility whatsoever is accepted if information or data is, for whatever reason, corrupted or does not reach its intended destination.


--
http://www.freelists.org/webpage/oracle-l



___________________________________________________________________________________________________


The views expressed in this email are, unless otherwise stated, those of the author and not those
of the FirstRand Banking Group an Authorised Financial Service Provider or its management.
The information in this e-mail is confidential and is intended solely for the addressee.
Access to this e-mail by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or 
omitted in reliance on this, is prohibited and may be unlawful.
Whilst all reasonable steps are taken to ensure the accuracy and integrity of information and data 
transmitted electronically and to preserve the confidentiality thereof, no liability or 
responsibility whatsoever is accepted if information or data is, for whatever reason, corrupted 
or does not reach its intended destination.

                               ________________________________

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Feb 18 2005 - 12:21:55 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US