internal and external network data synchronization with advanced replication of Oracle

Source: Internet
Author: User
Tags network function
This article briefly introduces ORACLE's advanced replication capabilities and, through a practical project, discusses how to use advanced replication to achieve data unification within and outside the network in level two db, and finally gives a configuration script for your reference.
  
1. Basic Concepts
ORACLE
  
Oracle is a large relational database based on advanced Structured Query Language (SQL), which is commonly used to manipulate a large collection of regular data in a language convenient to logic management. is one of the database for the client/server (Client/server) architecture.
  
Advanced Replication
  
What is replication. Simply put, replication is the process of copying data in a distributed database environment consisting of two or more database systems.
  
Advanced replication is the process of replicating and maintaining database objects in multiple databases that make up a distributed database system. Oracle advanced replication allows applications to update any copy of the database and automatically deliver those changes to other databases while ensuring consistency and data integrity for global transactions.
  
Replication, replicated data is consistent at any time at any replicated node. If the replicated data for any node in the replication environment has been updated, the change is immediately reflected to all other replicated nodes. This technique is suitable for commercial applications that require high real-time performance.
  
Asynchronous replication, the data for all replicated nodes is not synchronized for a certain amount of time. If the replicated data for one of the nodes in the replication environment has been updated, the change is propagated and applied to all other replication nodes in different transactions. These different transactions can be separated by a few seconds, a few minutes, a few hours, or a few days later. The data between replication nodes is temporarily unsynchronized, but the propagation will ultimately guarantee consistent data between all replicated nodes.
  
2. Project situation
Requirements Description
  
This is an internal and external network structure of the approval system.
  
The extranet has a WEB (+appserver), a db (ORACLE9.2, dual NIC), responsible for receiving and feedback approval results.
  
Intranet has a WEB (+appserver), a db (ORACLE9.2, dual network card), responsible for receiving reports and feedback approval results, as well as through the approval process from the extranet to process the approval of the Declaration.
  
From the above, the intranet functions include external network function, but the external network declaration needs CA certification, intranet is not needed.
  
According to the relevant provisions of state secrecy, the internal and external network of the government affairs system must be physically isolated, so the declaration received by the extranet can not immediately respond to the intranet, similarly, the results of the intranet can not be quickly feedback to the extranet.
  
Technology options
  
We chose Oracle Asynchronous manual replication, which mainly finishes the following functions:
  
1. To copy the new declaration data of the extranet to intranet;
  
2. Feedback the results of the intranet to the external network.
  
Operation implementation
  
Because the normal working hours, the internal and external network can not be stopped, and the internal and external network can not be physically connected. It is set to be maintained for a period of 18:00 to 18:15 (or other period) every night. This period of time, both internal and external network to stop the operation, by the system administrator to the internal and external network of DB connected to all the network cables are disconnected, with a direct network cable to the two DB connection, through the operating interface provided by Oracle, the External network end manual refresh record.
  
3, the specific implementation steps
The following are the technical parameters used in the script, the internal and external network table structure is the same, and all have primary keys.
  
  
Intranet External Network
IP 192.168.0.50 192.168.0.100
SID Oranei Orawai
Table Lawtable
REGISTER
USERINFO
......
Total 68 Sheets Lawtable
REGISTER
Total 2 Sheets
Login name/password Holen/holen Holen/holen
  
Here is the SQL script we used to install at the customer
  
The first step: Configure the Intranet, that is, the master end
--Version: 2.0
--Revised by: Chen Guang reckons holen@263.net
--Time: 2003-6-8 15:30
--Intranet as Master
--Create intranet user Holen
  
CONN System/password@oranei
  
CREATE USER "holen" Profile "DEFAULT" identified by "Holen";
GRANT "CONNECT" to "Holen";
GRANT "DBA" to "Holen";
GRANT "RESOURCE" to "Holen";
--Import Intranet database backup, in DOS to the completion (table Lawtable,register and other tables)
  
Step Two: Configure Intranet, i.e. Master End (cont.)
--the table that needs to be replicated (synchronized) is lawtable,register under the Holen user
  
--Create repadmin user management replication environment
  
CREATE USER REPADMIN identified by REPADMIN;
  
ALTER USER REPADMIN DEFAULT tablespace USERS;
  
ALTER USER REPADMIN temporary tablespace TEMP;
  
GRANT Connect, resource to REPADMIN;
  
--Grant repadmin user rights to manage any of the principal groups in the current site
  
EXECUTE dbms_repcat_admin.grant_admin_any_schema (' REPADMIN ');
  
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.