Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: replication with Indexes
> -----Original Message-----
> I wanted to replicate db1 to db2 with all indexes how to do this?
I'm a little rusty on what features are in this version of Oracle versus that version Oracle. But, ASSUMING you can do this in 8.1.6.3, you can export the master tables without rows; import them into the second database. After I do this, I keep only the primary key constraints and drop the others. Then:
In the master database:
create snapshot logs on the master tables.
If needed, grant select on the master tables AND on the mlog$ tables to
whatever user the database link uses.
In the secondary database:
create the database link to masterdb. For this I create a READONLY user which has readonly (duh) privilege on the master and mlog$ tables is the master database. And I make the database link a public database link.
create snapshot xyz on prebuilt table refresh force as select * from
owner.xyz_at_masterdb;
exec dbms_snapshot.refresh('XYZ','C')
connect to replication schema owner guy. create the refresh group and refresh job. exec dbms_refresh.add('REFGROUP','OWNER.XYZ')
test it:
exec dbms_job.run(##)
I think 8.1.6 supports the "on prebuilt table" thing.
-- Archives are at http://www.freelists.org/archives/oracle-l/ FAQ is at http://www.freelists.org/help/fom-serve/cache/1.html -----------------------------------------------------------------Received on Wed May 26 2004 - 11:51:37 CDT