Re: Streams configuration within schemas in a database

  • From: Chen Shapira <cshapi@xxxxxxxxx>
  • To: riyaj.shamsudeen@xxxxxxxxx
  • Date: Fri, 13 Mar 2009 15:19:52 -0700

Hi Gidhin and Riyaj

>    Since you have streams running already, I assume, you know how to do
> basic setup for streams. With that, to setup streams between two schemas in
> the same database, you would setup streams just like schemas between two
> different database (i.e. loop back database link, capture, propagate and
> apply) etc. Then add a DML handler to the table at apply process.

I'd recommend a simpler setup which includes a capture process, one
queue and an apply process. No need for loopback, and no need for
propagation. Streams is complicated enough so the simpler we can
configure it, the better.


> CREATE OR REPLACE PROCEDURE generic_dml_handler(in_any IN SYS.ANYDATA) IS

Again, in interest of simplification, you can use declarative rules to
change schema name, no need for a handler.

I'm attaching an example, but the basic declarative rule syntax is:

DBMS_STREAMS_ADM.RENAME_SCHEMA(
   rule_name=>v_dml_rule_name,
   from_schema_name=>'HR',
   to_schema_name=>'MYHR',
   step_number=>0,
   operation=>'ADD');


Chen Shapira

Other related posts: