Replication of Indexes
Faran, July 10, 2003 - 9:04 am UTC
(Using Oracle 9.2.0.1.0 on MS Windows 2000) I have created 2 databases on different machines and run utlsampl.sql on both. I have made first one testing master definition site to replicate the scott.dept table to other master site (multi-master replication)...
SQL>...
SQL> BEGIN
2 DBMS_REPCAT.ADD_MASTER_DATABASE (
3 gname => 'scott_repg',
4 master => 'fruity.benz.com',
5 use_existing_objects => TRUE,
6 copy_rows => FALSE,
7 propagation_mode => 'ASYNCHRONOUS');
8 END;
9 /
PL/SQL procedure successfully completed.
...
SQL> BEGIN
2 DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (
3 sname => 'scott',
4 oname => 'dept',
5 type => 'TABLE',
6 min_communication => TRUE);
7 END;
8 /
PL/SQL procedure successfully completed.
...
Both the sites already have pk_dept index on dept table. I have moved the index pk_dept to a different tablespace at the second master site. It has been done and no problem at all. Now I have some questions...
I have just added only table dept in the replicatoin group not any index. What are the benifits to replicate the indexes? Is it necessary to add the indexes too in the replication group or will they grow automatically as the data will be replicated to other master sites?
If I add the index too in the replication group, would it not incur more network traffic? Is it not suitable to create indexes separetely on at individual master sites and just replicate the tables. In this way i may choose different tablespaces (for indexes) at the different sites too. Or if oracle gives us the facility to replicate the indexes and procedures where does its applicability more better.
Any guidelines for this... would be highly appreciated.
Thanks & Regards,
Faran
July 10, 2003 - 10:14 am UTC
indexes are local things, they will not add to any network traffic -- only the row level changes are there.
you would use the ddl replication facility in order to make sure you have a consistent set of indexes everywhere -- rather then doing the create index in N sites, you do it once and it gets pushed out to every site.
If you have an index at site 1 -- it is highly probable you need that index at site 2, site 3, and so on.
you are replicating the DEFINITION of the index, not index data.
Thanks
Faran, July 10, 2003 - 12:40 pm UTC
Thanks again Tom! You're doing a great job.
Regards,
Faran
LiLy, July 12, 2004 - 1:01 am UTC
Hi,
On a master definition site SiteA, in quiesced mode, I run the below procedure:
BEGIN
DBMS_REPCAT.ADD_MASTER_DATABASE (
gname => 'test_mg',
master => 'SiteB',
use_existing_objects => TRUE,
copy_rows => FALSE,
propagation_mode => 'asynchronous');
END;
/
to add a master site called SiteB. For some reasons, the process took so long and it hung. Then, I wanted to take the database out of the quiesced mode at SiteB but I couldn't RESUME_MASTER_ACTIVITY at SiteA. So I tried to remove the master group at SiteA to see if it helped but it didn't. Now at SiteB, the master group is still in quiesced mode and I can't remove it. When I tried to remove it using the OEM or on the command line, it just keeps running a long time, for more than 5 hours. I don't know what to do now to make the database at SiteB back to its original state, out of the quiesced mode. Can you please help me. Thanks!
July 12, 2004 - 11:13 am UTC
please contact support for this -- that is what they do best here.