I am implementing streams over RAC databases.
I agree, oracle does not have enough documentation on implementing streams over RAC.
1. Use a service name that has failover capability between nodes and use this service name while creating the db links.
2. Identify which instance is going to serve replication and assign it to the queue. ( This instance manages all the log mining, capture and propagate and apply). The secondary instance would be used only when the primary one is not available.
begin
DBMS_STREAMS_ADM.SET_UP_QUEUE(
Queue_Table => 'capture_queue_table',
Queue_name => 'capture_queue');
DBMS_STREAMS_ADM.SET_UP_QUEUE(
Queue_Table => 'apply_queue_table',
Queue_name => 'apply_queue');
-- Assign Primary / Secondary Instance IDs
dbms_aqadm.alter_queue_table('capture_queue_table',
primary_instance => 1,
secondary_instance => 2);
dbms_aqadm.alter_queue_table('apply_queue',
primary_instance => 1,
secondary_instance => 2);
end;
3. Make sure that the propagation is between the queues.
dbms_streams_adm.add_table_propagation_rules(
table_name => 'scott.EMP',
STREAMS_NAME => 'propagate_process',
SOURCE_QUEUE_NAME => 'capture_queue',
destination_QUEUE_NAME => 'Apply_queue@<remote_db>',
include_dml => true,
include_ddl => false,
include_tagged_lcr => true,
source_database => '<Local Database name>',
-- Use the database name not individual instances
queue_to_queue => true,
inclusion_rule => true);
Edited by: Ramineni on Apr 27, 2009 10:14 AM