Home » Server Options » Replication » Replicating one repobject in multiple sites (Oracle 9i)
Replicating one repobject in multiple sites [message #356561] Fri, 31 October 2008 03:30 Go to next message
sanei05
Messages: 104
Registered: September 2008
Senior Member
hi,

I have 8 databases in multimaster replication. I need to replicate only one repobject in to master sites. But I have 8 repobjects in the master definition site.
is it possible to replicate the required repobject only without bringing the other repobjects in to replication.

Can anyone help me out ASAP.

[Updated on: Fri, 31 October 2008 03:31]

Report message to a moderator

Re: Replicating one repobject in multiple sites [message #356666 is a reply to message #356561] Fri, 31 October 2008 16:18 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

Yes. It's possible.

Babu
Re: Replicating one repobject in multiple sites [message #357340 is a reply to message #356666] Wed, 05 November 2008 00:21 Go to previous messageGo to next message
sanei05
Messages: 104
Registered: September 2008
Senior Member
Babu,

if you dont mind, pls, can you specify with the queries to replicate only one table.
Re: Replicating one repobject in multiple sites [message #357443 is a reply to message #357340] Wed, 05 November 2008 06:08 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member


Hello,

>> I need to replicate only one repobject in to master sites. But I have 8 repobjects in the master definition site

Your eight repobject should be unique in master site. So; what's your problem to implement new objects in master site????

Babu

Re: Replicating one repobject in multiple sites [message #357453 is a reply to message #357443] Wed, 05 November 2008 06:34 Go to previous messageGo to next message
sanei05
Messages: 104
Registered: September 2008
Senior Member
Hi,

Below is the test scenario.

I have 2 databases DB1.WORLD,DB2.WORLD

I have 2 databases built on unix.

I have a master repgroup(REPGRP) with 7 repobjects(REP2,REP3,REP4,REP5,REP6,REP7,REP8) built on it on DB1.world. Here I need only one repobject (REP1) should be replicated to master site (DB2.WORLD) with the same master repgroup name (REPGRP).

P.S. All repobjects are of TYPE => TABLE.

Below are the queries i am trying between 2 test databases.


BEGIN
DBMS_REPCAT.SUSPEND_MASTER_ACTIVITY(
gname => '"REPGRP"');
END;
/

Log in to DB1.world(master def)


Log in to TESTDB1 and remove the master database

BEGIN
DBMS_REPCAT.REMOVE_MASTER_DATABASES(
gname => '"REPGRP"',
master_list => 'DB2.WORLD');
END;
/

Log in to TESTDB1 and create a rep object REP1

BEGIN
DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
gname => '"REPGRP"',
type => 'TABLE',
oname => '"REP1"',
sname => '"MY"',
copy_rows => FALSE,
use_existing_object => TRUE);
END;
/

add the master db DB2 to DB1

begin
dbms_repcat.add_master_database (
gname => 'REPGRP',
master => 'DB2.WORLD',
use_existing_objects => true,
copy_rows => false,
propagation_mode => 'ASYNCHRONOUS');
end;
/

BEGIN
DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
sname => '"MY"',
oname => '"REP1"',
type => 'TABLE',
min_communication => TRUE,
generate_80_compatible => FALSE);
END;
/

When I try to replication support for REP1 alone, I see that replication support is getting generated for other repobjects (REP2,REP3,REP4,REP5,REP6,REP7,REP8) also on DB2.world and coming in to replication

BEGIN
DBMS_REPCAT.RESUME_MASTER_ACTIVITY(
gname => '"REPGRP"');
END;
/

Please advise how to bring only one repobject in to replication support. Also let me know where i am going wrong..

Urgent..

Re: Replicating one repobject in multiple sites [message #357696 is a reply to message #357453] Thu, 06 November 2008 05:02 Go to previous messageGo to next message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

Hello,


Quote:
I have a master repgroup(REPGRP) with 7 repobjects(REP2,REP3,REP4,REP5,REP6,REP7,REP8) built on it on DB1.world. Here I need only one repobject (REP1) should be replicated to master site (DB2.WORLD) with the same master repgroup name (REPGRP).


I think your trying to confues your/my self. Could you please explain me. What's your plan to implement in multimaster-replication??

& Also; I recomment to you always use exact techinal terms like.

Master Repobject, Master Group, Mview Group, Mview Repobject etc...

& Always use same name for Schema & Group (To avoid confusion) like

BEGIN
DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
gname => '"SCOTT"',
type => 'TABLE',
oname => '"EMP"',
sname => '"SCOTT"',
copy_rows => FALSE,
use_existing_object => TRUE);
END

Re: Replicating one repobject in multiple sites [message #357708 is a reply to message #357696] Thu, 06 November 2008 05:35 Go to previous messageGo to next message
sanei05
Messages: 104
Registered: September 2008
Senior Member
Ok. PLEASE IGNORE PREVIOUS things Here is the exact thing i need.

1) Let us consider that I have 3 database MYDB1.WORLD, MYDB2.WORLD,MYDB3.WORLD.

2) I have a schema SCOTT in all the 3 databases.

3) SCOTT has 4 tables in it.
Table names are as follows.

a)EMP
b)DEPT
C)SAL
D)DATE


4) Now I have created a multi master replication for all the 3 databases.

Here MYDB1.WORLD is the Master Definition site.

MYDB2.WORLD and MYDB3.WORLD are master sites.

Now my requirement is that MYDB2.WORLD should be the part of replication with all the repobjects(emp,dept,sal,date) present in MYDB1.WORLD and MYDB3.WORLD must have only EMP repobject to be replicated.


Please note, all the 3 databases are in replication.


I hope you understand now... Razz





[Updated on: Thu, 06 November 2008 05:35]

Report message to a moderator

Re: Replicating one repobject in multiple sites [message #357713 is a reply to message #357708] Thu, 06 November 2008 05:55 Go to previous messageGo to next message
sanei05
Messages: 104
Registered: September 2008
Senior Member
Here are some of the steps i am following

Log in to MYDB1.world

BEGIN
DBMS_REPCAT.SUSPEND_MASTER_ACTIVITY(
gname => '"DETAILS"');
END;
/

Log in to TESTDB1 and removed the rep object EMP

BEGIN
DBMS_REPCAT.DROP_MASTER_REPOBJECT(
oname => '"EMP"',
type => 'TABLE',
sname => '"SCOTT"',
drop_objects => FALSE);
END;
/

Log into MYDB3.world and remove the rep group DETAILS by doing a right click in OEM.

Log in to MYDB1.world and remove the master database MYDB3.world

BEGIN
DBMS_REPCAT.REMOVE_MASTER_DATABASES(
gname => '"DETAILS"',
master_list => 'MYDB3.WORLD');
END;
/


Now the master site MYDB3.WORLD is out of replication and the master group DETAILS is not present in MYDB3.world. However MYDB2.world and MYDB1.world will have the master group DETAILS with all the repobjects except EMP repobject.

add the mastersite MYDB3.WORLD

begin
dbms_repcat.add_master_database (
gname => 'DETAILS',
master => 'MYDB3.world',
use_existing_objects => TRUE,
copy_rows => FALSE,
propagation_mode => 'ASYNCHRONOUS');
end;
/

Once i gave the above command, I could see in MYDB3.WORLD that all the repobjects (EMP,SAL,DEPT,DATE) getting replicated and replication support is getting generated. But my requirment is not that. I need only EMP repobject to be replicated in MYDB3.WORLD under DETAILS master group.

Log in to MYDB1.world and create a rep object EMP

BEGIN
DBMS_REPCAT.CREATE_MASTER_REPOBJECT(
gname => '"DETAILS"',
type => 'TABLE',
oname => '"EMP"',
sname => '"SCOTT"',
copy_rows => FALSE,
use_existing_object => TRUE);
END;
/

BEGIN
DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT(
sname => '"SCOTT"',
oname => '"EMP"',
type => 'TABLE',
min_communication => TRUE,
generate_80_compatible => FALSE);
END;
/

BEGIN
DBMS_REPCAT.RESUME_MASTER_ACTIVITY(
gname => '"NAGADMIN"');
END;
/

Pls advise what I have to do if i need only EMP repobjects needs to replicated on MYDB3.world.
Re: Replicating one repobject in multiple sites [message #358181 is a reply to message #357713] Mon, 10 November 2008 00:34 Go to previous messageGo to next message
sanei05
Messages: 104
Registered: September 2008
Senior Member
Any update on the above queries.... pls...


Re: Replicating one repobject in multiple sites [message #358182 is a reply to message #357713] Mon, 10 November 2008 00:37 Go to previous messageGo to next message
sanei05
Messages: 104
Registered: September 2008
Senior Member
[quote title=sanei05 wrote on Thu, 06 November 2008 05:55]
BEGIN
DBMS_REPCAT.RESUME_MASTER_ACTIVITY(
gname => '"DETAILS"');
END;
/

Sorry the master rep group name is DETAILS.
Re: Replicating one repobject in multiple sites [message #358853 is a reply to message #358182] Wed, 12 November 2008 12:36 Go to previous message
babuknb
Messages: 1736
Registered: December 2005
Location: NJ
Senior Member

Hello,

begin
dbms_repcat.add_master_database (
gname => 'DETAILS',
master => 'MYDB3.world',
use_existing_objects => TRUE,
copy_rows => FALSE,
propagation_mode => 'ASYNCHRONOUS');
end;



Once i gave the above command, I could see in MYDB3.WORLD that all the repobjects (EMP,SAL,DEPT,DATE)
getting replicated and replication support is getting generated.


But my requirment is not that. I need only EMP repobject to be replicated in MYDB3.WORLD under DETAILS master group.


dbms_repcat.add_master_database


- This procedure adds another master site to your replication environment.
This procedure regenerates all the triggers and their associated packages at existing master sites.
You must call this procedure from the master definition site.

ASAIK Using this procedure only adding registering database details NOT adding all database objects in replication env.
If you want to add your objects in replication environment then you use "Create_Master_repobject"

Babu

[Updated on: Wed, 12 November 2008 12:41]

Report message to a moderator

Previous Topic: Replicate one table in two materialized views at same time
Next Topic: Replication
Goto Forum:
  


Current Time: Thu Mar 28 04:42:52 CDT 2024