Home » RDBMS Server » Server Administration » Oracle Streams questions (merged)
Oracle Streams questions (merged) [message #219732] Thu, 15 February 2007 14:21 Go to next message
Rustican
Messages: 51
Registered: July 2006
Member
I'm planning to replicate the schema on one database to another using streams. But i want to take only a subset of some tables. I was wondering the best method to do this.

Do i first create a DBMS_STREAMS_ADM.ADD_SCHEMA_RULES for the schema that i want and then create DBMS_STREAMS_ADM.ADD_SUBSET_RULES on the tables that i want to take a subset of? Do i have to create propogation rules for the schema and subset?

Or do i create multiple DBMS_STREAMS_ADM.ADD_TABLE_RULES for the tables in the schema and then create DBMS_STREAMS_ADM.ADD_SUBSET_RULES on the tables that i want to take a subset of? Do i have to create propogation rules for each table and each subset?


Lastly, will the DBMS_STREAMS_ADM.ADD_SUBSET_RULES take care of UPDATE and DELETE changes as well as INSERTS?

In the example below what should i define insert_rule_name, update_rule_name, and delete_rule_name as?

DBMS_STREAMS_ADM.ADD_SUBSET_PROPAGATION_RULES(
table_name IN VARCHAR2,
dml_condition IN VARCHAR2,
streams_name IN VARCHAR2 DEFAULT NULL,
source_queue_name IN VARCHAR2,
destination_queue_name IN VARCHAR2,
include_tagged_lcr IN BOOLEAN DEFAULT FALSE,
source_database IN VARCHAR2 DEFAULT NULL,
insert_rule_name OUT VARCHAR2,
update_rule_name OUT VARCHAR2,
delete_rule_name OUT VARCHAR2,
queue_to_queue IN BOOLEAN DEFAULT NULL);




Thanks.
Streams able to INSERT but not UPDATE or DELETE [message #219779 is a reply to message #219732] Fri, 16 February 2007 00:26 Go to previous message
Rustican
Messages: 51
Registered: July 2006
Member
I'm using streams and created a DBMS_STREAMS_ADM.ADD_SUBSET_RULES stream. Inserts are being sent over from my source database to my destination database, but updates and deletes aren't? I'm not sure why. Please help.

below are my rules sets:


Here is my subset capture on the source db:

BEGIN
DBMS_STREAMS_ADM.ADD_SUBSET_RULES(
table_name => 'car_mod.parameter',
dml_condition => 'type = ''NEW''',
streams_type => 'capture',
streams_name => 'uc_param_capture_stream',
queue_name => 'strmadmin.streams_queue',
include_tagged_lcr => false,
source_database => 'orcl3a');
END;

Here is my propogation on the source db:

BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(
table_name => 'car_mod.parameter',
streams_name => 'orcl3a_to_orcl3mir',
source_queue_name => 'strmadmin.streams_queue',
destination_queue_name => 'strmadmin.streams_queue@orcl3mir',
include_dml => true,
include_ddl => true,
source_database => 'orcl3a.myserv.com,
inclusion_rule => true);
END;

here is my apply rules set on my destination db

BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_RULES(
table_name => 'car_mod.parameter',
streams_type => 'apply',
streams_name => 'uc_param_apply_stream',
queue_name =>
'strmadmin.streams_queue',
include_dml => true,
include_ddl => true,
source_database => 'ORCL3a.myserv.com',
inclusion_rule => true);
END;

[Updated on: Fri, 16 February 2007 09:18]

Report message to a moderator

Previous Topic: Why we find 2 ADMINS ( SYS and SYSTEM )!!?
Next Topic: ORA-1555 Famous Snapshot-Error
Goto Forum:
  


Current Time: Fri Sep 20 05:32:46 CDT 2024