In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to realize distributed replication environment in materialized view". In daily operation, I believe many people have doubts about how to realize distributed replication environment in materialized view. Xiaobian consulted all kinds of materials and sorted out simple and easy operation methods. I hope to help you answer the doubts of "how to realize distributed replication environment in materialized view"! Next, please follow the small series to learn together!
###############################################
1. Set up snapproxy user at primary site
create user snapproxy identified by "snap001snap" default tablespace users;
BEGIN
dbms_repcat_admin.register_user_repgroup(
username => 'snapproxy',
privilege_type => 'proxy_snapadmin',
list_of_gnames => NULL);
END;
/
grant create session,select any table to snapproxy;
2. Create materialized view logs for tables at the master site with the owner of the table to be replicated: (hr user here)
conn hr/hr;
create snapshot log on employees with rowid,primary key;
create snapshot log on departments with rowid,primary key;
3. Target users who create replication tables at materialized view sites:
create user mview identified by mview default tablespace usres;
grant connect,resource,create snashot,create database link to mview;
4. Create materialized views at materialized view sites Refresh users and empower them:
create user snapadmin identified by "snap001snap" default tablespace users;
EXECUTE dbms_repcat_admin.grant_admin_any_schema('snapadmin');
grant comment any table,lock any table,create any materialized view,alert any materialized view to snapadmin;
5. Create dblink and materialized view to snapproxy user as materialized view user mview at materialized view site:
create database link presale connect to snapproxy identified by "snap001snap" using '130.84.208.52:1621/presale';
create materialized view employees_mv refresh fast as select * from hr.employees@presale;
create materialized view departments_mv refresh fast as select * from hr.departments@presale;
6. snapadmin user creates refresh group
begin
dbms_refresh.make(
name => 'RG_MVIEW_OWNER',
list => 'mview.employees_mv,mview.departments_mv',
next_date => sysdate,
interval => 'SYSDATE + 1/1440',
implicit_destroy => true,
lax => true);
end;
/
7. initialization refresh
execute dbms_refresh.refresh('RG_MVIEW_OWNER');
At this point, the study of "how to implement distributed replication environment in materialized view" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.