One database( two schemas) streams Configuration [message #342926] |
Mon, 25 August 2008 10:02 |
mirasraf
Messages: 52 Registered: June 2006 Location: DHAKA
|
Member |
|
|
Dear All
Data does not replicate.
Data will replicate from one schema to another schema in Same database.
I have one database( Global database name "orcl.world" and instance name "orcl"). I have also two schema scott and scott2.
Both schema carrry 1 table(dept).
Step:
1. First I create two tns in database "orcl"
orcl=for schema scott
orcl2=for schema scott2
2.Second I create streams administrator
Conn sys/******@orcl as sysdba
create user strmadmin identified by ****** ;
grant dba,select_catalog_role to strmadmin;
exec dbms_streams_auth.grant_admin_privilege('strmadmin',true);
3.I create db link
conn strmadmin/******@orcl
create database link orcl2.world connect to strmadmin identified by strmadmin using 'orcl2';
4.I create Queue (Apply & Capture )
connect strmadmin/strmadmin@orclbegin
dbms_streams_adm.set_up_queue(
queue_table => 'apply_scotttab',
queue_name => 'apply_scott',
queue_user => 'strmadmin');
end;
/
begin
dbms_streams_adm.set_up_queue(
queue_table => 'capture_scotttab',
queue_name => 'capture_scott',
queue_user => 'strmadmin');
end;
/
5.Create Capture & Apply process
connect strmadmin/strmadmin@orcl
Begin
dbms_streams_adm.add_schema_rules (
schema_name => 'scott',
streams_type => 'capture',
streams_name => 'capture_stm',
queue_name => 'capture_scott',
include_dml => true,
include_ddl => false,
inclusion_rule => true);
end;
/
connect strmadmin/strmadmin@orcl
begin
dbms_streams_adm.add_schema_rules (
schema_name => 'scott2',
streams_type => 'apply',
streams_name => 'apply_sfdb_stm',
queue_name => 'apply_scott',
include_dml => true,
include_ddl => false,
source_database => 'orcl');
end;
/
6.Create Propagation process
conn strmadmin/strmadmin@orcl
BEGIN
DBMS_STREAMS_ADM.ADD_TABLE_PROPAGATION_RULES(
table_name =>'scott.dept',
streams_name =>'propa_cdb_sfdb',
source_queue_name =>'capture_scott',
destination_queue_name =>'apply_scott@orcl2.world',
include_dml =>true,
include_ddl =>false,
source_database =>'orcl');
END;
/
7. Then I start capture & Apply process
But When I insert one record in dept table in schema scott ,this data did not find schema scott2(dept table).
I did not get any error (dba_apply,dba_propagation ,dba_capture)
|
|
|
|
|
Re: One database( two schemas) streams Configuration [message #343183 is a reply to message #343149] |
Tue, 26 August 2008 09:55 |
varunvir
Messages: 389 Registered: November 2007
|
Senior Member |
|
|
Have you created logminer tablespace(logmnt_tbs).If you already created logminer tablespace,then Please tell me the value of following instance level parameter as:-
JOB_QUEUE_PROCESSES
UNDO_RETENTION
GLOBAL_NAMES
_JOB_QUEUE_INTERVAL
STREAMS_POOL_SIZE
PARALLEL_MAX_SERVERS
|
|
|
|
|
|
|
Re: One database( two schemas) streams Configuration [message #343878 is a reply to message #343861] |
Thu, 28 August 2008 06:57 |
shreeshsikaria
Messages: 3 Registered: August 2008 Location: India
|
Junior Member |
|
|
Also,
how did you create the db links ??
Assuming your database name is sampledb.machine.com
schema1 is orcl
schema2 is orcl2
as per the statement below , orcl should be the name of your database , not the schema. "create database link orcl2.world connect to strmadmin identified by strmadmin using 'orcl2'; "
|
|
|
|