In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article shows you the Oracle system data replication technology, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Implementation of data replication
Let's give an example of what needs to be done in each step. In this example, we use multi-master site replication, with two master sites and two shared data tables. The two main control sites are: processing site (cl.world) and interpretation site (js.wo rld), and the two data tables are survey and line.
STEP1 creates a replication site:
(1) first log in to the main site database cl.worldCONNECT system/manager@cl.world as SYSTEM
(2) create a user-replication administrator, and authorize the replication administrator to be responsible for the creation and management of the replication site for that user. Each replication site must create the following referenced content:
CREATE USER repadmin IDENTIFIED BY repadmin; BEGIN DBMS_REPCAT_ADMIN.GRANT_ADMIN_ANY_SCHEMA (username = > 'repadmin'); END
(3) designate communicators for this site
The disseminator is responsible for propagating the locally updated data to other sites. The following is the referenced content:
BEGIN DBMS_DEFER_SYS.REGISTER_PROPAGATOR (username = > 'repadmin'); END
(4) designate a recipient for this site
The receiver is responsible for receiving the data sent by the communicator on other sites. The following is the referenced content:
BEGIN DBMS_REPCAT_ADMIN.REGISTER_USER_REPGROUP (username = > 'repadmin', privilege_type = >' receiver', list_of_gnames = > NULL); END
(5) determine the clearance time.
In order to ensure that the delivered transaction queue is not too large, the successfully loaded transaction needs to be purged from the transaction queue, which is set to be cleared every hour. The following is the referenced content:
CONNECT repadmin/repadmin@cl.world BEGIN DBMS_DEFER_SYS.SCHEDULE_PURGE (next_date = > SYSDATE, interval = > 'SYSDATE + 1 delay_seconds = > 0); END
After setting up the site cl.world, create the site js. World .
(6) create scheduling links between the main control sites.
To create a scheduling link between the master sites, you need to establish a database link between the master sites, and then define the scheduling time for each database link.
First, establish a database link to the interpretation site on the processing site, where you need to establish a public database link that can be used by other private database links. The following is the referenced content:
CONNECT SYSTEM/MANAGER@cl.world CREATE PUBLIC DATABASE LINK js.world USING 'js.world'; CONNECT repadmin/repadmin@cl.world CREATE DATABASE LINK js.world CONNECT TO repadmin IDENTIFIED BY repadmin
Similarly, establish a database link to the processing site on the interpretation site. The following is the referenced content:
CONNECT SYSTEM/MANAGER@js.world CREATE PUBLIC DATABASE LINK cl.world USING 'cl.world'; CONNECT repadmin/repadmin@js.world CREATE DATABASE LINK cl.world CONNECT TO repadmin IDENTIFIED BY repadmin
The scheduling link determines how often transactions on this site are sent to other sites. The following code is every 10 minutes, and the following is the referenced content:
CONNECT repadmin/repadmin@cl.world BEGIN DBMS_DEFER_SYS.SCHEDULE_PUSH (destination = > 'js.world', interval = >' SYSDATE +', next_date = > SYSDATE, parallelism = > 1, execution_seconds = > 1500, delay_seconds = > 1200); END
Do the same work on the interpretation site STEP2 create master groups in a replication environment, Oracle uses groups to manage replicated objects. By putting related replication objects in a group, it is convenient to manage a large number of data objects.
Here we assume that the user mode integr ation already exists at both the processing site and the interpretation site, and that the survey and line have been created.
(1) create a master group object: the following are referenced contents:
CONNECT repadmin/repadmin@cl.world BEGIN DBMS_REPCAT.CREATE_MASTER_REPGROUP (gname = > 'inte_repg'); END
(2) add data objects to the main control group and add the survey table survey to the group inte_repg as follows:
BEGIN DBMS_REPCAT.CREATE_MASTER_REPOBJECT (gname = > 'inte_repg', type = >' TABLE', oname = > 'survey', sname = >' integration', use_existing_object = > TRUE, copy_rows = > FALSE)
Add the line table line to the group inte_repg in the same way.
(3) add other sites participating in replication to the master group, and the synchronization between databases specifies the following referenced content:
BEGIN DBMS_REPCAT.ADD_MASTER_DATABASE (gname = > 'inte_repg', master = > js.world', use_existing_objects = > TRUE, copy_rows = > FALSE, propagation_mode = >' ASYNCHRONOUS'); END
(4) if a conflict is possible, you need to configure a conflict resolution. Conflict resolution will be described later.
(5) generate replication support for each object. The following are references:
BEGIN DBMS_REPCAT.GENERATE_REPLICATION_SUPPORT (sname = > 'integration', oname = >' survey', type = > 'TABLE', min_communication = > TRUE); END
The same is true of the line meter line.
(6) restart to copy the following referenced content:
BEGIN DBMS_REPCAT.RESUME_MASTER_ACTIVITY (gname = > 'inte_repg'); END
Set up the interpretation site in the same way. After the setup is successful, the data replication process is completed and the data in the library can be replicated.
The above content is the Oracle system data replication technology, have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.