The new requirement for Oracle DBLinke + Materialized View to synchronize data projects of two databases is to synchronize some of the two Oracle databases. Several methods are available in the experiment environment, today, we will record how DbLink and the materialized view synchronize data. 1. Configure the tnsnames. ora file to specify the Network Name of the master database. The experiment environment is 169db. 2. Assign the corresponding permissions grant create database link to repadmin; -- create dblink on the slave database. Grant create materialized view to repadmin; -- permission for creating materialized views. 3. log on to the slave database as repadmin. Connect repadmin/xxxx -- create dblinkcreate database link 169 dbLink connect to repadmin identified by xxxx using '169db'; -- test whether the select * from global_name @ 169 dbLink is created successfully; 4. Create a materialized view log on the table of the primary database. This log records the changes in the primary table. Create materialized view log on pdata; -- If Pdata does not have a primary key, you can use rowid as the primary key. Create materialized view log on pdata with rowid; 5. create a materialized view from the database. Create materialized view test refresh fast with primary key start with sysdate next sysdate + 1/1440 as select * from pdata @ 169 dblink; -- fast auto refresh is used here. Sysdate + 1/1440 is refreshed every minute. 6. Complete. You can Insert or Update pdata tables in the primary database. The materialized views in the database are automatically updated.