CN103020242A - Data synchronization method based on oracle database - Google Patents
Data synchronization method based on oracle database Download PDFInfo
- Publication number
- CN103020242A CN103020242A CN2012105525789A CN201210552578A CN103020242A CN 103020242 A CN103020242 A CN 103020242A CN 2012105525789 A CN2012105525789 A CN 2012105525789A CN 201210552578 A CN201210552578 A CN 201210552578A CN 103020242 A CN103020242 A CN 103020242A
- Authority
- CN
- China
- Prior art keywords
- data
- server
- database
- notice
- master server
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Abstract
The invention belongs to the technical field of the database, and particularly relates to a data synchronization method. The data synchronization method based on an oracle database comprises the following steps of: exporting business related data by a host, and sending the business related data to a standby machine importing database; scanning a database log on the host; recording data variation to a local log file; compressing and sending the local log file to the standby machine; and after the standby machine receives synchronized data, analyzing into the local log file which is consistent with the host data. When the host fails, the logic states of the host and the standby machine are revised by a control program, and the standby machine replaces the host to continue to work. If the host fails to cause host communication faults, the standby machine is directly operated by the control program to be forcedly switched into the host, so as to continuously support the system to operate. According to the data synchronization method based on the oracle database, which is disclosed by the invention, data synchronization service is independent from a service program, the service program design complexity is lowered, a transmission channel is uniformly managed, and the data synchronization method based on the oracle database is suitable for special requirements, such as the encryption and decryption processing of the data channel.
Description
Technical field
The invention belongs to database technical field, particularly the synchronous method of a kind of data.
Background technology
In the high reliability application system, usually server is adopted dual-host backup, when master server breaks down in the mutually redundant two-server, take over former master server by backup server and work on.In the dual-host backup operational process, need service routine synchrodata between two-server, can take over master server work to ensure backup server.Service routine is when processing synchrodata, need the relation between coordination and business data processing, and business processing logic impacted, and service routine need to be safeguarded transmission channel resources, transmission and the processing of management synchrodata, bring thus the complicacy of service routine design realization, be unfavorable for the business processing of service routine.
Summary of the invention
The objective of the invention is: provide a kind of data synchronous method, utilize and circulate a notice of mutually logic state between server, by master server the local data base service related data is derived, be sent to the disposable importing of backup server, obtain the consistent data original state of active/standby server, afterwards the data of synchronous follow-up variation only from master server to backup server.
Technical scheme of the present invention is: a kind of method of data synchronization based on the oracle database is characterized in that:
A. when data are synchronous:
Master server is carried out following steps
A1.1: configuration initial logic state and correlation parameter;
A1.2: to other server circular logical role state;
A1.3: receive other server circular logical role state;
A1.4: close whole application services;
A1.5: configuration oracle database journal correlation parameter;
A1.6: derived data storehouse service related data is to file and compression;
A1.7: send the derived data file to backup server;
A1.8: start whole application services;
A1.9: the wait backup server imports finishes notice;
A1.10: scan database journal file record;
A1.11: resolution data storehouse journal file record, analytical database data situation;
A1.12: database data change records to local disk file is also compressed;
A1.13: send the synchrodata compressed file by the transmitting channel;
A1.14: the interval repeated a1.10 to a1.13 in 30 seconds;
The backup server end is sequentially carried out following steps:
A2.1: configuration initial logic state and correlation parameter;
A2.2: to other server circular logical role state;
A2.3: receive other server circular logical role state;
A2.4: close whole application services;
A2.5: configuration oracle database journal correlation parameter;
A2.6: receive data storehouse service related data file also decompresses;
A2.7: data file is directed into local data base;
A2.8: send importing to master server and finish notice;
A2.9: receive master server and send the synchrodata compressed file;
A2.10: resolve the compressed file data;
A2.11: carry out the database manipulation consistent with main frame according to resolution file;
A2.12: repeated execution of steps a2.9 to a2.11;
B. when master server and backup server coordination switching:
Master server is carried out following steps:
B1.1. control program notification data scan procedure is finished last scanning and is stopped;
B1.2: send last scan-synchronized data to standby server;
B1.3: wait for that backup server sends the data notice that is disposed;
B1.4: close application service;
B1.5: switch master server IP address;
B1.6: the standby server modifications IP address of notice;
B1.7: control program notice scan procedure switch logic role transmitting terminal is to receiving end;
B1.8: master server switches to standby server and finishes;
The backup server end is sequentially carried out following steps;
B2.1: wait for that the last scan-data of reception master server is complete;
B2.2: resolve receive data and finish the database data change operation;
B2.3: notice master server data are disposed;
B2.4: wait for that master server switches the IP address and finishes notice;
B2.5: switch the machine IP address;
B2.6: start application service;
B2.7: control program notice scan procedure switch logic role receiving end is to transmitting terminal;
B2.8: the standby Server switching master server of notice Client Agent is finished;
C. when master server and backup server force handoff:
Backup server is carried out following steps:
C1: finish last database data change operation;
C2: switch the machine IP address;
C3: start application service;
C4: control program notice scan procedure switch logic role transmitting terminal is to transmitting terminal;
C5: notice Client Agent backup server switches master server to be finished.
The present invention makes data synchronization service independent from service routine, reduce the complicacy of service routine design, simultaneously by reliable channel performing data transmission, transmission channel is carried out unified management, both be conducive to safeguard, be convenient to again transmission channel is carried out unified management and control, and be applicable to special requirements such as encryption and decryption processing to data channel.
Embodiment
Embodiment 1: a kind of method of data synchronization based on the oracle database is characterized in that:
A. when data are synchronous:
Master server is carried out following steps
A1.1: configuration initial logic state and correlation parameter;
A1.2: to other server circular logical role state;
A1.3: receive other server circular logical role state;
A1.4: close whole application services;
A1.5: configuration oracle database journal correlation parameter;
A1.6: derived data storehouse service related data is to file and compression;
A1.7: send the derived data file to backup server;
A1.8: start whole application services;
A1.9: the wait backup server imports finishes notice;
A1.10: scan database journal file record;
A1.11: resolution data storehouse journal file record, analytical database data situation;
A1.12: database data change records to local disk file is also compressed;
A1.13: send the synchrodata compressed file by the transmitting channel;
A1.14: the interval repeated a1.10 to a1.13 in 30 seconds;
The backup server end is sequentially carried out following steps:
A2.1: configuration initial logic state and correlation parameter;
A2.2: to other server circular logical role state;
A2.3: receive other server circular logical role state;
A2.4: close whole application services;
A2.5: configuration oracle database journal correlation parameter;
A2.6: receive data storehouse service related data file also decompresses;
A2.7: data file is directed into local data base;
A2.8: send importing to master server and finish notice;
A2.9: receive master server and send the synchrodata compressed file;
A2.10: resolve the compressed file data;
A2.11: carry out the database manipulation consistent with main frame according to resolution file;
A2.12: repeated execution of steps a2.9 to a2.11;
B. when master server and backup server coordination switching:
Master server is carried out following steps:
B1.1. control program notification data scan procedure is finished last scanning and is stopped;
B1.2: send last scan-synchronized data to standby server;
B1.3: wait for that backup server sends the data notice that is disposed;
B1.4: close application service;
B1.5: switch master server IP address;
B1.6: the standby server modifications IP address of notice;
B1.7: control program notice scan procedure switch logic role transmitting terminal is to receiving end;
B1.8: master server switches to standby server and finishes;
The backup server end is sequentially carried out following steps;
B2.1: wait for that the last scan-data of reception master server is complete;
B2.2: resolve receive data and finish the database data change operation;
B2.3: notice master server data are disposed;
B2.4: wait for that master server switches the IP address and finishes notice;
B2.5: switch the machine IP address;
B2.6: start application service;
B2.7: control program notice scan procedure switch logic role receiving end is to transmitting terminal;
B2.8: the standby Server switching master server of notice Client Agent is finished;
C. when master server and backup server force handoff:
Backup server is carried out following steps:
C1: finish last database data change operation;
C2: switch the machine IP address;
C3: start application service;
C4: control program notice scan procedure switch logic role transmitting terminal is to transmitting terminal;
C5: notice Client Agent backup server switches master server to be finished.
Embodiment 2: in embodiment 1 described method of data synchronization based on the oracle database, it is characterized in that: carry out exchanges data by the UDP multicast between described master server and the backup server.
Claims (2)
1. method of data synchronization based on the oracle database is characterized in that:
A. when data are synchronous:
Master server is carried out following steps
A1.1: configuration initial logic state and correlation parameter;
A1.2: to other server circular logical role state;
A1.3: receive other server circular logical role state;
A1.4: close whole application services;
A1.5: configuration oracle database journal correlation parameter;
A1.6: derived data storehouse service related data is to file and compression;
A1.7: send the derived data file to backup server;
A1.8: start whole application services;
A1.9: the wait backup server imports finishes notice;
A1.10: scan database journal file record;
A1.11: resolution data storehouse journal file record, analytical database data situation;
A1.12: database data change records to local disk file is also compressed;
A1.13: send the synchrodata compressed file by the transmitting channel;
A1.14: the interval repeated a1.10 to a1.13 in 30 seconds;
The backup server end is sequentially carried out following steps:
A2.1: configuration initial logic state and correlation parameter;
A2.2: to other server circular logical role state;
A2.3: receive other server circular logical role state;
A2.4: close whole application services;
A2.5: configuration oracle database journal correlation parameter;
A2.6: receive data storehouse service related data file also decompresses;
A2.7: data file is directed into local data base;
A2.8: send importing to master server and finish notice;
A2.9: receive master server and send the synchrodata compressed file;
A2.10: resolve the compressed file data;
A2.11: carry out the database manipulation consistent with main frame according to resolution file;
A2.12: repeated execution of steps
A2.9 to a2.11;
B. when master server and backup server coordination switching:
Master server is carried out following steps:
B1.1. control program notification data scan procedure is finished last scanning and is stopped;
B1.2: send last scan-synchronized data to standby server;
B1.3: wait for that backup server sends the data notice that is disposed;
B1.4: close application service;
B1.5: switch master server IP address;
B1.6: the standby server modifications IP address of notice;
B1.7: control program notice scan procedure switch logic role transmitting terminal is to receiving end;
B1.8: master server switches to standby server and finishes;
The backup server end is sequentially carried out following steps;
B2.1: wait for that the last scan-data of reception master server is complete;
B2.2: resolve receive data and finish the database data change operation;
B2.3: notice master server data are disposed;
B2.4: wait for that master server switches the IP address and finishes notice;
B2.5: switch the machine IP address;
B2.6: start application service;
B2.7: control program notice scan procedure switch logic role receiving end is to transmitting terminal;
B2.8: the standby Server switching master server of notice Client Agent is finished;
C. when master server and backup server force handoff:
Backup server is carried out following steps:
C1: finish last database data change operation;
C2: switch the machine IP address;
C3: start application service;
C4: control program notice scan procedure switch logic role transmitting terminal is to transmitting terminal;
C5: notice Client Agent backup server switches master server to be finished.
2. the method for data synchronization based on the oracle database according to claim 1 is characterized in that: carry out exchanges data by the UDP multicast between described master server and the backup server.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210552578.9A CN103020242B (en) | 2012-12-19 | 2012-12-19 | Based on the method for data synchronization of oracle database |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210552578.9A CN103020242B (en) | 2012-12-19 | 2012-12-19 | Based on the method for data synchronization of oracle database |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103020242A true CN103020242A (en) | 2013-04-03 |
CN103020242B CN103020242B (en) | 2015-11-25 |
Family
ID=47968845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210552578.9A Expired - Fee Related CN103020242B (en) | 2012-12-19 | 2012-12-19 | Based on the method for data synchronization of oracle database |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103020242B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425551A (en) * | 2013-07-31 | 2013-12-04 | 清华大学 | Database concentrated backup method |
CN103532986A (en) * | 2013-11-01 | 2014-01-22 | 深圳中兴网信科技有限公司 | Terminal as well as server and file transmission system and method |
CN104361043A (en) * | 2014-10-29 | 2015-02-18 | 中国建设银行股份有限公司 | Database switching method and database switching system |
CN104778228A (en) * | 2015-03-27 | 2015-07-15 | 百度在线网络技术(北京)有限公司 | Method and device for multi-party setting database |
WO2016201620A1 (en) * | 2015-06-16 | 2016-12-22 | 华为技术有限公司 | Process replacement method and device |
CN106802892A (en) * | 2015-11-26 | 2017-06-06 | 阿里巴巴集团控股有限公司 | For the method and apparatus of master/slave data consistency verification |
CN107682172A (en) * | 2017-07-25 | 2018-02-09 | 平安科技(深圳)有限公司 | Control centre's device, the method and medium of operation system processing |
CN108614892A (en) * | 2018-05-09 | 2018-10-02 | 浪潮软件集团有限公司 | Oracle data real-time synchronization method based on redolog |
CN109308242A (en) * | 2018-09-06 | 2019-02-05 | 上海达梦数据库有限公司 | A kind of dynamic monitoring and controlling method, device, equipment and storage medium |
CN109672712A (en) * | 2017-10-17 | 2019-04-23 | 中兴通讯股份有限公司 | Method of data synchronization, device, super controller, domain controller and storage medium |
CN110347652A (en) * | 2019-07-12 | 2019-10-18 | 天津凯发电气股份有限公司 | A kind of Power quality management system multimachine database synchronization implementation method |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5926816A (en) * | 1996-10-09 | 1999-07-20 | Oracle Corporation | Database Synchronizer |
CN1808394A (en) * | 2006-02-20 | 2006-07-26 | 南京联创科技股份有限公司 | Soft co-standby method based on memory database |
-
2012
- 2012-12-19 CN CN201210552578.9A patent/CN103020242B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5926816A (en) * | 1996-10-09 | 1999-07-20 | Oracle Corporation | Database Synchronizer |
CN1808394A (en) * | 2006-02-20 | 2006-07-26 | 南京联创科技股份有限公司 | Soft co-standby method based on memory database |
Non-Patent Citations (1)
Title |
---|
杨明华等: "高可信容错计算机系统设计与应用研究", 《计算机工程》 * |
Cited By (21)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103425551A (en) * | 2013-07-31 | 2013-12-04 | 清华大学 | Database concentrated backup method |
CN103532986A (en) * | 2013-11-01 | 2014-01-22 | 深圳中兴网信科技有限公司 | Terminal as well as server and file transmission system and method |
CN104361043B (en) * | 2014-10-29 | 2019-06-07 | 中国建设银行股份有限公司 | Database switching method and database switching system |
CN104361043A (en) * | 2014-10-29 | 2015-02-18 | 中国建设银行股份有限公司 | Database switching method and database switching system |
CN104778228A (en) * | 2015-03-27 | 2015-07-15 | 百度在线网络技术(北京)有限公司 | Method and device for multi-party setting database |
CN104778228B (en) * | 2015-03-27 | 2018-08-07 | 百度在线网络技术(北京)有限公司 | A kind of method and apparatus for multi-party set database |
WO2016201620A1 (en) * | 2015-06-16 | 2016-12-22 | 华为技术有限公司 | Process replacement method and device |
CN106462455A (en) * | 2015-06-16 | 2017-02-22 | 华为技术有限公司 | Process replacement method and device |
CN106462455B (en) * | 2015-06-16 | 2019-11-01 | 华为技术有限公司 | The method and apparatus that process is taken over |
CN106802892A (en) * | 2015-11-26 | 2017-06-06 | 阿里巴巴集团控股有限公司 | For the method and apparatus of master/slave data consistency verification |
CN106802892B (en) * | 2015-11-26 | 2021-12-28 | 阿里巴巴集团控股有限公司 | Method and equipment for checking consistency of main and standby data |
WO2019019457A1 (en) * | 2017-07-25 | 2019-01-31 | 平安科技(深圳)有限公司 | Control center device, business system processing method and system, and storage medium |
CN107682172B (en) * | 2017-07-25 | 2020-11-03 | 平安科技(深圳)有限公司 | Control center device, service system processing method and medium |
CN107682172A (en) * | 2017-07-25 | 2018-02-09 | 平安科技(深圳)有限公司 | Control centre's device, the method and medium of operation system processing |
CN109672712A (en) * | 2017-10-17 | 2019-04-23 | 中兴通讯股份有限公司 | Method of data synchronization, device, super controller, domain controller and storage medium |
WO2019076236A1 (en) * | 2017-10-17 | 2019-04-25 | 中兴通讯股份有限公司 | Data synchronization method and device, super controller, domain controller, and storage medium |
CN108614892A (en) * | 2018-05-09 | 2018-10-02 | 浪潮软件集团有限公司 | Oracle data real-time synchronization method based on redolog |
CN109308242A (en) * | 2018-09-06 | 2019-02-05 | 上海达梦数据库有限公司 | A kind of dynamic monitoring and controlling method, device, equipment and storage medium |
CN109308242B (en) * | 2018-09-06 | 2021-11-19 | 上海达梦数据库有限公司 | Dynamic monitoring method, device, equipment and storage medium |
CN110347652A (en) * | 2019-07-12 | 2019-10-18 | 天津凯发电气股份有限公司 | A kind of Power quality management system multimachine database synchronization implementation method |
CN110347652B (en) * | 2019-07-12 | 2022-03-18 | 天津凯发电气股份有限公司 | Multi-machine database synchronization realization method for power quality management system |
Also Published As
Publication number | Publication date |
---|---|
CN103020242B (en) | 2015-11-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103020242B (en) | Based on the method for data synchronization of oracle database | |
EP3493471B1 (en) | Data disaster recovery method, apparatus and system | |
CN101217353B (en) | A control method on multi-point dual redundancy system of call center | |
CN102810111B (en) | A kind of oracle database service high available implementation method and system of keeping | |
CN102171995B (en) | Method for processing packet when server fails and router thereof | |
CN103838646A (en) | System and method for big data remote disaster recovery backup of ground application | |
CN102263667B (en) | Network management system and network management processing method | |
CN108520004B (en) | Multi-tenant data source switching system based on method parameter section | |
CN104639367B (en) | A kind of method and system for realizing active/standby server switching | |
WO2012146094A1 (en) | Remote control method and server | |
CN103685585A (en) | Highly reliable method and method for updating DNS data | |
CN105430016A (en) | Network access authentication method and system | |
CN101483555A (en) | Method for redundant backup implemented by dual ForCES control piece | |
CN103853634A (en) | Disaster recovery system and disaster recovery method | |
CN111209467A (en) | Data real-time query system under multi-concurrency multi-channel environment | |
CN105159793A (en) | Data replication backup method based on GoldenGate | |
CN101527656B (en) | Emergency switched system of NGN service platform database and realizing method thereof | |
CN105227403A (en) | A kind of OpenStack network flow monitoring method | |
CN110908756A (en) | Real-time fusion switching method and system for cloud desktop | |
CN111865632A (en) | Switching method of distributed data storage cluster and switching instruction sending method and device | |
WO2014032532A1 (en) | Enum-dns disaster recovery method and system in ims network | |
CN101217293A (en) | Media operation trusteeship switching system and method | |
CN113342764A (en) | Data synchronization method and device among different cloud servers | |
CN112445861A (en) | Information processing method, device, system and storage medium | |
CN102238036A (en) | User session backup handover method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20151125 Termination date: 20211219 |
|
CF01 | Termination of patent right due to non-payment of annual fee |